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

arm32 / armv7l wheels #1421

Open
modem7 opened this issue Feb 22, 2023 · 7 comments
Open

arm32 / armv7l wheels #1421

modem7 opened this issue Feb 22, 2023 · 7 comments

Comments

@modem7
Copy link

modem7 commented Feb 22, 2023

Description

Is there a way to build for arm32v7?

I looked at the documentation, but I could only see references to arm64.

Specifically, I'm looking to build for arm32 on alpine, with Python 3.11.

Thanks in advance!

@henryiii
Copy link
Contributor

There's no manylinux image for arm32v7, so no. You can see the discussion in pypa/manylinux#1405. I think the main problem is there isn't an upstream distribution of the base images for manylinux for armv7. But I haven't looked into it.

The piwheels project builds wheels for armv7, but they probably don't work across other OSs, especially not a musl-based one. Actually, I wonder if supporting armv7 only in musllinux would be easier...

@bigcat88
Copy link
Contributor

Even ability to build only musllinux_1_2_armv7l tag will be a great option (Alpine 3.13+) for me.

@Czaki
Copy link
Contributor

Czaki commented Feb 23, 2023

We understand, but it requires someone who will maintain a proper docker image. And such maintenance is out of the scope of cibuildwheel (we depend here on manylinux).

If you could provide such a contribution to manylinux or in another place that could promise maintenance then adding support to cibuildwheel should not be a problem.

@henryiii
Copy link
Contributor

If alpine has a armv7 build, it might be an easy contribution to make to manylinux (musllinux lives in the pypa/manylinux repo).

@modem7
Copy link
Author

modem7 commented Feb 23, 2023

If alpine has a armv7 build, it might be an easy contribution to make to manylinux (musllinux lives in the pypa/manylinux repo).

It certainly does!

V6 and V7 (alongside 386, s390x and their 64bit brethren (like v8) also).

@mayeut
Copy link
Member

mayeut commented Feb 26, 2023

I had quick look at adding armv7l to musllinux_1_1 in pypa/manylinux#1455.
While the image could probably be built in 32-bit mode on AWS graviton with travis-ci, uname -m reports armv8l rather than armv7l which might have undesirable side-effects, mostly, python will probably label wheels as armv8l rather than armv7l (not tested). Building an image with qemu is a no-go.

If you're aiming at building executables rather than a python extension, you most likely can build it using a python:3.11-alpine image (https://github.com/mayeut/patchelf-pypi uses this trick to build statically linked executable of patchelf that works on musllinux/manylinux with a single build). You can cheat your way into building armv7l executables this way (cibuildwheel does not check the architecture - yet ? - so you can use an armv7 image as an option to musllinux-x86_64-image, #1409 might be relevant to ease setup for armv7 while not providing a default image).

If this does not apply for your use-case, as mentioned by @henryiii, I invite you to comment on pypa/manylinux#1405.

@joerick joerick changed the title arm32 arm32 / armv7l wheels Oct 4, 2023
@bjia56
Copy link

bjia56 commented Jan 29, 2024

I have a container image for building armv7l wheels, inspired by the contents of existing manylinux images: https://github.com/bjia56/armv7l-wheel-builder

This image was originally built to fill the gap of what cibuildwheel can support, since the projects I worked on required supporting 32bit raspberry pi. While I can't promise long term support to offer it up as a cibuildwheel option, perhaps folks here might find it useful.

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

No branches or pull requests

6 participants