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

The command for "Install Bonsol CLI, Risc0 Toolchain" does not work for x86_64-apple-darwin. #1

Open
june-in-exile opened this issue Dec 8, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@june-in-exile
Copy link

june-in-exile commented Dec 8, 2024

I tried following this tutorial but encountered an issue with the script for installing the Bonsol CLI.

The first problem was that the command cargo risczero install failed. After referring to the documentation here and changing the command to cargo risczero build-toolchain, the installation succeeded.

However, I was unable to resolve the second issue related to the command cargo install bonsol-cli --git https://github.com/anagrambuild/bonsol --features mac. The error messages are as follows:

   Compiling walkdir v2.5.0
   Compiling solana-rpc-client-api v1.18.22
   Compiling prost-derive v0.12.6
   Compiling solana-streamer v1.18.22
error: failed to run custom build command for `bonsol-schema v0.2.1 (/Users/jason/.cargo/git/checkouts/bonsol-8f7fbd4eaf931c69/5832e47/schemas-rust)`

Caused by:
  process didn't exit successfully: `/var/folders/fw/81r2124972j2gfx2kywkzhnm0000gn/T/cargo-install1IyfQA/release/build/bonsol-schema-c67d8504dd0191b0/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at schemas-rust/build.rs:46:10:
  Failed to execute flatc command: Os { code: 2, kind: NotFound, message: "No such file or directory" }
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `bonsol-cli v0.2.1 (https://github.com/anagrambuild/bonsol#5832e476)`, intermediate artifacts can be found at `/var/folders/fw/81r2124972j2gfx2kywkzhnm0000gn/T/cargo-install1IyfQA`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Did I miss something before running this command?

@june-in-exile june-in-exile changed the title The commnad for "Install Bonsol CLI, Risc0 Toolchain" does not work for x86_64-apple-darwin. The command for "Install Bonsol CLI, Risc0 Toolchain" does not work for x86_64-apple-darwin. Dec 8, 2024
@eureka-cpu
Copy link

Hey @june-in-exile!

Sorry to hear you're running into this issue. The problem is that recently the flatbuffers generated code was removed from the repository in favor of using a build.rs which checks if there are changes to the generated code and calls into flatc to generate it if so. To fix this issue you'll need to install flatbuffers so that the builder generates the rust bindings.

I've been working for a while on a solution for developers on the bonsol repository so that the only requirement of the user is nix, however that is currently only supported on x86_64-linux systems, but I plan on expanding it to support both x86 and aarch64 linux and darwin systems eventually 🙂

@eureka-cpu eureka-cpu added documentation Improvements or additions to documentation question Further information is requested labels Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants