Closed OFUZORCHUKWUEMEKE closed 2 days ago
This is my cargo.toml file
[lib]
crate-type = ["cdylib", "lib"]
name = "nonce"
[features]
default = []
cpi = ["no-entrypoint"]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
idl-build = ["anchor-lang/idl-build","anchor-spl/idl-build"]
[dependencies]
anchor-lang = {version="0.30.1",features=["init-if-needed"]}
anchor-spl={version="0.30.1",features=["associated_token"]}
pyth-solana-receiver-sdk = "0.3.2"
[dev-dependencies]
litesvm = "0.3.0"
When I run anchor build I get this error
error: failed to run custom build command for `solana-svm v2.0.18`
Caused by:
process didn't exit successfully: `/workspace/Nonce-Protocol/target/debug/build/solana-svm-4e39e572dde50176/build-script-build` (exit status: 101)
--- stdout
cargo:rustc-cfg=RUSTC_WITH_SPECIALIZATION
cargo:rerun-if-changed=proto/context.proto
cargo:rerun-if-changed=proto/invoke.proto
cargo:rerun-if-changed=proto/sysvar.proto
cargo:rerun-if-changed=proto/txn.proto
--- stderr
thread 'main' panicked at /workspace/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prost-build-0.11.9/src/lib.rs:1457:10:
Could not find `protoc` installation and this build crate cannot proceed without
this knowledge. If `protoc` is installed and this crate had trouble finding
it, you can set the `PROTOC` environment variable with the specific path to your
installed `protoc` binary.If you're on debian, try `apt-get install protobuf-compiler` or download it from https://github.com/protocolbuffers/protobuf/releases
For more information: https://docs.rs/prost-build/#sourcing-protoc
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
Error: Building IDL failed
You need to execute: sudo apt-get install protobuf-compiler
And after you need to use git for now if you want to use 2.1.
[lib]
crate-type = ["cdylib", "lib"]
name = "nonce"
[features]
default = []
cpi = ["no-entrypoint"]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
idl-build = ["anchor-lang/idl-build","anchor-spl/idl-build"]
[dependencies]
anchor-lang = {version="0.30.1",features=["init-if-needed"]}
anchor-spl={version="0.30.1",features=["associated_token"]}
pyth-solana-receiver-sdk = "0.3.2"
[dev-dependencies]
litesvm = "0.3.0" #or { git = "https://github.com/LiteSVM/litesvm" }
solana-sdk = "2.0" #or "2.1"
Fixed !!! , Thank You very Much. I love LiteSVM , great work guys. Thank You
Please what version of solana-program and solana-sdk does litesvm support . Im getting a build error when i run anchor build .