[BUG] unix/cmath.rs does not exist
marijanp opened this issue · comments
Bug Report
When building rust-src for the riscv32im-risc0-zkvm-elf
target I get a file not found error due to this wrong path:
- master: https://github.com/rust-lang/rust/blob/ff24ef91fc848832a8dab483d3b17097cbead5a8/library/std/src/sys/pal/zkvm/mod.rs#L15
- tag 1.77.1: https://github.com/rust-lang/rust/blob/7cf61ebde7b22796c69757901dd346d0fe70bd97/library/std/src/sys/pal/zkvm/mod.rs#L15
cmath.rs
is not located in the unix
directory, rather in the sys
directory at the same level as pal
here:
- master : https://github.com/rust-lang/rust/blob/master/library/std/src/sys/cmath.rs
- tag 1.77.1: https://github.com/rust-lang/rust/tree/1.77.1/library/std/src/sys/cmath
Steps to Reproduce
- Fetch the template
- go to methods/guest
- run
cargo build -Z build-std --target riscv32im-risc0-zkvm-elf
error: couldn't read /nix/store/mhzd2fna42zfxdpdn0kr1zcnmrcck17p-rust-default-1.77.1/lib/rustlib/src/rust/library/std/src/sys/pal/zkvm/../unix/cmath.rs: No such file or directory (os error 2)
--> /nix/store/mhzd2fna42zfxdpdn0kr1zcnmrcck17p-rust-default-1.77.1/lib/rustlib/src/rust/library/std/src/sys/pal/zkvm/mod.rs:16:1
|
16 | pub mod cmath;
Expected behavior
Your Environment
- risc0-zkvm version: 0.21.0
- Rust version: 1.77.1
- Platform/OS: Linux
I craeted a PR, I wonder whether it would be better to remove all the relative paths rust-lang/rust#123858
Thanks for the report: I actually have a patch in my erik/risc0-1.77.1 branch that addresses this. I see you fixed the cmath thing but there's another one so I'll follow up with that
@SchmErik how do you keep track of regressions for the zkvm target?
we maintain a fork of the upstream rust repo and once upstream releases, I update our fork to build the rust binaries and deal with regressions then. There are much better way of finding regressions than my current process though. Since my patch got merged, I'm going to close this. Thanks for the report!