0

i'm trying to build and deploy a program, but i get errors while building (althought it still finishes the build), and i can't deploy.

Here is the error while deploying : ELF error: Failed to parse ELF file: Section or symbol name .data._ZN12wasm_ is longer than 16 bytes

while building, i get many errors like this one : Function ZN112$LT$sol...f3dE Stack offset of 4448 exceeded max offset of 4096 by 4104 bytes, please minimize large stack variables

Here is my cargo.toml & anchor cli version:

Cargo: anchor-lang = "^0.25.0" anchor-spl = {version = "0.25.0"} spl-token = {version = "3.3.0", features = ["no-entrypoint"]} mpl-token-metadata = { version="1.2.4", features = ["no-entrypoint"] } getrandom = { version = "0.1.14", features = ["dummy"] }

Anchor cli: anchor-cli 0.25.0

How can i solve this ?

2 Answers 2

1

This is an Anchor stack error that I also faced a while back. GH issue I raised https://github.com/anza-xyz/agave/issues/1459

As suggested, you'll need to downgrade your solana-program version to 1.18.2 if you are using the newer 1.18 releases

cargo update -p solana-program@<YOUR SOLANA PROGRAM VERSION> --precise 1.18.2

You'll find YOUR SOLANA PROGRAM VERSION in the Cargo.lock file

Other possible issues, You might be using packages from Metaplex that aren't using the .18 solana program and for this you'll have no option but to downgrade 1.17.28 and 1.17.34 work just fine.

I'm currently on 1.17.34 with Anchor 1.29.0 and everything works-ish

1

Building program with docker using anchor build --verifiable solved my issue.

https://solana.stackexchange.com/a/14952/8864

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.