-
Notifications
You must be signed in to change notification settings - Fork 4
missing BPF binary #3
Comments
Same error:
|
I'll look into it! |
@sfultong @hhefesto can you try the |
Thanks for the quick response @cideM ! Now I get a different error:
|
I managed to get other errors: First I cloned https://github.com/solana-labs/solana. There is a
Which prompted me to provide
Then I noticed your answer here and tried in the
So I provided
I'm unsure if this last error is an expected error: my rust knowledge is quite superficial. |
And also thanks for the quick response and this flake <3 |
same error without |
I had to read up on what I'll try to run this tutorial myself and see if I can fix the issues. |
Wanted to give everyone an update. It's really busy at work so I couldn't spend much time on it. But this line in the SDK is likely the problem:
This will make a symlink into the source folder, which is read-only, hence the Good thing is, https://github.com/solana-labs/bpf-tools/releases/download/v1.12/solana-bpf-tools-osx.tar.bz2 this is the URL that is used to download the missing tools. It's slightly different for Linux. But I think it should be pretty easy to handle this download with Nix, as it should be. Hopefully the Rust code will accept the resulting symlink. If not, patching it is always an option. I'll get something going this weekend. |
@hhefesto @sfultong could you pull from the branch and try again? I'm using this flake for the https://github.com/solana-labs/break/blob/main/README.md project:
you'll have to adjust the path to my ~/private/solana-nix-issue/break on main •
$ nix develop
warning: Git tree '/Users/fbs/private/solana-nix-issue/break' is dirty
Florians-MBP:break fbs$ env -C program cargo-build-bpf
BPF SDK: /nix/store/cahp4fsddad29fbarmydyl8gi1231422-solana-1.7.15/bin/sdk/bpf
Running: rustup toolchain list -v
Running: cargo +bpf build --target bpfel-unknown-unknown --release
Compiling proc-macro2 v1.0.24
Compiling syn v1.0.67
Compiling serde_derive v1.0.125
Compiling serde v1.0.125
Compiling typenum v1.12.0
Compiling rustversion v1.0.3
Compiling log v0.4.14
Compiling byteorder v1.3.4 This fails for me with (anza-xyz/platform-tools#25)
but I think that's just me being on M1 when the BPF tools are for x86. I'll look into this further but maybe you can already try if this helps. For now I patched out the installation of the BPF tools since they're provided with my flake on my branch |
Thanks @cideM ! I get The Solana toolchain needs a specific version of rust (1.53 or 1.56?) and I assume fenix does not provide that. I'm going to try switching that out for another rust flake |
Hmmm, I'm still getting the same error with oxalica/rust-overlay and rust 1.56.0 I'm not sure what to try next |
I can take a look on my NixOS desktop machine on Monday or Tuesday. I'm at my parents place right now and only have my MacBook with me. I did notice that you talk about |
I think |
On my Darwin M1 machine, using the ~/private/solana-nix-issue/break on main •
❯ run
BPF SDK: /nix/store/ns6xkm0jbkz80h0skpzh4phrpvpn64zl-solana-1.7.15/bin/sdk/bpf
Running: rustup toolchain list -v
Running: cargo +bpf build --target bpfel-unknown-unknown --release
Compiling proc-macro2 v1.0.24
Compiling syn v1.0.67
Compiling serde v1.0.125
Compiling serde_derive v1.0.125
Compiling typenum v1.12.0
Compiling byteorder v1.3.4
Compiling log v0.4.14
Compiling rustversion v1.0.3
Compiling opaque-debug v0.3.0
Compiling ahash v0.4.7
Compiling lazy_static v1.4.0
Compiling either v1.5.3
Compiling bs58 v0.3.1
Compiling hex v0.4.2
Compiling semver v0.9.0
Compiling generic-array v0.14.4
Compiling bv v0.11.1
Compiling num-traits v0.2.11
Compiling itertools v0.9.0
Compiling hashbrown v0.9.1
Compiling rustc_version v0.2.3
Compiling solana-frozen-abi-macro v1.6.6
Compiling solana-frozen-abi v1.6.6
Compiling solana-program v1.6.6
Compiling quote v1.0.2
Compiling borsh-schema-derive-internal v0.8.2
Compiling borsh-derive-internal v0.8.2
Compiling thiserror-impl v1.0.9
Compiling num-derive v0.3.0
Compiling solana-sdk-macro v1.6.6
Compiling thiserror v1.0.9
Compiling serde_bytes v0.11.3
Compiling bincode v1.3.1
Compiling toml v0.5.8
Compiling block-buffer v0.9.0
Compiling digest v0.9.0
Compiling sha2 v0.9.3
Compiling proc-macro-crate v0.1.5
Compiling borsh-derive v0.8.2
Compiling borsh v0.8.2
Compiling break-solana-program v0.1.0 (/Users/fbs/private/solana-nix-issue/break/program)
Finished release [optimized] target(s) in 35.69s
Running: /nix/store/ns6xkm0jbkz80h0skpzh4phrpvpn64zl-solana-1.7.15/bin/sdk/bpf/scripts/strip.sh /Users/fbs/private/solana-nix-issue/break/program/target/bpfel-unknown-unknown/release/break_solana_program.so /Users/fbs/private/solana-nix-issue/break/program/target/deploy/break_solana_program.so
+ wget https://github.com/Snaipe/Criterion/releases/download/v2.3.2/criterion-v2.3.2-osx-x86_64.tar.bz2 -O criterion-v2.3.2-osx-x86_64.tar.bz2 --progress=dot:giga --retry-connrefused --read-timeout=30
--2021-11-07 21:02:07-- https://github.com/Snaipe/Criterion/releases/download/v2.3.2/criterion-v2.3.2-osx-x86_64.tar.bz2
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/30111969/33613116-1c60-11e7-8934-6166ffd90477?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20211107%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20211107T200208Z&X-Amz-Expires=300&X-Amz-Signature=33a3753454a6436d73c60892d73fc42e396c35a6ec046fa50cdd3b6f3cb8bad0&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=30111969&response-content-disposition=attachment%3B%20filename%3Dcriterion-v2.3.2-osx-x86_64.tar.bz2&response-content-type=application%2Foctet-stream [following]
--2021-11-07 21:02:08-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/30111969/33613116-1c60-11e7-8934-6166ffd90477?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20211107%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20211107T200208Z&X-Amz-Expires=300&X-Amz-Signature=33a3753454a6436d73c60892d73fc42e396c35a6ec046fa50cdd3b6f3cb8bad0&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=30111969&response-content-disposition=attachment%3B%20filename%3Dcriterion-v2.3.2-osx-x86_64.tar.bz2&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.110.133, 185.199.111.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 180979 (177K) [application/octet-stream]
Saving to: ‘criterion-v2.3.2-osx-x86_64.tar.bz2’
0K 100% 3.33M=0.05s
2021-11-07 21:02:08 (3.33 MB/s) - ‘criterion-v2.3.2-osx-x86_64.tar.bz2’ saved [180979/180979]
+ tar --strip-components 1 -jxf criterion-v2.3.2-osx-x86_64.tar.bz2
ln: failed to create symbolic link 'criterion': Permission denied
Running: /nix/store/ns6xkm0jbkz80h0skpzh4phrpvpn64zl-solana-1.7.15/bin/sdk/bpf/dependencies/bpf-tools/llvm/bin/llvm-readelf --dyn-symbols /Users/fbs/private/solana-nix-issue/break/program/target/deploy/break_solana_program.so
To deploy this program:
$ solana program deploy /Users/fbs/private/solana-nix-issue/break/program/target/deploy/break_solana_program.so
The program address will default to this keypair (override with --program-id):
/Users/fbs/private/solana-nix-issue/break/program/target/deploy/break_solana_program-keypair.json |
Yeah, I'm stilling getting the same error. I copied your flake, except I changed to |
So a little update. I can reproduce the error on NixOS. It's simply because I stuck a The toolchain is used later during I created an issue nix-community/fenix#58 because I'm not sure how to best make the custom BPF toolchain available. |
I was playing around with this, and seem to have gotten a bit further
I'm using https://github.com/oxalica/rust-overlay/blob/master/docs/reference.md for a rust overlay rather than fenix |
This issue has to do with |
I'm trying to get started with Solana dev, so I may be doing something wrong here. But when I try to run
cargo build-bpf
for a tutorial using this flake, I get:BPF SDK path does not exist: /nix/store/2zgi0xf7byrqz8v8hj87pfvhjl8w7lyz-solana-1.7.15/bin/sdk/bpf: No such file or directory (os error 2)
The text was updated successfully, but these errors were encountered: