0

I've been struggling with this for hours now. I really don't know whats left to do.

[dependencies] solana-program = "1.8.0"

after I run solana program deploy i get this error. Error: ELF error: ELF error: Multiple or no text sections, consider removing llc option: -function-sections.

Ive updated my rust, my solana packages... I really don't know whats left to try. I've even attempted to use older versions to build the binary such as cargo-build-bpf. Any advice would be GREATLY appreciated.


use solana_program::{
    account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey, msg,
};

pub fn process_instruction(
    program_id: &Pubkey,
    accounts: &[AccountInfo],
    instruction_data: &[u8],
) -> ProgramResult {
    // Your program logic goes here
    msg!("Hello, World!");


    Ok(())
}

// src/lib.rs

mod processor;

use processor::process_instruction;

solana_program::entrypoint!(process_instruction);
 

2 Answers 2

0

Try add #![cfg(not(feature = "no-entrypoint"))] at the beginning of lib.rs.

0

@rainbowemoji - that didn't help. Exact same code. Exact same error.

[dependencies]
solana-program = "2.0.9"

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.