0

I'm trying to run anchor build on a workspace and receiving errors about a supposedly unmatchable version requirement for the crate "time", even though matching versions exist locally:

Output


As far as I understand semantic versioning rules, all the candidate versions listed should actually meet the requirement. Am I wrong here or is something else going on?

Here's the Cargo.toml:

enter image description here

Building with cargo build works fine somehow.


  • OS: Ubuntu v20.04 on WSL
  • Anchor (avm): v0.25.0
  • Anchor CLI: v0.24.2
  • Solana CLI: v1.10.40

Steps I already tried to fix this include:

  • Deleting the cargo cache
  • Deleting the entire cargo registry
  • Updating my solana and anchor distributions to the newest version

1 Answer 1

0

Likely a bug due to the solana version: updating to 1.14 or later should fix it.

Somewhere around 1.11 there was an update to the way cargo-bpf is called, and cargo build-bpf is no longer the normal build toolpath.

When this is the issue, cargo build will work, but anchor build will not.

Note also that solana-install update can fail sometimes for major version updates, and you may just have reinstall with sh -c "$(curl -sSfL https://release.solana.com/v1.14.10/install)" (replace 1.14.10 with whatever is latest)

0

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.