Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tonic fails to build on Starfive VisionFive 2 risc-v SBC #1303

Closed
omac777 opened this issue Mar 5, 2023 · 4 comments
Closed

tonic fails to build on Starfive VisionFive 2 risc-v SBC #1303

omac777 opened this issue Mar 5, 2023 · 4 comments

Comments

@omac777
Copy link

omac777 commented Mar 5, 2023

Here's my environment:


cargo --version --verbose --verbose
cargo 1.69.0-nightly (9880b408a 2023-02-28)
release: 1.69.0-nightly
commit-hash: 9880b408a3af50c08fab3dbf4aa2a972df71e951
commit-date: 2023-02-28
host: riscv64gc-unknown-linux-gnu
libgit2: 1.5.0 (sys:0.16.0 vendored)
libcurl: 7.86.0-DEV (sys:0.4.59+curl-7.86.0 vendored ssl:OpenSSL/1.1.1q)
os: Fedora 38.0.0 [64-bit]

Here are the steps to reproduced on the VF2:

  1. SCCACHE can't be installed on the VF2 for the very same error as well. LOL. To circumvent that I did the following to prevent from using SCCACHE:
export RUSTC_WRAPPER=
  1. The usual steps to build:
git clone https://github.com/hyperium/tonic.git
cd tonic/
RUSTFLAGS=-Awarnings cargo +nightly build --release

Here's there error:

  process didn't exit successfully: `/home/davidm/tonic/target/release/build/ring-5f8495bbdf7f7ee0/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/davidm/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/build.rs:358:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@omac777
Copy link
Author

omac777 commented Mar 5, 2023

I think it has been resolved here: briansmith/ring#1574
but it hasn't been reviewed and merged yet.
There was another alternative, that might be used but it also hasn't been reviewed nor merged.

@LucioFranco
Copy link
Member

If you don't enable TLS then you shouldn't be building ring and it should work?

@LucioFranco
Copy link
Member

via the feature flags that is

@omac777
Copy link
Author

omac777 commented Sep 15, 2024

I just wanted to report successfully building tonic on Starfive VisionFive 2 riscv64 SBC using Fedora OS 41
https://dl.fedoraproject.org/pub/alt/risc-v/disk_images/Fedora-40/VisionFive2/20240903.n.0/
started with f40 on nvme, then tweaked the koji repo to f41, upgraded and used
and a specific cargo nightly version.
More information about the fedora riscv can be found in this forum and they have an excellent search capability there as well: https://app.cinny.in/home/%23riscv%3Afedoraproject.org

riscv@f40-vf2-saratoga:~/tonic/examples$ cat /etc/os-release 
NAME="Fedora Linux"
VERSION="41 (Server Edition Prerelease)"
ID=fedora
VERSION_ID=41
VERSION_CODENAME=""
PLATFORM_ID="platform:f41"
PRETTY_NAME="Fedora Linux 41 (Server Edition Prerelease)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:41"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=rawhide
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=rawhide
SUPPORT_END=2025-05-13
VARIANT="Server Edition"
VARIANT_ID=server
riscv@f40-vf2-saratoga:~/tonic/examples$ uname -a
Linux f40-vf2-saratoga 6.11.0-0.rc7.56.0.riscv64.fc41.riscv64 #1 SMP PREEMPT_DYNAMIC Mon Sep  9 12:03:16 EDT 2024 riscv64 GNU/Linux
riscv@f40-vf2-saratoga:~/tonic/examples$ 


riscv@f40-vf2-saratoga:~/tonic/examples$ rustc --version --verbose
rustc 1.82.0-nightly (506052d49 2024-08-16)
binary: rustc
commit-hash: 506052d49d3903ea554e4ce760cc53610cff4ef5
commit-date: 2024-08-16
host: riscv64gc-unknown-linux-gnu
release: 1.82.0-nightly
LLVM version: 19.1.0
riscv@f40-vf2-saratoga:~/tonic/examples$ cargo --version --verbose
cargo 1.82.0-nightly (2f738d617 2024-08-13)
release: 1.82.0-nightly
commit-hash: 2f738d617c6ead388f899802dd1a7fd66858a691
commit-date: 2024-08-13
host: riscv64gc-unknown-linux-gnu
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.9.0-DEV (sys:0.4.74+curl-8.9.0 vendored ssl:OpenSSL/1.1.1w)
ssl: OpenSSL 1.1.1w  11 Sep 2023
os: Fedora 41.0.0 [64-bit]


root@f40-vf2-saratoga:/home/riscv/tonic/examples# history|grep dnf
dnf install git
dnf install @"C Development Tools and Libraries" 
dnf install clang clang-tools-extra
dnf install lld
dnf install emacs-nox
dnf install glib-devel
dnf install glib-devel
dnf install glib2-devel
dnf install gdk-pixbuf2-devel
dnf install pango-devel
dnf install cairo-gobject-devel
dnf install gtk4-devel
dnf install screen
dnf install sqlite-devel
time dnf upgrade --best --allowerasing
dnf install protobuf-devel

time cargo +nightly build --bin routeguide-server --release --verbose

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants