Uh oh!
There was an error while loading. Please reload this page.
bpo-45847: Port _tkinter to PY_STDLIB_MOD - #31698
Conversation
Resolved in commit a8313a1 Now we've got problems on FreeBSD (14.0): $ grep -A5 "cc.*tcl" config.logconfigure:12411: cc -o conftest -I/usr/local/include/tcl8.6 -I/usr/local/include/tk8.6 conftest.c -L/usr/local/lib -ltk86 -ltkstub86 -ltcl86 -ltclstub86 >&5In file included from conftest.c:111:/usr/local/include/tk8.6/tk.h:99:13: fatal error: 'X11/Xlib.h' file not found
# include <X11/Xlib.h> ^~~~~~~~~~~~1 error generated.
$ pkg-config --libs --cflags tcl86 tk86-I/usr/local/include/tcl8.6 -I/usr/local/include/tk8.6 -L/usr/local/lib -ltk86 -ltkstub86 -ltcl86 -ltclstub86Proposed solution: add special case for FreeBSD in 72cf592 |
erlend-aasland
commented
Mar 7, 2022
(I squeezed 46e43dcaa599d3fe906cdb3ebd591151af856372, 5156b5764a368578e5eb55da471b74e80e5aa479, and 8af1b258d04b042038e0cc0e5fccfd35aad659af into 72cf592) |
| #if defined(TK_HEX_VERSION) | ||
| # if TK_HEX_VERSION < 0x08040200 | ||
| # error "Tk older than 8.4.2 not supported" | ||
| # endif | ||
| #endif |
There was a problem hiding this comment.
Drop this and keep the ones below?
bedevere-bot
commented
Mar 7, 2022
🤖 New build scheduled with the buildbot fleet by @erlend-aasland for commit ea426ef 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
Non-Windows buildbot status embedded below (updating this post at irregular intervals) TL;DR: macOS and RHEL7 buildbots did no longer build _tkinter (change in behaviour). There were some other issues which have been addressed:
Buildbot status
|
erlend-aasland
commented
Mar 8, 2022
Sparked by Ronald's comment on Discourse: We could add a hack for macOS... I added this on my macOS 12 install, and it works for me. Not sure how it would fare on older installs, though. --- a/configure.ac+++ b/configure.ac@@ -3515,8 +3515,21 @@ for _QUERY in \
done
AS_VAR_IF([found_tcltk], [no], [
- TCLTK_CFLAGS=${TCLTK_CFLAGS-""}- TCLTK_LIBS=${TCLTK_LIBS-""}+ AS_CASE([$ac_sys_system],+ [Darwin*], [+ TCLTK_CFLAGS=${TCLTK_CFLAGS-"\+ -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Tcl.framework/Headers \+ -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Tk.framework/Headers \+ -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks \+ "}+ TCLTK_LIBS=${TCLTK_LIBS-"\+ -Wl,-F,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks,-framework,Tcl,-framework,Tk+ "}+ ], [+ TCLTK_CFLAGS=${TCLTK_CFLAGS-""}+ TCLTK_LIBS=${TCLTK_LIBS-""}+ ]+ )
])
dnl FreeBSD has an X11 dependency which is not implicitly resolved.I'm not sure if it's worth it adding a more complex hack, or if it's worth it adding this hack in the first place. |
erlend-aasland
commented
Mar 13, 2022
Based on comments from Ned and Ronald, I'm dropping adding any hack for macOS; those building on macOS will have to install MacPorts or Homebrew, and explicitly or implicitly pass this information to |
erlend-aasland
commented
Mar 17, 2022
erlend-aasland
commented
Mar 17, 2022
@tiran, do you want another round through the buildbots after I pulled Serhiy's changes? Apart from that, are you fine with this PR as it stands? |
Thanks for the PR! I'd like to review and play with it a bit but I likely won't be able to do so before Monday. If you don't hear anything by then, go ahead. |
erlend-aasland
commented
Mar 27, 2022
@ned-deily would you still like to review this? |
ned-deily
left a comment
There was a problem hiding this comment.
LGTM, thanks for doing this. Considering the history and complexity, I'm sure some problems will pop up that, at a minimum, will require more documentation, including the devguide with regard to installing dependencies. I did leave a comment about explicitly documenting the removal of the previous configure options. Also FTR, the macOS installer build script at the moment still depends on those current configure options; I will rework that area prior to the next 3.11 alpha.
Uh oh!
There was an error while loading. Please reload this page.
ned-deily
commented
Mar 31, 2022
Ready to go |
erlend-aasland
commented
Mar 31, 2022
Great, thank you for reviewing! @tiran, can you land this? :) |
tiran
commented
Mar 31, 2022
Love it! Your PR removes a lot of complicated code from |
(cherry picked from commit 269e726) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
sharewax
commented
Aug 13, 2022
files from centos7 (tk-devel-8.5.13-6.el7.x86_64 and tcl-devel-8.5.13-8.el7.x86_64) doesn't contain files for pkg-config, so tcl for debug version of python you get I'll try to set manually flags TCLTK_CFLAGS and TCLTK_LIBS, but it seems strage. on python3.10 all works well without additional things. |
tiran
commented
Aug 13, 2022
@sharewax Python 3.11 requires pkg-config to detect and configure tkinter. The CentOS 7 packages do not provide a |
@tiran Sure. Can you provide correct |
--with-tclk-*options fromconfigure_tkinterdependencies (Tcl/Tk, X11)TCLTK_CFLAGSandTCLTK_LIBShttps://bugs.python.org/issue45847
Automerge-Triggered-By: GH:tiran