-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Add wheel support for aarch64 #74
Conversation
hey @asottile you think this is the best/most viable way forward for now? |
as far as I understand, the arm manylinux discussion stalled: pypa/manylinux#84 so even if there are images for it, there's no spec for it outside x86 / x64 so while this'll produce arm wheels, and they may be uploadable to pypi, they may be unusable on actual arm platforms due to the lack of an actual specced set of supported symbols / processor features (then again, my reading of the linked issue is cursory and admittedly I didn't take time to read into the finer points, and I don't know the first thing about alternative arm architectures beyond what aws provides) |
@asottile this PR adds only aarch64[ARMv8] support and pip version>=19.3 started supporting aarch64 and it is able to download ARMv8 architecture specific wheels. Please have a look at below logs- root@5b2602200e8b:/# pip3 --version |
@odidev please read the lines directly after that in my message |
Hi @asottile, I went through your comment and I understood that you are concerned that argon2-cffi might not be supported for aarch64. Please correct me if I am wrong. If I am correct, please suggest if there is a method by which we can test if this package is supported on aarch64. Thanks in advance. |
ok well I don't think you're understanding the nuances of another architecture even if a package builds correctly on one processor of aarch64, it does not mean that it will successfully run on other aarch64 processors or even a majority of aarch64 processors for x86 / x64, a lot of work has gone into standardizing what symbols and processor features are allowed to be used in a binary artifact -- no such standardization has been done for other architectures in manylinux. as such, while a wheel can be built that carries an installable tag, there is no guarantee that it will actually function on all or a majority of processors carrying that tag. for example, the extension may take advantage of processor extensions that are only available in a particular concrete processor that's being targetted that won't be available elsewhere -- some of these may be compiled in via the compiler itself so while it may build and may run on a particular aarch64, uploading a manylinux wheel for it may not be the best idea because manylinux for non x86/x64 is currently the wild wild west in terms of certified compatibility |
Hi @asottile (I work with @odidev) I think I understand your concern: If we build for one version of the AArch64 specification, how can we be confident it will run on the others? Manylinux2014 specifies the environment that must be present to build a native wheel. It includes the OS, and the version of GCC and Glibc: CentOS7, GCC 4.8.(0,5), GlibC (2.17). There is a more detailed discussion of these requirements on this thread: By specifying CentOS7, Manylinux2014 effectively ensures that the wheel is built against the AArch64 v8.0 specification. All AArch64 platforms in the v8 series (and Glibc) maintain backward compatibility with v8.0 so a binary built for v8.0 can run on any v8 platform. Does that help? |
I understand all of that, and if you read the thread linked above there has been no standardization of the allowable symbols or instructions on architectures outside of the x86/x64 architectures. Additionally if you read, there's additional concerns about using an operating system distribution, libc, and compiler which were released before aarch64 processors were practically available. And lastly, no one has stepped up (in fact there's been people who have stepped down!) to try and standardize and validate aarch64 as a manylinux-viable target architecture. A lot of work went into that and vetting particular compiler features, available symbols, instructions, and target processors etc. for x86/x64 and none of that work has even been scoped or started for alternate architectures in the python community. I feel like a broken record here, please review the previous messages I've sent and please read the manylinux thread linked above in its entirety. I'm going to unsubscribe from this thread because I feel like you're not listening to my concerns or doing the research necessary. If you need me please @-mention me. |
OK to be clear, we won't ship wheels, until pypa/manylinux#84 is fixed. Shipping something that is not fully specced/standardized would just mean more bug reports that are undebugable and inscrutable. I will leave this open because I absolutely hope that we can ship them eventually. But until there's no standard, I cannot justify shipping something on PyPI. Please add new comments only if you have something new to contribute. |
FYI PyPA now ships manylinux wheels for 2014 and 2_24 tags that have AARCH64. pyca/cryptography even uses those. I don't think other problems raised in that issue should be waited for. |
Are there any best practices/docs somewhere to be found? |
@hynek : Depending on what you're looking for: I have accumulated methods to build aarch64 wheels here: https://github.com/ARM-software/developer/blob/master/projects/python-wheels/multi-platform.md Circle-CI now have a preview AArch64 builder: https://github.com/CircleCI-Public/arm-preview-docs/blob/main/README.md - this may be the path of least resistance? |
I'm not aware of any but I really like how PyCA does this. I followed their example and created a bunch of base containers with the build deps that I then use for building wheels (example: https://github.com/ansible/pylibssh/actions/runs/625397435/workflow). Those containers are published to GitHub Container Registry. For non-x86 envs, it's quite easy to set up QEMU with something like |
I strongly recommend building the base images separately because it takes an hour under QEMU, this will crucially improve the wheel build time. If you'll only keep |
e688606
to
cb0248d
Compare
AARCH64 support for Linux will be provided by https://github.com/hynek/argon2-cffi-bindings that this project will depend on from the next release on. Please check https://pypi.org/project/argon2-cffi-bindings/#files if those wheels are installable for you. If you feel generous, running the current main branch on your target arch would work too. |
@hynek aarch64 support sounds great, thanks for your continuous effort! Out of curiosity: Could you explain the reasoning behind splitting the package up into |
The bindings rarely change, but are a PITA to package and release. I hope it also encourages more contributions to argon2-Cffi and removes some resistance for me to publish new releases. finally it might be useful to others trying to play with argon2. There’s a been at least two packages but they’ve stalled and I suspect it’s because of compiler shenanigans. Unrelatedly, universal2 wheels are almost done! |
@hynek why did you keep the leading underscore? One would expect it to be public API since it's a top-level package. It seems counterintuitive to have it in a separate package for people to consume while the package name says the opposite. |
As I write in https://github.com/hynek/argon2-cffi-bindings#python-api, I consider it an implementation detail both for me and potential other users. I don't want user accidentally poke around in a module |
Ah, I missed that. Thanks for the explanation. I thought maybe it was a mistake :) |
Last call for everyone running |
This command installs
|
Installing Here are the excerpts, let me know if more info is needed.
|
Alright, hang on, argon2-cffi 21.2.0 will hit PyPI sometime next week. |
Added wheel support for aarch64.
Related to #73. @hynek Could you please review the changes.