Erlend E. Aasland <erlend.aasl...@innova.no> added the comment:
Regarding _tkinter (Tcl/Tk): Based on discussion on Discourse (https://discuss.python.org/t/simplifying-tcl-tk-detection/14066), my current plan is to just use pkg-config, and drop the rest of the autodetect hackery. GH-31698 sort'a works given that pkg-config provides us with correct info. Sadly it doesn't for Ubuntu: ``` $ grep lib /usr/lib/x86_64-linux-gnu/pkgconfig/tcl8.6.pc libdir=/usr/lib/x86_64-linux-gnu Requires.private: zlib >= 1.2.3 Libs: -L${libdir} -ltcl8.6 -ltclstub8.6 $ ls -ld /usr/lib/x86_64-linux-gnu/{tcl,tk}* drwxr-xr-x 2 root root 4096 Mar 6 23:59 /usr/lib/x86_64-linux-gnu/tcl8.6 lrwxrwxrwx 1 root root 19 Feb 23 2019 /usr/lib/x86_64-linux-gnu/tclConfig.sh -> tcl8.6/tclConfig.sh lrwxrwxrwx 1 root root 21 Feb 23 2019 /usr/lib/x86_64-linux-gnu/tclooConfig.sh -> tcl8.6/tclooConfig.sh drwxr-xr-x 2 root root 4096 Mar 6 23:59 /usr/lib/x86_64-linux-gnu/tk8.6 lrwxrwxrwx 1 root root 17 Feb 23 2019 /usr/lib/x86_64-linux-gnu/tkConfig.sh -> tk8.6/tkConfig.sh ``` As you can see, the linker is given the wrong search path, so `AC_LINK_IFELSE` fails: ``` $ grep -A4 "gcc.*tcl" config.log configure:12380: gcc -o conftest -I/usr/include/tcl8.6 -ltk8.6 -ltkstub8.6 -ltcl8.6 -ltclstub8.6 conftest.c -lpthread -ldl >&5 /usr/bin/ld: /tmp/ccMuHSnh.o: in function `main': conftest.c:(.text+0xb): undefined reference to `Tcl_Init' /usr/bin/ld: conftest.c:(.text+0x16): undefined reference to `Tk_Init' collect2: error: ld returned 1 exit status ``` I haven't checked Debian yet, but they may have the same problem. Plan B: 1. try to push a fix upstream 2. add temporarily hack for Ubuntu/Debian in autoconf 3. remove hack in a year or two Plan C 1. try to push a fix upstream 2. leave the current hackery as it is and wait another year or two ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45847> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com