Homebrew + Apple Silicon + OpenSSL 1.1/3 + Python compile issues #5508
Unanswered
nickwilliams-zaxiom
asked this question in
Tap maintenance and brew development
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Output of
brew config
Output of
brew doctor
Description of issue
Note 1: I can reliably reproduce this issue on my Apple Silicon MacBook Pro running Sonoma 14.5 and Xcode 15.4. I can reliably not reproduce this issue on my Intel MacBook Pro running Sonomal 14.5 and Xcode 15.4. It's possible that the problem is actually directory paths and not Apple vs. Intel, because for some reason Homebrew stuff is installed at /opt/homebrew on my Apple Silicon machine and at /usr/local on my Intel machine (which had Homebrew installed 3 years before the Apple Silicon machine).
Note 2: This might not be the correct place for this. I have no idea if this is a Homebrew bug, a pyenv formulae bug, or an outright pyenv bug. Apologies if I have put this in the wrong place.
Background: Because of the work I do, there are conflicts with using OpenSSL 3 + Python on my machine. When I'm in my development environment, if Python is linked against OpenSSL 3, I can't import the Python
ssl
module because of conflicts with a dev-environment compilation of OpenSSL 3 that is earlier on the dev-environment path. As such, I have a need to compile Python against OpenSSL 1.1 so that I can use Python in my development environment. And that's how I discovered this problem...I have this exported so that, whenever pyenv builds Python, it explicitly links against formulae
[email protected]
instead of defaulting toopenssl@3
:This works fine on my Intel machine. It does not work (on its own) on my Apple Silicon machine. The tl;dr is that the command results in a Python installation where
_ssl.OPENSSL_VERSION
reports 1.1.1w on my Intel machine, but on my Apple Silicon machine causes compile "errors" about_ssl
not being importable and so being removed from the Python installation, and yet when I use that Python installation I can import_ssl
, but_ssl.OPENSSL_VERSION
reports 3.3.1:However, this command on my Apple Silicon machine results in
_ssl.OPENSSL_VERSION
reporting 1.1.1.w:To get more detailed, here are some relevant excerpts from the logs on the Apple Silicon machine without setting the environment variables:
Based on that output, I would expect that I would not be able to import
_ssl
. However, I can, just with unexpected results:There is no log output that states that
_ssl
got recompiled against theopenssl@3
formulae, but somehow it did.With the two environment variables, the "renaming" and "but were removed" sections go away, and:
And, again, I don't need those environment variables on my Intel machine. It "just works" and reports OpenSSL 1.1.1.w.
In all the trial and error, I have lost my original full build logs; however, if the problem cannot be easily seen from the information I provided, I can uninstall these Python versions from pyenv and reinstall the various ways in order to capture full build logs.
Beta Was this translation helpful? Give feedback.
All reactions