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.

classification
Title: External.bat and pcbuild of tkinter do not match.
Type: behavior Stage: resolved
Components: Build Versions: Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: steve.dower, terry.reedy, zach.ware
Priority: normal Keywords:

Created on 2014-06-27 21:17 by terry.reedy, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (6)
msg221737 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014-06-27 21:17
dir/pydir/Tools/buildbot/external.bat downloads tcl/tk 8.y.z into dir/tcl-8.y.z and dir/tk-8.y.x and compiles them into dir/tcltk. Of critical importance are dir/tcltk/bin/tcl8yg.dll and dir/tcltk/bin/tk8yg.dll (where y is currently 5 or 6.

dir/pydir/pcbuild/_tkinter.vcxprog compiles _tkinter is such a way that it looks for the two dlls 'everywhere' (in pcbuild itself and 5-10 other, non-existent directories) other than where they are.

The current manual fix, reported a year ago on core-mentorship list, is to copy the two .dlls into pcbuild. This should be done by external.bat.

A possible alternate fix would be to revise _tkinter.vcxproj so that _tkinter looks for the .dlls where they are. However, since multiple tcl/tk versions are compiled into /tcltk, this would break installations that use one 'dir' for multiple 'pydir's, as shown in the devguide. Currently, the .dlls must be copied into pcbuild before they get overwritten by another version.
msg221740 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2014-06-27 21:28
> compiles _tkinter is such a way that it looks for the two dlls 'everywhere' (in pcbuild itself and 5-10 other, non-existent directories)

I think you're confusing the finding of the tcl/tk DLLs with the finding of init.tcl; the DLLs are searched for on PATH (as I understand it, just like any other DLL), while init.tcl is searched for in several places hard coded deep in bowels of Tcl (see #20035).

Python 3.5 (default branch) builds Tcl/Tk as part of the build solution rather than as part of external*.bat, and copies the DLLs to the output directory as part of the new system.  3.4 and 2.7 could be fixed to copy the DLLs as part of external*.bat, but will have issues similar to #21059 without some kind of fix like #20035 (which is currently only targetting default branch).
msg230120 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014-10-28 06:20
I am quite aware that the two searches are different.  tcl8xyz.dll and tkxyz.dll must be copied from ../tcltk/bin to pcbuild while init.tcl must be left in ../tcltk/lib/tcl8.x, where x is, now, '5' or '6'.  Since compiling tcl/tk clears tcltk/, it is impossible to simultaneously run 2.7 which requires tcltk/lib/tcl8.5/init.tcl and 3.4/5 which require tcltk/lib/tcl8.6/init.tcl.
msg230121 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014-10-28 06:24
Since the two .dlls must now be copied manually (still undocumented?) for tkinter to work, I fail to see the problem with having the copying done automatically in external.bat right after the compile that creates them.
msg324536 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2018-09-03 21:19
I believe this has been fixed some time in the last few years; Terry, please reopen this if I've missed something.
msg324549 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2018-09-04 01:27
The fixes, attached to other issues, works flawlessly for me.
History
Date User Action Args
2022-04-11 14:58:05adminsetgithub: 66076
2018-09-04 01:27:26terry.reedysetnosy: - BreamoreBoy
messages: + msg324549
2018-09-03 21:19:58zach.waresetstatus: open -> closed
resolution: fixed
messages: + msg324536

stage: needs patch -> resolved
2014-10-28 09:50:00BreamoreBoysetnosy: + BreamoreBoy
2014-10-28 06:24:29terry.reedysetmessages: + msg230121
2014-10-28 06:20:56terry.reedysetmessages: + msg230120
2014-06-27 21:28:15zach.waresetmessages: + msg221740
2014-06-27 21:17:37terry.reedycreate