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

Building 32-bit wheels on Raspberry Pi OS? #1626

Closed
David00 opened this issue Sep 25, 2023 · 4 comments
Closed

Building 32-bit wheels on Raspberry Pi OS? #1626

David00 opened this issue Sep 25, 2023 · 4 comments

Comments

@David00
Copy link

David00 commented Sep 25, 2023

Description

Howdy! I'm stuck and I'm looking for guidance. I've crawled through the docs and FAQ and can't seem to find an answer.

I'm trying to build wheels for my project using a fresh install of Raspberry Pi OS Lite (32-bit) on a new Raspberry Pi 4. My project includes a custom C extension which is why I'm targeting specific architectures.

Here is some information about the hardware and software on this Pi:

$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

$ uname -a
Linux buildpi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux

$ lscpu
Architecture:                    aarch64
Byte Order:                      Little Endian
CPU(s):                          4
On-line CPU(s) list:             0-3
Thread(s) per core:              1
Core(s) per socket:              4
Socket(s):                       1
Vendor ID:                       ARM
Model:                           3
Model name:                      Cortex-A72

$ pip freeze | grep cibuild
cibuildwheel==2.16.0

I am trying to build wheels for a project of mine which will be used exclusively on other Raspberry Pis - and most commonly on 32-bit Raspberry Pi OS installations. I thought it would be easiest to build wheels for my target system on a native 32 bit system, but I'm running into this issue:

$ cibuildwheel --platform linux --archs native
...
WARNING: The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/arm/v8) and no specific platform was requested

I don't see a specific platform available in the list of platform options (output of cibuildwheel --help). So, is it not possible to build wheels for a 32-bit ARM operating system using cibuildwheel? I know qemu can be used to build for different architectures than what the host is running, but even still, I don't see anything suggesting that building for arm32 is possible.

I installed numpy as a test so I could see what wheel Pip chose (since Numpy also uses C extensions):

Downloading https://www.piwheels.org/simple/numpy/numpy-1.25.2-cp39-cp39-linux_armv7l.whl

... so I suppose my target architecture should be armv7. I'll have to look into how Numpy creates their wheels.

Thanks!

Build log

No response

CI config

No response

@David00
Copy link
Author

David00 commented Sep 25, 2023

Well, despite all my searching, I did not see the following issue until after posting:
#1421

I'll leave my issue up for a little bit for discussion.

@joerick
Copy link
Contributor

joerick commented Sep 25, 2023

Since you're using Raspberry Pi OS, take a look at the Pi Wheels project. It automatically builds packages that have an sdist on PyPI and makes them available on an additional index.

@David00
Copy link
Author

David00 commented Oct 3, 2023

Thanks for the reference, @joerick. I unfortunately will not be releasing an sdist to the public for this project, so I'm looking for a 100% self-hosted option. It looks like I can run my own instance of Piwheels, so I'll start there!

@joerick
Copy link
Contributor

joerick commented Oct 4, 2023

No worries. Closing as duplicate of #1421

@joerick joerick closed this as completed Oct 4, 2023
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

2 participants