Anchor Version - 0.27.0 Solana Version - 1.14.19 Rust/Cargo Version 1.70

returned to my solana dev server for first time in a while. Start a project with anchor init, and attempt to build the hello world just to check everything is OK.

First I get an error I haven't seen before:

error: target is not supported, for more information see: https://docs.rs/getrandom/#unsupported-targets --> src/lib.rs:286:9

I can resolve that by adding getrandom = { version = "0.2.2", features = ["custom"] } to the cargo.toml file, but that seems like a hack. I've never had to use that before.

After that I get another error:

error[E0658]: 'let...else' statements are unstable

in relation to solana-frozen-abi-macro-1.16.0/src/lib.rs

I'm unable to fix that issue.

So build fails with: could not compile 'solana-frozen-abi-macro' due to 2 previous errors

Is this due to the rust update to 1.70? It's the only thing I can think I've changed.

  • i have the same error. i don't know why. it happen previous day Commented Jun 5, 2023 at 8:04

1 Answer 1


Try using the following dependencies.

anchor-lang = "0.27.0"
anchor-spl = "0.27.0"
getrandom = { version = "0.2.9", features = ["custom"] }
solana-program = "=1.14.17"

From the Anchor discord it seems there's some compatibility issues with the 1.16 release.

seems like new projects will not work unless they fixate the solana-program version to 1.14.x you can keep using that version and add solana-program = "=1.14.17" in your Cargo.toml

Related to this: https://github.com/solana-labs/solana/issues/31428

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.