New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix linking against Homebrew's Tcl/Tk 8.6.13 in MacOS #2820
Conversation
Correct the path for `tcl-tk` `include` for homebrew
…thon-build/bin/find / -name tcl.h 2>/dev/null Add conditional coding of `include` folder rather than hardcoded one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added conditional coding of include
folder rather than hardcoded one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tcl.h
can be in multiple locations. How can we ensure tcl-tk
from Homebrew is used in the use_homebrew_tcltk()
?
This still links 2.7.18 against 8.5 . As I said, 2.7.18's Tkinter build is bugged, it appends rather than prepends the required directory to the compiler search path -- so it doesn't pick the intended version when other directories or the compiler search path also have it. Looks like to work around that, we'd need to include the mode to configure Tcl/Tk via However. I've looked through the history... and we seem to have never done this before! So, configuring 2.7 with Homebrew's Tcl/Tk never worked (at least since the time Xode SDK had it bundled)! I was suspecting that this worked before and then we broke it -- then this would be a bugfix. And because 2.7 is EOL, adding new features just for it would be against our Deprecation policy. So I suggest that we should rather make a patch for 2.7.18 that would properly prepend the dirs to the compiler's search paths. |
That said, PyPy-2.7 is NOT EOL -- so if this feature applies to it as well, it's fine to add. |
True, but at least it is not borked. Interestingly if I hardcode it like this:
it links
It links against |
Isn't it better to rely on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aah! my bad...
Wow! I don't know how but it works.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Thanks.
Thanks to you, too! Way to prove me wrong! |
Correct the path for
tcl-tk
include
for homebrewMake sure you have checked all steps below.
Prerequisite
Description
RuntimeError: tk.h version (8.5) doesn't match libtk.a version (8.6) python 2.7.18 #2794 (comment)
Tests