2

I am trying to install

avm install 0.30.1

My current installation is:

avm list 

 - 0.29.0  (installed, current)
 - 0.30.0*
 - 0.30.1  (latest)
 
 - rustc 1.82.0-nightly ( from the comments I read we use Solana's Rust so this may not matter)
 - anchor-cli 0.29.0
 - solana-cli 1.18.17 (Do you use Agave instead ?)

The error I am facing:

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

For more information about this error, try `rustc --explain E0635`.
error: could not compile `ahash` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `anchor-cli v0.30.1 (https://github.com/coral-xyz/anchor?tag=v0.30.1#e6d7dafe)`, intermediate artifacts can be found at `/var/folders/df/51xgtfs15vs2lhsrqdg_bs_w0000gn/T/cargo-installI1ngwC`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
Error: Failed to install 0.30.1, is it a valid version?

But I also see two versions of ahash being compiled (attached in screenshot).

What should I do to use avm's anchor version 0.30.1 ?

EDIT: I have checked this answer and also tried avm install latest and still same issue.

1 Answer 1

2

It might be because you are using the latest version of Nightly Rust. Try downgrading to 1.78.0

# install the tool-chain
rustup install 1.78.0

# use the toolchain
rustup default 1.78.0

For anchor,

avm install latest

avm use latest

A counter to what you mentioned, the avm CLI binary uses your system's Rust toolchain and not Solana. That'll only be applicable when you are building your program.

If you encounter the problems while building, my previous answer is applicable.

5
  • Sorry a bit confused here. I am just re installing avm before restarting new project. Shouldn't Cargo.toml be involved once I am dealing with a specific project ? If you are installing avm for the first time before starting on a project, would this issue would still come up ?
    – WowBow
    Commented Aug 12 at 21:46
  • 1
    You are correct. I totally missed that. Updated my answer
    – Jimii
    Commented Aug 12 at 21:53
  • That worked. Ty ser!
    – WowBow
    Commented Aug 13 at 1:32
  • On your last point, when does we depend on Solana's Rust version ? Is one way better than the other ?
    – WowBow
    Commented Aug 13 at 1:34
  • 1
    my best guess would be when building your programs to generate the so file
    – Jimii
    Commented Aug 13 at 13:12

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.