4

I am following the tutorial out of the Solana courses. These are my dependencies:

[dependencies]
solana-program="1.16.27"
anchor-lang = "0.29.0"
switchboard-v2 = "0.4.0"

My cargo build sbf versions

solana-cargo-build-sbf 1.16.27
platform-tools v1.37
rustc 1.68.0

I get the following error

error[E0635]: unknown feature `stdsimd`
  --> /Users/poplorenzo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ahash-0.8.4/src/lib.rs:99:42
   |
99 | #![cfg_attr(feature = "stdsimd", feature(stdsimd))]
   |                                          ^^^^^^^

   Compiling serde_derive v1.0.204

I have two versions of ahash inside there, the problem is I don't know how to remove one. I've tried everything from Solana stack exchange and it's still not working.

1 Answer 1

2

Seems like ahash is the culprit again.

In you programs, Cargo.toml add pin ahash to version 0.8.7 since it seems that it's fixed in that version, ref: https://github.com/tkaitchuck/aHash/issues/200#issuecomment-1928956777

ahash="=0.8.7"

P.S, if you have more than one program, you'll need to add this change to all of them.

You might also need to upgrade your solana and anchor to the latest versions if you face any other issues related to dependencies.

On my end, I am running

anchor-cli 0.30.1
solana-cli 1.18.20 (src:fb5db7ab; feat:4215500110, client:SolanaLabs)

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.