Skip to content

Conversation

@Xeonacid
Copy link
Contributor

@Xeonacid Xeonacid commented Apr 4, 2025

riscv64 first get supported in auditwheel at manylinux_2_31. [1]

Use Linux 5.4 as the first LTS kernel version which has a working glibc userspace support.

Backport patches [2][3] to get glibc 2.31, binutils 2.40 and gcc 7.5.0 work together.

Although pypa/manylinux has not added riscv64 image yet[4], adding here makes maturin-action to work, and other apps like uv can make use of that to build riscv64 releases! This may become a booster for advancing pypa/manylinux!

[1] https://github.com/pypa/auditwheel/blob/8964d1e5e5daee875c324c2e0b73cc8f3e5af1c9/src/auditwheel/policy/manylinux-policy.json#L326
[2] crosstool-ng/crosstool-ng#2315
[3] crosstool-ng/crosstool-ng#2316
[4] pypa/manylinux#1426

@Xeonacid Xeonacid requested a review from messense as a code owner April 4, 2025 14:30
riscv64 first get supported in auditwheel at manylinux_2_31. [1]

Use Linux 5.4 as the first LTS kernel version which has a working glibc userspace support.

Backport patches [2][3] to get glibc 2.31, binutils 2.40 and gcc 7.5.0 work together.

Although pypa/manylinux has not added riscv64 image yet[4], adding here makes maturin-action to work, and other apps like uv can make use of that to build riscv64 releases!
This may become a booster for advancing pypa/manylinux!

[1] https://github.com/pypa/auditwheel/blob/8964d1e5e5daee875c324c2e0b73cc8f3e5af1c9/src/auditwheel/policy/manylinux-policy.json#L326
[2] crosstool-ng/crosstool-ng#2315
[3] crosstool-ng/crosstool-ng#2316
[4] pypa/manylinux#1426
@messense messense merged commit e437c5f into rust-cross:main Apr 5, 2025
@Xeonacid
Copy link
Contributor Author

Xeonacid commented Apr 5, 2025

Hi @messense, could you please release it to the Docker Hub? Thank you very much!

@Xeonacid Xeonacid deleted the riscv64 branch April 5, 2025 09:16
@messense
Copy link
Member

messense commented Apr 5, 2025

Do we need to add these patches in this repo before crosstool-ng release a new version? Quoting https://crosstool-ng.github.io/docs/configuration/

CT_TOP_DIR: The top directory where crosstool-NG is running. You shouldn’t need it in most cases. One case where you may need it is if you have local patches or config files and you store them in your current working directory, you can refer to them by using CT_TOP_DIR, such as: ${CT_TOP_DIR}/patches.myproject.

@messense
Copy link
Member

messense commented Apr 5, 2025

Hi @messense, could you please release it to the Docker Hub? Thank you very much!

https://github.com/rust-cross/manylinux-cross/actions/runs/14280472662

It's running, not sure whether it will succeed though.

TARGET_SYSROOT=/usr/riscv64-unknown-linux-gnu/riscv64-unknown-linux-gnu/sysroot/ \
TARGET_C_INCLUDE_PATH=/usr/riscv64-unknown-linux-gnu/riscv64-unknown-linux-gnu/sysroot/usr/include/

ENV CARGO_BUILD_TARGET=riscv64-unknown-linux-gnu
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just noticed, the rust target should be riscv64gc-unknown-linux-gnu?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 474db27

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just noticed, the rust target should be riscv64gc-unknown-linux-gnu?

Oops. Nice catch!

@Xeonacid
Copy link
Contributor Author

Xeonacid commented Apr 5, 2025

Do we need to add these patches in this repo before crosstool-ng release a new version? Quoting https://crosstool-ng.github.io/docs/configuration/

CT_TOP_DIR: The top directory where crosstool-NG is running. You shouldn’t need it in most cases. One case where you may need it is if you have local patches or config files and you store them in your current working directory, you can refer to them by using CT_TOP_DIR, such as: ${CT_TOP_DIR}/patches.myproject.

Thanks for the information. I'm new to the variable and will look into it. 🧐

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.

2 participants