1

Anchor Verification Issue: Rustc Version Mismatch in Docker Environment

Command Executed

anchor verify 3MRKmmRZ6Fm4tvEEjBZcuGG7nxWVSYCJd83WzmAGqm8J

Problem Summary

The program build fails due to a rustc version mismatch. The solana-program v1.18.26 package requires rustc 1.75.0 or newer, but the Docker environment is using rustc 1.68.0-dev. This prevents the Anchor verification process from completing successfully.

Environment Details

Docker Image: backpackapp/build:v0.29.0 Host Platform: macOS (arm64/v8) Host Rustc Version: rustc 1.82.0 Cargo SBF Build Version: solana-cargo-build-sbf 1.18.26 Rustc in Docker: rustc 1.68.0-dev

Error Output

Using image "backpackapp/build:v0.29.0"
Run docker image
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
74a565d7ede826dc20be4d080629a60f24fc069c087b576753606d6f18abcd3e
Building paymaster manifest: "programs/paymaster/Cargo.toml"
    Updating crates.io index
    Downloading crates ...
    ...
error: package `solana-program v1.18.26` cannot be built because it requires rustc 1.75.0 or newer, while the currently active rustc version is 1.68.0-dev
Either upgrade to rustc 1.75.0 or newer, or use
cargo update -p [email protected] --precise <version>
where `<version>` is the latest version of `solana-program` supporting rustc 1.68.0-dev
Cleaning up the docker target directory
Removing the docker container
anchor-program
Error during Docker build: Failed to build program
Error: Failed to build program

Additional Details

Version Information

cargo-build-sbf --version
solana-cargo-build-sbf 1.18.26
platform-tools v1.41
rustc 1.82.0

1 Answer 1

1

anchor verifiable builds, builds the program first when run and I suspect the error is arising from this step.

You have two options,

  1. Try update your tooling to the latest stable version. Here is what my environment looks like
solana-cli 2.1.1 (src:adeac022; feat:2252099268, client:Agave)

anchor-cli 0.30.1 
  1. Find the crates causing the errors and downgrade them to work with your current environment tooling version. This will be more tedious as you'll probably have to go through multiple crate updates with cargo update -p [email protected] --precise <version>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.