2

I have created anchor program with following dependencies [dependencies] anchor-lang = "0.25.0" anchor-spl = { version = "^0.25.0" } solana-program = "~1.10.29" switchboard-v2 = { version = "^0.1.14", features = ["devnet"] } bytemuck = "1.7.2"

I have ran anchor build and I receive error: cargo-build-bpf child: cargo +bpf build --target bpfel-unknown-unknown --release Compiling spl-token v3.3.1 error[E0658]: destructuring assignments are unstable --> /Users/luk3ark/.cargo/registry/src/github.com-1ecc6299db9ec823/spl-token-3.3.1/src/instruction.rs:1712:13 | 1712 | _ = TokenInstruction::unpack(&expect[0..2]); | ^ | = note: see issue #71126 https://github.com/rust-lang/rust/issues/71126 for more information = help: add #![feature(destructuring_assignment)] to the crate attributes to enable

I have tried both nightly and stable builds, uninstalled and reinstalled anchor, tried adding the feature to the crate (even though this is not needed and should be added to the spl-token crate). NO LUCK.

This has turned from a dependency error to a joke. how can SPL-token crate complain if I am using up to date compiler. Does 'anchor build' do weird stuff in the background?

1 Answer 1

2

I had the same problem. I updated my Solana install using the command solana-install update, per this issue on github: https://github.com/coral-xyz/anchor/issues/2133.

1
  • I wish I can reach you through the screen and give you a big kiss on your cheek bro! I'm starting on Rust/Solana/Metaplex and so far the plumbing is very painful. Errors everywhere.
    – a20
    Dec 26, 2022 at 9:54

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.