Add riscv64 to Linux wheel build matrix by gounthar · Pull Request #9463 · python-pillow/Pillow

@gounthar

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)

@gounthar

Add QEMU emulation for riscv64 and include manylinux_2_28 riscv64
entry in the build-native-wheels matrix.

@radarhere

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

@gounthar

@gounthar

@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

@gounthar

@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. 🤷

@gounthar

@gounthar

@gounthar

Following up on the libavif/libaom failure. There is an active review on the aomedia Gerrit fixing RVV handling for specific block sizes in riscv64: https://aomedia-review.googlesource.com/c/aom/+/208401

Not sure yet if this is the exact issue we hit, but it is in the same area. I will rebase and re-run once it lands to see if it unblocks the build.