Repository navigation
std doesn't compile for riscv32gc-unknown-linux-gnu #164694
Copy link
Copy link
Closed
Labels
-Zbuild-stdUnstable cargo option: -Zbuild-stdUnstable cargo option: -Zbuild-stdC-bugCategory: This is a bug.Category: This is a bug.O-riscvTarget: RISC-V architectureTarget: RISC-V architecture
Description
One of the recent Nightly updates has broken std for riscv32gc-unknown-linux-gnu. Using -Z build-std results in the following compilation errors:
error[E0425]: cannot find value `SYS_futex` in crate `libc`
--> /home/newpavlov/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/sync/futex/unix.rs:64:31
|
64 | libc::SYS_futex,
| ^^^^^^^^^ not found in `libc`
|
note: similarly named constant `SYS_fstat` defined here
--> /home/newpavlov/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.191/src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs:446:1
|
446 | pub const SYS_fstat: c_long = 80;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: a constant with a similar name exists
|
64 - libc::SYS_futex,
64 + libc::SYS_fstat,
|
error[E0425]: cannot find value `SYS_futex` in crate `libc`
--> /home/newpavlov/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/sync/futex/unix.rs:97:34
|
97 | unsafe { libc::syscall(libc::SYS_futex, ptr, op, 1) > 0 }
| ^^^^^^^^^ not found in `libc`
|
note: similarly named constant `SYS_fstat` defined here
--> /home/newpavlov/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.191/src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs:446:1
|
446 | pub const SYS_fstat: c_long = 80;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: a constant with a similar name exists
|
97 - unsafe { libc::syscall(libc::SYS_futex, ptr, op, 1) > 0 }
97 + unsafe { libc::syscall(libc::SYS_fstat, ptr, op, 1) > 0 }
|
error[E0425]: cannot find value `SYS_futex` in crate `libc`
--> /home/newpavlov/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/sync/futex/unix.rs:106:29
|
106 | libc::syscall(libc::SYS_futex, ptr, op, i32::MAX);
| ^^^^^^^^^ not found in `libc`
|
note: similarly named constant `SYS_fstat` defined here
--> /home/newpavlov/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.191/src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs:446:1
|
446 | pub const SYS_fstat: c_long = 80;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: a constant with a similar name exists
|
106 - libc::syscall(libc::SYS_futex, ptr, op, i32::MAX);
106 + libc::syscall(libc::SYS_fstat, ptr, op, i32::MAX);
|
Previously there was a similar issue: #143440
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
-Zbuild-stdUnstable cargo option: -Zbuild-stdUnstable cargo option: -Zbuild-stdC-bugCategory: This is a bug.Category: This is a bug.O-riscvTarget: RISC-V architectureTarget: RISC-V architecture
Activity
maya-qorsa commentedon Oct 22, 2026
@rustbot claim
EDIT: whoops meant to do this with my personal account @TechnoPorg so I'm not interacting on here with multiple accounts
tgross35 commentedon Oct 22, 2026
Fyi this target has no maintainers, if somebody is building on the regular than it could use some help...
Rollup merge of rust-lang#164748 - TechnoPorg:64-bit-futex, r=tgross35
Rollup merge of rust-lang#164748 - TechnoPorg:64-bit-futex, r=tgross35
Rollup merge of rust-lang#164748 - TechnoPorg:64-bit-futex, r=tgross35
Auto merge of #164748 - TechnoPorg:64-bit-futex, r=tgross35
CI: fix `sha2` build on `riscv32` (#937)
Rollup merge of rust-lang#164748 - TechnoPorg:64-bit-futex, r=tgross35
Unrolled build for #164748 in rollup 164826
Rollup merge of #164748 - TechnoPorg:64-bit-futex, r=tgross35