Skip to content
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

Ignore a libcrypto.dylib with the wrong architecture #84

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

camillol
Copy link

If you install Homebrew with arch -x86_64, you get a /usr/local/lib/libcrypto.dylib that the system Python can't load. We should ignore the resulting error and proceed without that library (which does not ship with the OS any more).

The error looks like:

OSError: cannot load library '/usr/local/lib/libcrypto.dylib': dlopen(/usr/local/lib/libcrypto.dylib, 0x0002): tried: '/usr/local/lib/libcrypto.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/lib/libcrypto.dylib' (no such file), '/usr/local/lib/libcrypto.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/usr/local/Cellar/openssl@3/3.3.1/lib/libcrypto.3.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/Cellar/openssl@3/3.3.1/lib/libcrypto.3.dylib' (no such file), '/usr/local/Cellar/openssl@3/3.3.1/lib/libcrypto.3.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))

@camillol
Copy link
Author

camillol commented Aug 27, 2024

Note that the arm64 version of Homebrew installs to /opt/homebrew instead. So we could also add support for looking for /opt/homebrew/lib/libcrypto.dylib, in addition to this change.

@camillol camillol changed the title Ignore a libcryto.dylib with the wrong architecture Ignore a libcrypto.dylib with the wrong architecture Aug 27, 2024
If you install Homebrew with arch -x86_64, you get a /usr/local/lib/libcrypto.dylib that the system Python can't load. We should ignore the resulting error and proceed without that library (which does not ship with the OS any more).

The error looks like:
    OSError: cannot load library '/usr/local/lib/libcrypto.dylib': dlopen(/usr/local/lib/libcrypto.dylib, 0x0002): tried: '/usr/local/lib/libcrypto.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/lib/libcrypto.dylib' (no such file), '/usr/local/lib/libcrypto.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/usr/local/Cellar/openssl@3/3.3.1/lib/libcrypto.3.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/Cellar/openssl@3/3.3.1/lib/libcrypto.3.dylib' (no such file), '/usr/local/Cellar/openssl@3/3.3.1/lib/libcrypto.3.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))
@camillol
Copy link
Author

The failing tests appear to be due to an expired certificate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant