bpo-45350: Rerun autoreconf with the pkg-config macros #28708
Conversation
@tiran Seems that having the pkg-config macros makes something fail on macos for openssl Do you know why this may be? |
@ned-deily Any idea what could be happening in macOs? |
I'm looking at it. |
I did verify that the PR works in my environment as expected. |
Wow, how has this been working so far!?!
|
Well, I just looked at a run from a prior PR and it appears that the CI job hasn't been finding an OpenSSL and skipping building _ssl and _hashlib :( I'm not sure where that /usr/local/opt/openssl came from. |
According to running |
Oh, they version bumped to OpenSSL 3. Sigh. We should work to avoid depending on Homebrew. |
Whay I am more concerned is that we have been not testing openssl for a while :S |
I think if we use |
Perhaps the CI job should check and fail if _ssl doesn't build since it is so important? |
With this PR it does, because that's what was making it fail |
@ned-deily Ok, openssl works, now we fail with |
|
With the PKG-CONFIG macros we are missing |
Seems a side effect of https://github.com/python/cpython/pull/23721/files |
Without the pkg-config macro, it was picking up the system 8.5 Tcl/Tk which is next to useless but undoubtedly the tk-based tests were correctly skipped anyway because of the lack of a display environment. Now with the pkg-config, it is probably picking up a Homebrew Tcl/Tk from /usr/local which may not be built as expected; it works fine with a MacPorts installed Tcl/Tk. I'll pull down a Homebrew one and check. |
The tests will be skipped in any case so it's just an issue of the build failure. |
Apparently no:
Is picking it from |
Oh, it was Homebrew in the past, they moved away from /usr/local. Try removing it (and other cruft in /usr/local ?) and making sure Tcl and Tk are installed in the /opt Homebrew prefix. |
Removing what?
I don't think those are installed. I am triying to install them to see what happens |
From the date and the fact that current Homebrew does not link Tk into /usr/local/lib:
|
But there are other libraries with symlinks there, no?
|
Yeah, that's an ancient version of Tk, the current is 8.6.11 and it was clearly built as an X11 version rather than the native Quartz version. The X11 version barely works on macOS and we don't support it. |
Ok, so we need to figure out why |
There are but that's one of the joys of Homebrew. They make a decision about which packages to link to /usr/local based on various criteria, primarily whether the package duplicates something supplied by Apple in the system. So, for example, Apple doesn't ship gdbm in macOS so there's no conflict, while they do ship a version of Tk, albeit a deprecated broken one. And Apple no longer ships an OpenSSL but it does ship LibreSSL pretty much strictly for the use of the system Python and other third-party open source packages; native Mac apps use Apple's built-in TLS stuff. |
Probably /usr/local/ gets searched first in configure and setup.py in most cases, before the pkg-config supplied path. |
Yeah, apparently PKG_CONFIG returns the correct thing:
|
Ah, is because
|
e9f6292
to
e19365f
Ok, prepending |
I will be landing this and the 3.10 version if the CI passes. What a day |
I don't think that's a particular good long term fix for the CI. There's definitely an issue here about /usr/local/lib, in general, overriding other selections. We should try to fix that. And we should get a more predictable CI environment. But we don't have to solve that tonight :) |
We don't have control over that. That file is there from the files that the GitHub actions CI gives us. The only thing we can do is remove them. Basically we say "run this on MacOS" and GitHub gives us a VM where we can add more things but where the stuff in |
@ned-deily Maybe you are referring to something different when you mention "And we should get a more predictable CI environment" but unfortunately this is what GitHub actions gives us as base. |
We could do some strategic |
Apparently CI image comes with a ton of stuff pre-installed and they seem to be a bit reticent to modify stuff :( For example: actions/virtual-environments#1088 |
They seem to be preinstalling all this: https://github.com/actions/virtual-environments/tree/main/images/macos/provision/core |
Ha, including our own Python 2.7 macOS installer, apparently. I'll try to take a look at what there's soon but not today, assuming the LDFLAGS workaround is successful. It should be. And we should also move to their macOS Big Sur 11 image soon since 12 Monterey will be released soon. Perhaps the Big Sur image isn't so crufty. |
LGTM, thanks for hacking away at this!
setup.py
Outdated
@@ -1936,6 +1936,7 @@ def detect_tkinter_fromenv(self): | |||
# The _TCLTK variables are created in the Makefile sharedmods target. | |||
tcltk_includes = os.environ.get('_TCLTK_INCLUDES') | |||
tcltk_libs = os.environ.get('_TCLTK_LIBS') | |||
print(tcltk_includes, tcltk_libs) |
This can come out now?
Yeah, is gone in the last force push (sorry for the noise)
https://bugs.python.org/issue45350
The text was updated successfully, but these errors were encountered: