rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
97.6k stars 12.62k forks source link

Rust nightly fails to build on xous due to build failure in `unwinding` #131602

Open xobs opened 8 hours ago

xobs commented 8 hours ago

Recent versions of nightly now fail to build on some targets (e.g. xous) with the following error:

   Compiling unwinding v0.2.2
error[E0787]: the `asm!` macro is not allowed in naked functions
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/unwinding-0.2.2/src/unwinder/arch/riscv32.rs:197:9
    |
197 | /         asm!(
198 | |             "
199 | |             mv t0, sp
200 | |             add sp, sp, -0x90
...   |
212 | |             options(noreturn)
213 | |         );
    | |_________^ consider using the `naked_asm!` macro instead

For more information about this error, try `rustc --explain E0787`.
error: could not compile `unwinding` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
Error: Process completed with exit code 101.

This issue is reported as https://github.com/nbdd0121/unwinding/issues/38 and until this is merged and unwinding is updated to the new version, libstd will not be able to be built for riscv targets.

saethlin commented 4 hours ago

This build failure is in fact specific to xous, because only xous uses this third-party crate.