Skip to content

[BUG] No such file or directory #1569

Closed
@rakanalh

Description

@rakanalh

Bug Report

I am using Nixos. However, for the purpose of being able to build sovereign-sdk, and because this crate depends on rustup being present (nixos can install rust with nix-shell without rustup), i installed rustup and have a rusup installation of the rust toolchain.
Now, i have executed:

cargo binstall --force -y cargo-risczero && cargo risczero install

The latter step AFAIU would install a custom toolchain specifically for risc0. However, when trying to build the demo rollup in sovereign-sdk:

cargo build --bins
   Compiling sov-modules-api v0.3.0 (/home/rakan/Code/Rust/sovereign-sdk/module-system/sov-modules-api)
   Compiling risc0-circuit-recursion v0.19.1
   Compiling risc0 v0.3.0 (/home/rakan/Code/Rust/sovereign-sdk/examples/demo-rollup/provers/risc0)
error: failed to run custom build command for `risc0-circuit-recursion v0.19.1`

Caused by:
  process didn't exit successfully: `/home/rakan/Code/Rust/sovereign-sdk/target/debug/build/risc0-circuit-recursion-ed6dd89a50b932ab/build-script-build` (exit status: 101)
  --- stderr
  Downloading https://github.com/risc0/risc0/raw/505295b963c97db2afffe58f4b0cb4721e396b90/risc0/circuit/recursion/src/recursion_zkr.zip
  thread 'main' panicked at /home/rakan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/risc0-circuit-recursion-0.19.1/build.rs:72:51:
  called `Result::unwrap()` on an `Err` value: Download(/home/rakan/Code/Rust/sovereign-sdk/target/debug/build/risc0-circuit-recursion-5e3c417694435cf2/out/recursion_zkr.zip: (verification: unverified):
  )
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
sov-demo-prover-guest-celestia: Starting build for riscv32im-risc0-zkvm-elfild)
sov-demo-prover-guest-celestia: error: could not execute process `/home/rakan/.rustup/toolchains/risc0/bin/rustc -vV` (never executed)
sov-demo-prover-guest-celestia:
sov-demo-prover-guest-celestia: Caused by:
sov-demo-prover-guest-celestia:   No such file or directory (os error 2)
error: failed to run custom build command for `risc0 v0.3.0 (/home/rakan/Code/Rust/sovereign-sdk/examples/demo-rollup/provers/risc0)`

Caused by:
  process didn't exit successfully: `/home/rakan/Code/Rust/sovereign-sdk/target/debug/build/risc0-a19e980724198905/build-script-build` (exit status: 101)
  --- stdout
  Building guest package risc0.sov-demo-prover-guest-celestia
  cargo:rerun-if-env-changed=RISC0_SKIP_BUILD
  Using rustc: /home/rakan/.rustup/toolchains/risc0/bin/rustc
  cargo:rerun-if-env-changed=RISC0_RUST_SRC
  Building guest package: cargo build --target riscv32im-risc0-zkvm-elf
  cargo:rerun-if-env-changed=RISC0_BUILD_DEBUG

Which means that i do have a rustc compiler downloaded with cargo riskzero install.

➜ rustup toolchain list
stable-x86_64-unknown-linux-gnu (override)
risc0 (default)

The rustc binary, however, does not seem to execute:

➜ ls -l /home/rakan/.rustup/toolchains/risc0/bin/rustc
.rwxr-xr-x 17k rakan  8 Feb 22:17 /home/rakan/.rustup/toolchains/risc0/bin/rustc
➜ /home/rakan/.rustup/toolchains/risc0/bin/rustc
zsh: no such file or directory: /home/rakan/.rustup/toolchains/risc0/bin/rustc

Steps to Reproduce

  1. Using nixos, install rustup globally
  2. git clone https://github.com/Sovereign-Labs/sovereign-sdk.git
  3. cd examples/demo-rollup
  4. cargo build --bins (as in the readme)

Expected behavior

The rustc binary downloaded should run as expected.

Your Environment

  • risc0-zkvm version:
  • Rust version:
➜ rustc --version
rustc 1.76.0 (07dca489a 2024-02-04)
  • Platform/OS:
Linux nixos 6.1.81 #1-NixOS SMP PREEMPT_DYNAMIC Wed Mar  6 14:45:20 UTC 2024 x86_64 GNU/Linux

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions