Both anchor build
and cargo-build-sbf
throw:
Warning: cargo-build-bpf is deprecated. Please, use cargo-build-sbfcargo-build-bpf child: /Users/usr1/solana/bin/cargo-build-sbf --arch bpferror: package `solana-program v1.16.4` cannot be built because it requires rustc 1.68.0 or newer, while the currently active rustc version is 1.62.0-dev
cargo build
actually works, but it does not produce deploy directory.
But apparently I do have the rust version:
rustc -Vrustc 1.69.0 (84c898d65 2023-04-16)cargo-build-sbferror: package `solana-program v1.16.4` cannot be built because it requires rustc 1.68.0 or newer, while the currently active rustc version is 1.62.0-dev
Other versions:
cargo build-sbf -Vsolana-cargo-build-sbf 1.12.0sbf-tools v1.29cargo --versioncargo 1.69.0 (6e9a83356 2023-04-12)
Same results for setting with rustup default 1.69.0
.
I've updated solana, rustc and pretty much everything else. It always breaks on this.
My anchor.toml
:
[package]name = "proj"version = "0.1.0"description = "Created with Anchor"edition = "2021"[lib]crate-type = ["cdylib", "lib"]name = "proj"ls[features]no-entrypoint = []no-idl = []no-log-ix-name = []cpi = ["no-entrypoint"]default = [][dependencies]anchor-lang = "0.28.0"anchor-spl = "0.28.0"solana-program = "=1.16.4"switchboard-v2 = "0.4.0"bytemuck = "1.13.1"
This issue suggests following constraint to Anchor.toml solana-program = "=1.14.20"
, this won't work with switchboard-v2 = "^0.4.0"
.