Questions tagged [build-bpf]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
22 views

package `bumpalo v3.15.2` cannot be built because it requires rustc 1.73.0 or newer, while the currently active rustc version is 1.72.0-dev

package bumpalo v3.15.2 cannot be built because it requires rustc 1.73.0 or newer, while the currently active rustc version is 1.72.0-dev Either upgrade to rustc 1.73.0 or newer, or use cargo update -...
MANTOSH KUMAR's user avatar
0 votes
1 answer
40 views

Please help me. I have tried everything and installed the latest environment. Why is this problem still happening?

cargo build-bpf info: uninstalling toolchain 'solana' info: toolchain 'solana' uninstalled error: no such command: +solana Cargo does not handle `+toolchain` directives. Did you mean to invoke ...
aaaak's user avatar
  • 11
4 votes
1 answer
190 views

Error building program with `solana-program` v1.18 and CLI v1.17

When building an on-chain program with cargo build-sbf using solana-program v1.18, I get the following error: error: package solana-program v1.18.0 cannot be built because it requires rustc 1.72.0 or ...
Jon C's user avatar
  • 10.3k
1 vote
1 answer
27 views

cargo build-bpf failed

When I execute the command cargo build-bpf, I encounter an error. How can I resolve this issue? error: target is not supported, for more information see: https://docs.rs/getrandom/#unsupported-targets ...
zhxx zh's user avatar
  • 71
0 votes
1 answer
96 views

Rust build fails - cannot find libssl.so

The build fails due to error /home/dev/.rustup/toolchains/bpf/bin/cargo: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory OpenSSL and ...
Wilfred Almeida's user avatar
0 votes
1 answer
127 views

Error: Unable to open program file: No such file or directory (os error 2)

I am trying to deploy a hello world program on the blockchain through the solana cli. I tried running cargo build-bpf , after running the program the deploy directory is not downloaded so that I can ...
Shivang Rawat's user avatar
0 votes
0 answers
47 views

Anchor only solana build error ( fine with cargo )

When I compile my code with cargo build-sbf or cargo test-sbf I get no issues. But when I build with anchor build I get error[E0432]: unresolved import `crate::sys::IoSourceState` --> src/...
Trevor's user avatar
  • 83
1 vote
1 answer
31 views

Bad CPU type in executable

Problem I have a problem on build Rust Solana contract on processor M1. I used a simple example hello world. use solana_program::{ account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, ...
Ivan's user avatar
  • 11
4 votes
3 answers
111 views

Unable to build a binary

Both anchor build and cargo-build-sbf throw: Warning: cargo-build-bpf is deprecated. Please, use cargo-build-sbf cargo-build-bpf child: /Users/usr1/solana/bin/cargo-build-sbf --arch bpf error: package ...
mega_creamery's user avatar
1 vote
1 answer
74 views

Is there a way to configure an Anchor project to use the `--arch sbf` flag without having to specify it with each command?

After creating a new Anchor project, when you do anchor build you will see this warning: Warning: cargo-build-bpf is deprecated. Please, use cargo-build-sbf After looking into the cargo build ...
beeman's user avatar
  • 885
0 votes
0 answers
25 views

Moving my app on NEAR to Solana

I have an application in NEAR (developed with smart contracts in Rust). Is there any way that I can deploy it in Solana without having to create everything from scratch? Because both use Rust as the ...
Max's user avatar
  • 1
0 votes
0 answers
35 views

Anchor build error: cannot find version of aho-corasick dependency

I am having trouble building my Anchor project. I first got the error message "cargo pbf require libssl1.0.0". I installed the dependency libssl1.0.0 with the command sudo nano /etc/apt/...
solana dev's user avatar
1 vote
1 answer
317 views

Anchor Build Error: failed to select a version for the requirement `aho-corasick = "^1.0.0"

error: failed to select a version for the requirement `aho-corasick = "^1.0.0"` candidate versions found which didn't match: 0.7.20, 0.7.19, 0.7.18, ... location searched: crates.io index ...
Roshan Wazare's user avatar
0 votes
0 answers
49 views

Getting error while running cargo build-bpf

I was trying to compile this contract but ended up getting this error Error Error: Function ZN14solana_program4vote5state9VoteState11deserialize17hdfad8c2762e760a5E Stack offset of 6344 exceeded max ...
Hitesh Garg's user avatar
0 votes
0 answers
19 views

What is json keypair file after 'cargo build-bpf'?

I understand if it is for pubkey only. but keypair is meaning pubkey and privatekey both. what is purpose of this file?
nokdoo's user avatar
  • 1
0 votes
2 answers
137 views

Error when running npm run build:program-rust on helloworld example

I'm new to solana developing and am trying to run the hello world example. I am getting the following error after running npm run build:program-rust and am not sure how to fix it. What is causing this ...
xkycc's user avatar
  • 99
3 votes
1 answer
183 views

Why does rebuilding programs with `cargo build-bpf` take so long in a workspace?

Compared to the normal cargo build --release --workspace, rebuilding a program with cargo build-bpf (or sbf) ends up redoing quite a bit of work. If you have already built the workspace using cargo ...
Sammy's user avatar
  • 168
1 vote
1 answer
74 views

Issue building program via Cargo build-bpf

Getting an error during Build process with cargo build-bpf on Hello World program. error: linker cc not found | = note: No such file or directory (os error 2)
Solanadev's user avatar
1 vote
1 answer
55 views

How to compile a program on a Raspberry Pi?

I'm trying to get up and running with Solana development and was hoping I could use my Raspberry Pi to do all my dev work (not a requirement, just an experiment). I've been following the tutorial ...
jeffersonbenson's user avatar
1 vote
1 answer
228 views

`cargo build-sbf` doesn't work on linux

I consistently get this error message when running cargo build-sbf or cargo build-bpf Warning: cargo-build-bpf is deprecated. Please, use cargo-build-sbf cargo-build-bpf child: /home/anish/.local/...
Anish De's user avatar
1 vote
2 answers
204 views

Increase Deployed Program Account Allocation

I have deployed a program which got allocated 41216 bytes for the program account. I have changed this program, and would like to redeploy. However, the changed program is 46984 bytes. Error: ...
Sky020's user avatar
  • 117
0 votes
2 answers
85 views

Verifying that a program on chain is really running the code claimed

let's say I have been sent a link to a git repo that the owner says contains the code that a particular program is running. I can pull the repo and compile the program, but do any tools exist that ...
daoplays's user avatar
  • 497
1 vote
1 answer
116 views

Error compiling async-executor with "cargo build-sbf"

I got this: abcdedf@WudeMacBook-Pro golana % cargo -V cargo 1.63.0 (fd9c4297c 2022-07-01) abcdedf@WudeMacBook-Pro golana % solana -V solana-cli 1.11.10 (src:843e018c; feat:4253057308) abcdedf@...
oxfeeefeee's user avatar
3 votes
2 answers
423 views

Anchor Error, Refuses to build and deploy

I was downgrading and upgrading my Solana and anchor versions in order to deploy my programs to devnet. And while doing that after a time my anchor broke. I removed the rust and re-installed it and ...
SolanaDev's user avatar
1 vote
0 answers
42 views

RUSTFLAGS="-C instrument-coverage" with solana program [closed]

Trying to add check coverage, when using RUSTFLAGS="-C instrument-coverage" cargo build-bpf I'm getting: error: failed to run `rustc` to learn about target-specific information Caused by: ...
Ohad Dahan's user avatar
0 votes
1 answer
307 views

Can't compile after upgrading from 1.10.. to 1.11

I upgraded my solana tools and running cargo build-sbf, cargo-build-sbf or cargo build-bpf results in the following error (Ubuntu 20.04): example-helloworld/src/program-rust$ cargo build-sbf error: no ...
Charles Chege's user avatar
2 votes
1 answer
198 views

solana-test-validator "Illegal instruction" mac M1

When I run solana-test-validator I get Job 1, 'solana-test-validator' terminated by signal SIGILL (Illegal instruction) Configuration: Mac m1 12.1 cargo 1.62.1 (a748cf5a3 2022-06-08) rustup 1.25.1 (...
vicyyn's user avatar
  • 3,875
7 votes
2 answers
207 views

On-chain size of Anchor programs

I noticed that a minimal Anchor Program, e.g. this here takes up over 400kB of executable data on the blockchain. I checked another, a bit more elaborate program, and it's taking up 800kB. Given all ...
AllBlooming's user avatar
  • 2,249
2 votes
1 answer
452 views

What is cargo build-bpf?

The solana-program-library says to build apps with cargo build-bpf yet if you look at cargo --help this is not mentioned as a valid argument. How does cargo know to look at BPF SDK: /home/phil/...
Philip Rego's user avatar