Skip to content

Add riscv64 to Linux wheel build matrix#9463

Open
gounthar wants to merge 4 commits intopython-pillow:mainfrom
gounthar:feat/riscv64-wheels
Open

Add riscv64 to Linux wheel build matrix#9463
gounthar wants to merge 4 commits intopython-pillow:mainfrom
gounthar:feat/riscv64-wheels

Conversation

@gounthar
Copy link

@gounthar gounthar commented Mar 12, 2026

Fixes #9462.

Changes proposed in this pull request:

  • Add manylinux_2_28 riscv64 entry to build-native-wheels matrix in wheels.yml
  • Add QEMU setup step for riscv64 emulation on x86_64 runners
  • Build manylinux_2_28_riscv64 wheels via cibuildwheel + QEMU

Note: EXPECTED_DISTS may need updating once the exact wheel count is determined.

Evidence

Context

  • manylinux_2_28_riscv64 is available in pypa/manylinux
  • cibuildwheel 3.x supports riscv64 via QEMU
  • Several packages already ship riscv64 wheels: aiohttp, yarl, multidict, propcache
  • RISC-V hardware is shipping (SiFive, SpacemiT, Sophgo SG2044)

Add QEMU emulation for riscv64 and include manylinux_2_28 riscv64
entry in the build-native-wheels matrix.
@radarhere
Copy link
Member

Hi. At the moment, you've only added the QEMU step, you haven't actually changed the matrix.

As a word of warning, I expect that once you do update the matrix, this will take a very long time to build - #9462 (comment)

@radarhere radarhere changed the title feat: add riscv64 to Linux wheel build matrix Add riscv64 to Linux wheel build matrix Mar 12, 2026
@gounthar
Copy link
Author

gounthar commented Mar 12, 2026

@radarhere: oopsie; I'd added the QEMU step but forgot the matrix entry. Fixed in 7b026c6: added a manylinux_2_28 riscv64 entry scoped to cp3{12,13}-manylinux* only (2 wheels, as suggested in #9462 (comment)).

This should trigger a CI run. I expect it will either hit the libaom/RVV build error or the 6-hour timeout (or both). Either way, we'll have concrete data on what happens under QEMU, which will help decide whether to pursue the self-hosted runner path or close this.

@radarhere
Copy link
Member

radarhere commented Mar 12, 2026

Regarding the general test failures, they should be fixed by #9464

Regarding riscv64, it did fail to build libavif - https://github.com/python-pillow/Pillow/actions/runs/23025132993/job/66876973143?pr=9463#step:6:5045

I don't expect riscv64 to hit the 6 hour limit if you are only building two Python versions.

@gounthar
Copy link
Author

@radarhere Thanks for pointing to the libavif failure. I'll investigate the build log; it looks like it could be a libaom/RVV (RISC-V Vector) codegen issue in the cross-compilation path.

On the build time front: if QEMU overhead becomes a concern, https://cloud-v.co/ provides free native riscv64 GitHub Actions runners to open source projects. That would speed things up and give more representative results. But let me first focus on getting libavif to build (or not) under QEMU.
There's no point discussing runners if the build itself doesn't work yet. 🤷

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

Successfully merging this pull request may close these issues.

Add riscv64 (linux_riscv64) wheel to PyPI releases

2 participants