1

I have been trying to deploy my anchor project on the local net. I started by running solana-test-validator and then anchor deploy but I keep receiving this error:

Error: ELF error: ELF error: Multiple or no text sections, consider removing llc option: -function-sections
There was a problem deploying: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "" }.

Here are the versions that I am using:

anchor-cli 0.28.0
solana-cli 1.16.17

Any help would be appreciated

1 Answer 1

1

The error is telling you that your built program has either no .text sections, or multiple .text sections. This section contains all of the compiled code for your program, and the Solana runtime only knows how to handle a program with one .text section.

Most likely, your program failed to build somewhere or didn't build, so be sure to run anchor build and see that it properly built.

If this doesn't resolve the issue, you'll need to provide more information, including your program's code and dependencies.

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.