-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[bug] Error installing cryptography on Big Sur running on Apple Silicon #5291
Comments
Looks like as an initial matter this is a CFFI issue, in that it's trying to use a deprecated function from libffi I've ping'd the cffi maintainers about it. |
I hacked around this by modifying ffitarget_arm64.h to enable the legacy closure API:
Now CFFI builds and installs, but I see this error building cryptography ('openssl/opensslv.h' file not found):
|
The new error is because you need to build a copy of OpenSSL and provide the path to it for cryptography to link against. We don't include it or build it as part of the compile process. To keep going down this path you'll probably want to take a look at openssl/openssl#12254, but after that patch run these commands (pick a valid path for that ossl dir of course):
That will give you a
|
Thanks for the detailed response! I've got openssl 1.1.1 stable patched and building under arm64. But when I try to build cryptography (specifying my installed openssl), I get this error (even after updating to the latest pip3):
|
Oops that’s an old flag. You can drop it entirely for your purposes since no wheel is currently available. |
Thanks. After futzing around a bit, I got cryptography to build. But when I tried to install conan, it wanted to rebuild cryptography again, and I got the same error. So I passed the same options to the conan install command, hoping that only cryptography would actually be built (or that it would be harmless to provide the openssl link and include options to other packages that might be built):
This worked! I now have conan installed, which is great. Thanks again for your help with this work around. |
Glad it works! I'm going to close this for now since there's not much we can do here until a Mac with Apple Silicon is actually available (and it'll be a pain to do things with that until such time as a CI service bites the bullet and buys a huge pile of them). |
Environment Details:
Operating System+version: macOS Big Sur 11.0 Beta (20A5299w) on Apple A12Z Bionic
Compiler+version: Apple clang version 12.0.0 (clang-1200.0.22.19)
Python version: 3.8.2
Steps to reproduce:
sudo pip3 install cryptography
Logs:
The problem is a compile error building "cryptography". Here's the build log (search below for 'error:' without quotes):
The text was updated successfully, but these errors were encountered: