python-build-standalone
python-build-standalone copied to clipboard
tcl/tk: upgrade from 8.6.12 -> 8.6.14 on Windows
Attempt to work through some of the failures in https://github.com/indygreg/python-build-standalone/pull/303
It seems we have to bring a copy of zlib as a DLL now, so the installers will need an update. I'm also a little bit concerned about it interfering with other modules, but there doesn't seem to be an easy way to statically link it anymore, so I guess we'll just have to deal with any fallout if it breaks stuff.
from https://github.com/python/cpython/issues/99834#issuecomment-1329822722
Failing on Windows still with
cpython> C:\Users\runneradmin\AppData\Local\Temp\python-build-7ct6gfb1\Python-3.8.19\Modules\_tkinter.c(47,10): fatal error C1083: Cannot open include file: 'tcl.h': No such file or directory [C:\Users\RUNNER~1\AppData\Local\Temp\python-build-7ct6gfb1\Python-3.8.19\PCbuild\_tkinter.vcxproj]
cpython> C:\Users\runneradmin\AppData\Local\Temp\python-build-7ct6gfb1\Python-3.8.19\Modules\tkappinit.c(16,10): fatal error C1083: Cannot open include file: 'tcl.h': No such file or directory [C:\Users\RUNNER~1\AppData\Local\Temp\python-build-7ct6gfb1\Python-3.8.19\PCbuild\_tkinter.vcxproj]
and
cpython> C:\Users\runneradmin\AppData\Local\Temp\python-build-n27q1_f0\Python-3.12.5\Modules\tkappinit.c(16,10): fatal error C1083: Cannot open include file: 'tcl.h': No such file or directory [C:\Users\RUNNER~1\AppData\Local\Temp\python-build-n27q1_f0\Python-3.12.5\PCbuild\_tkinter.vcxproj]
cpython> C:\Users\runneradmin\AppData\Local\Temp\python-build-n27q1_f0\Python-3.12.5\Modules\_tkinter.c(53,10): fatal error C1083: Cannot open include file: 'tcl.h': No such file or directory [C:\Users\RUNNER~1\AppData\Local\Temp\python-build-n27q1_f0\Python-3.12.5\PCbuild\_tkinter.vcxproj]
With https://github.com/indygreg/python-build-standalone/pull/313/commits/0bd2a31dc3f7d856f06ad6ffdfe4755b5fb3b637 we're past that and now failing validation checks with
error: python/install/DLLs/tcl86t.dll loads illegal library zlib1.dll
error: python/install/tcl/nmake/x86_64-w64-mingw32-nmakehlp.exe loads illegal library msvcrt.dll
I was hoping the first wouldn't be present in 3.12 due to https://github.com/zanieb/python-build-standalone/blob/zb/tcl-tk-8614/cpython-windows/build.py#L560-L567 and we could just make that patch unconditionally — but it fails on 3.12 with the same error so that doesn't appear relevant. The relevant CPython change is at https://github.com/python/cpython/pull/101307
The latter file was added upstream in https://core.tcl-lang.org/tcltls/info/b7b0bd5a8f8b09e4
Most of the macOS builds passing now, one last problem, e.g., for (x86_64-apple-darwin, macos-13, cpython-3.8, pgo):
error: python/install/lib/libpython3.8d.dylib has weak symbol /System/Library/Frameworks/UniformTypeIdentifiers.framework/Versions/A/UniformTypeIdentifiers:_OBJC_CLASS_$_UTType, which is not allowed on Python 3.8
@indygreg I'm not entirely sure what to do about the zlib situation on Windows. I'll continue to poke at it, but if you have any suggestions I'd appreciate them. I think I'll probably spin up a Windows machine to debug, it's a bit of a struggle via CI.