Python Forum
Failed tkinter Compile In Custom 3.7.2 Build Using Custom Tcl/Tk Build - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: General (https://python-forum.io/forum-1.html)
+--- Forum: News and Discussions (https://python-forum.io/forum-31.html)
+--- Thread: Failed tkinter Compile In Custom 3.7.2 Build Using Custom Tcl/Tk Build (/thread-15635.html)



Failed tkinter Compile In Custom 3.7.2 Build Using Custom Tcl/Tk Build - gwc - Jan-25-2019

All,

I spent a few hours working on a custom Python 3.7.2 build using a custom (and successful) Tcl/Tk 8.6.9 build/install that continually failed to correctly compile the tkinter module. Here are the relevant details:

Red Hat Enterprise Linux Workstation release 7.6 (Maipo)
Python 3.7.2 source
Tcl/Tk 8.6.9 source
OS-provided Tcl/Tk packages not installed

I added the destinations of both the Python and Tcl/Tk builds to /etc/ld.so.conf.d/custom-python.conf and executed /sbin/ldconfig.

The autoconf command I used is:

./configure --prefix=<python-prefix> --with-tcltk-includes=-I<tcl-prefix>/include --with-tcltk-libs="-L<tcl-prefix>/lib -ltcl8.6 -ltk8.6"

The Python build succeeded but the tkinter module failed to build. The config.log output indicated that it could not find tcl.h, but it (and the other header files) exists in <tcl-prefix>/include. Out of curiosity, I progressively created symlinks in /usr/include to tcl.h, tk.h, tclDecls.h, and tclPlatDecls.h until the errors stopped appearing in config.log and the tkinter module successfully compiled and indicated that it was using the expected version of Tcl/Tk.

It appears to me that the autoconf execution is not honoring the --with-tcltk-includes value. I attempted the same steps using Python 3.6.8 with similar results.

--
G.