This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author erlendaasland
Recipients christian.heimes, erlendaasland, miss-islington, pablogsal
Date 2022-03-07.08:49:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Regarding _tkinter (Tcl/Tk):

Based on discussion on Discourse (, 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
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/ -> tcl8.6/
lrwxrwxrwx 1 root root   21 Feb 23  2019 /usr/lib/x86_64-linux-gnu/ -> tcl8.6/
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/ -> tk8.6/

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
Date User Action Args
2022-03-07 08:49:26erlendaaslandsetrecipients: + erlendaasland, christian.heimes, pablogsal, miss-islington
2022-03-07 08:49:26erlendaaslandsetmessageid: <>
2022-03-07 08:49:26erlendaaslandlinkissue45847 messages
2022-03-07 08:49:26erlendaaslandcreate