briansmith / ring

Safe, fast, small crypto using Rust
Other
3.64k stars 682 forks source link

Build error; unexpected exit of custom task #2104

Closed IngwiePhoenix closed 2 weeks ago

IngwiePhoenix commented 2 weeks ago

Hello there!

I am trying to build Narrowlink on my RISC-V board (VisionFive2) and one of it's dependencies is Ring. During the build, the following occurs:

error: failed to run custom build command for `ring v0.16.20`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installpD4oLw/release/build/ring-9d467882da7afec8/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.16.20/build.rs:358:10:
  called `Option::unwrap()` on a `None` value
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:645:5
     1: core::panicking::panic_fmt
               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:72:14
     2: core::panicking::panic
               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:144:5
     3: core::option::Option<T>::unwrap
               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/option.rs:931:21
     4: build_script_build::build_c_code
               at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.16.20/build.rs:352:34
     5: build_script_build::ring_build_rs_main
               at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.16.20/build.rs:279:5
     6: build_script_build::main
               at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.16.20/build.rs:240:13
     7: core::ops::function::FnOnce::call_once
               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:250:5
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

If I am not entirely mistaken, that error should correspond to this:

https://github.com/briansmith/ring/blob/b/0.16/build.rs#L352-L358

Is there anything I can do to fix this issue?

Thank you and kind regards, Ingwie

IngwiePhoenix commented 2 weeks ago

Ah, forgot this:

root@riscboi ~# rustc --version
rustc 1.76.0 (07dca489a 2024-02-04)
root@riscboi ~# cargo --version
cargo 1.76.0 (c84b36747 2024-01-18)
root@riscboi ~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux trixie/sid"
NAME="Debian GNU/Linux"
VERSION_CODENAME=trixie
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
briansmith commented 2 weeks ago

Narrowlink on my RISC-V board

RISC-V is supported in ring 0.17.x but not in 0.16.x.