-
Notifications
You must be signed in to change notification settings - Fork 219
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
Cross-compile builds #1125
Comments
For the other archs, you can use I just tested this:
The output of the last two
Instead of using |
Since opening this issue I discovered cibuildwheel and how to use QEMU with manylinux, but as you mentioned it is very very slow. I think cross-compilation would still be more ideal. |
There are some discussions in cibuildwheel's issues. One problem is setuptools isn't designed to do cross compilation. At some point, probably shortly after the 2.0 release of cibuildwheel, someone will likely look into some sort of feature or recipe for it - cross compiling then testing with QEMU would be fantastic. I agree, it's 6x slower or something like that to build in emulation. |
Cibuildwheel's new config mode (in the latest alpha, 2.0.0a3) makes splitting between CI providers much simpler, you can put most of the config in pyproject.toml now. ;) |
I've built https://github.com/messense/manylinux-cross , it's been used in https://github.com/messense/maturin-action , although it only has very old GCC 4.8.5 and 6.5.0. |
FYI: I wrote a document about how to use the manylinux ARM image doing cross-compiling: And an Azure Devops pipeline: https://github.com/microsoft/onnxruntime/blob/rel-1.7.0/tools/ci_build/github/azure-pipelines/templates/py-packaging-stage.yml#L970 It has one major restriction that I must static link to GCC libraries, because I used a different version of GCC other than the default one(GCC 4.8) in manylinux2014. |
Sorry if this is a duplicate of anything that has been requested or noted before. Please close this if that is the case.
Manylinux makes compiling for many linuxes very simple. However, it does not make it super simple to make wheels available for aarch64 and other non-x86 platforms. To build for another platform currently requires either:
Cross-compiling is difficult, but manylinux could provide a very simple end-user solution to developers who just want to make working wheels without the hassle. If users could compile for i686, ARM, and PPC from additional x86_64 Docker images, then it would be much easier to support these platforms. And as noted before, in most cases the readily available x86_64 runners are much more powerful than the ARM runners, so they build faster. Additionally, whenever a new platform becomes popular (inevitable with ARM) it will be trivial for an end-user to begin producing wheels for it.
The only caveat is that running tests on the cross-compiled wheels would still not be possible, but this still seems like a net-positive.
The text was updated successfully, but these errors were encountered: