Skip to content

Conversation

ffgan
Copy link

@ffgan ffgan commented Aug 13, 2025

PyPI recently added support for RISC-V, so we might consider adding support for RISC-V64.

Below are the CI results:
CFFI CI

The results are generally well presented.

Other Info
Co-authored by: [email protected];

@ffgan
Copy link
Author

ffgan commented Sep 24, 2025

hi @ngoldbaum , Could you please help to check this PR? If there is anything that needs to be modified, please feel free to contact me.

@ngoldbaum
Copy link
Contributor

I'm not a maintainer of this repo - I've just been making a lot of contributions lately. The pace of this project is slow so I would try to have some patience for reviewer attention.

@mattip
Copy link
Contributor

mattip commented Sep 24, 2025

Could you point to a project that is releasing RISC-V wheels on PyPI? As far as I can tell, neither NumPy nor Cryptography have uploaded RISC-V wheels.

@ffgan
Copy link
Author

ffgan commented Sep 25, 2025

Could you point to a project that is releasing RISC-V wheels on PyPI? As far as I can tell, neither NumPy nor Cryptography have uploaded RISC-V wheels.

sure. here are some project

coveragepy
wrapt
lxml

@ffgan
Copy link
Author

ffgan commented Sep 25, 2025

Could you point to a project that is releasing RISC-V wheels on PyPI? As far as I can tell, neither NumPy nor Cryptography have uploaded RISC-V wheels.

In fact, I am trying to add rv64 support to numpy and cryptography that you mentioned, but these two are more troublesome and it is not appropriate to mention them here. If you are interested, please feel free to contact me.

@mattip
Copy link
Contributor

mattip commented Sep 25, 2025

Typically, we try to support earlier versions of manylinux. Currently we are producing manylinux2014_manylinux_2_17 wheels. The CI run you point to creates manylinux_2_38_riscv64.manylinux_2_39_riscv64 wheels. Is that generally useful to the RISC-V community? Looking at the pep 600 compatibility page it seems that supports openeuler 24.03 and later. But debian has support for RISC-V from 2.27, is that not commonly used?

@ffgan
Copy link
Author

ffgan commented Sep 25, 2025

Oh no, my oversight. This issue is quite troublesome to handle.

cffi uses cibuildwheel to build wheels. cibuildwheel uses images from https://github.com/pypa/manylinux, where the riscv64(rv64) images for manylinux only have manylinux_2_39 available.

During the final repair stage of wheel building, it determines the minimum usable platform for the wheel. In the CI link I provided, it was determined to be manylinux_2_38, meaning only systems with glibc>=2_38 can use pip install to install this wheel.

This is likely related to the build process using higher version glibc interfaces or methods, resulting in poor compatibility.

I just submitted a PR yesterday to manylinux for an Ubuntu 22 + rv64, manylinux_2_35 build image. You can check the details here.

I observed that Ubuntu 22 Ubuntu 20.04 should be the lowest Ubuntu distribution that provides rv64 support - earlier versions don't have rv64 support. As for the Debian support from 2.27 that you mentioned, I haven't researched the rv64 situation for Debian yet. If I remember correctly, Debian 13 was the first to officially provide rv64 support.

@markdryan
Copy link

markdryan commented Sep 30, 2025

Typically, we try to support earlier versions of manylinux. Currently we are producing manylinux2014_manylinux_2_17 wheels. The CI run you point to creates manylinux_2_38_riscv64.manylinux_2_39_riscv64 wheels. Is that generally useful to the RISC-V community? Looking at the pep 600 compatibility page it seems that supports openeuler 24.03 and later. But debian has support for RISC-V from 2.27, is that not commonly used?

Almost all current manylinux images are derived from redhat compatible distros. The manylinux_2_39_riscv64 image is based on RockyLinux 10 which was the first redhat compatible distro to produce a stable release for riscv64. As such, we're unlikely to get an older manylinux image for riscv64 as there are no suitable older distros available on which to base it.

manylinux_2_39_riscv64 wheels will run on Ubuntu 24.04 and RockyLinux10. riscv64 users usually run fairly recent distros in order to take advantage of kernel and compiler support for newly ratified extensions. For example, if you want to compile and run applications that use the RISC-V vector extension you need at least gcc-14 and a 6.9 kernel.

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.

4 participants