anza-xyz / platform-tools

Apache License 2.0
45 stars 32 forks source link

Upload of release assets is skipped for windows #35

Closed ghints closed 2 years ago

ghints commented 2 years ago

Because the upload of release assets is skipped, windows version of the rust build is failing.

originally received following error attempting to compile rust code on windows environment.

> helloworld@0.0.1 build:program-rust
> cargo build-bpf --manifest-path=./src/program-rust/Cargo.toml --bpf-out-dir=dist/program

BPF SDK: \\?\C:\Users\xxx\.local\share\solana\install\releases\1.9.5\solana-release\bin\sdk\bpf
Failed to install bpf-tools: HTTP status client error (404 Not Found) for url (https://github.com/solana-labs/bpf-tools/releases/download/v1.21/solana-bpf-tools-windows.tar.bz2)

Which lead me to this repository and found out the following issue. Would anybody be able to upload the windows version to the release folder? Currently the windows tar.bz2 is missing.

image

dmakarov commented 2 years ago

This is resolved in Release v1.23 https://github.com/solana-labs/bpf-tools/releases/tag/v1.23

fab-1 commented 2 years ago

How do I install this version on windows? I tried following the instruction from this comment: https://github.com/solana-labs/solana/issues/21053#issuecomment-1002747726 but no luck I'm using version 1.9.5

dmakarov commented 2 years ago

How do I install this version on windows? I tried following the instruction from this comment: solana-labs/solana#21053 (comment) but no luck I'm using version 1.9.5

Please download bpf-tools v1.23. https://github.com/solana-labs/bpf-tools/releases/tag/v1.23

fab-1 commented 2 years ago

@dmakarov once I have downloaded this archive, how do I install it ? I tried running cargo build-bpf but it's trying to download the old version (1.21) Failed to install bpf-tools: HTTP status client error (404 Not Found) for url (https://github.com/solana-labs/bpf-tools/releases/download/v1.21/solana-bpf-tools-windows.tar.bz2)

Maybe it would be possible for you to upload the old version as well?

dmakarov commented 2 years ago

@dmakarov once I have downloaded this archive, how do I install it ? I tried running cargo build-bpf but it's trying to download the old version (1.21) Failed to install bpf-tools: HTTP status client error (404 Not Found) for url (https://github.com/solana-labs/bpf-tools/releases/download/v1.21/solana-bpf-tools-windows.tar.bz2)

Maybe it would be possible for you to upload the old version as well?

cargo-build-bpf doesn’t check the version of a bpf-tools tar archive, it only checks that a specific path exists. after you downloaded the tar file, create directory

mkdir -p ~/.cache/solana/v1.21/bpf-tools

Then unpack the downloaded tar file

cd ~/.cache/solana/v1.21/bpf-tools
tar —strip-components 1 -xjf solana-bpf-tools-windows.tar.bz2
ln -s ~/.cache/solana/v1.21/bpf-tools ~/.local/share/solana/active_release/bin/sdk/bpf/dependencies/bpf-tools

Make sure to write correct path to the tar.bz2 file in the tar command line above. Then cargo build-bpf should be able to find the rust and llvm toolchains.

fab-1 commented 2 years ago

Thank you for your reply. It is still trying to download the tools unfortunately $ cargo build-bpf BPF SDK: \\?\C:\Users\fabs\.local\share\solana\install\releases\1.9.5\solana-release\bin\sdk\bpf Failed to install bpf-tools: HTTP status client error (404 Not Found) for url (https://github.com/solana-labs/bpf-tools/releases/download/v1.21/solana-bpf-tools-windows.tar.bz2)

In the .cache dir: fabs /cygdrive/c/Users/fabs/.cache/solana/v1.21/bpf-tools $ ls llvm rust version.md

In the .local dir: fabs /cygdrive/c/Users/fabs/.local/share/solana/install/active_release/bin/sdk/bpf/dependencies/bpf-tools $ ls llvm rust version.md

dmakarov commented 2 years ago

Thank you for your reply. It is still trying to download the tools unfortunately $ cargo build-bpf BPF SDK: \\?\C:\Users\fabs\.local\share\solana\install\releases\1.9.5\solana-release\bin\sdk\bpf Failed to install bpf-tools: HTTP status client error (404 Not Found) for url (https://github.com/solana-labs/bpf-tools/releases/download/v1.21/solana-bpf-tools-windows.tar.bz2)

In the .cache dir: fabs /cygdrive/c/Users/fabs/.cache/solana/v1.21/bpf-tools $ ls llvm rust version.md

In the .local dir: fabs /cygdrive/c/Users/fabs/.local/share/solana/install/active_release/bin/sdk/bpf/dependencies/bpf-tools $ ls llvm rust version.md

What does ls -al show in \\?\C:\Users\fabs\.local\share\solana\install\releases\1.9.5\solana-release\bin\sdk\bpf? Does dependencies path exist in that subdir? If not, mkdir -p ~/.local/share/solana/install/releases/1.9.5/solana-release/bin/sdk/bpf/dependencies. In the end link bpf-tools ln -s ~/.cache/solana/v1.21/bpf-tools ~/.local/share/solana/install/releases/1.9.5/solana-release/bin/sdk/bpf/dependencies/bpf-tools