Closed Arrowana closed 2 years ago
Problem
cargo build-bpf
does not work on windowsIt took me a while to understand that it just seems like the command doesn't work on windows or isn't supported https://docs.solana.com/cli/install-solana-cli-tools I installed rust and the solana cli https://github.com/solana-labs/solana-program-library then followed the readme here to build the token program
UserFolder\solana-program-library> cargo build [...] UserFolder\solana-program-library\token\program> cargo build-bpf error: no such subcommand: `build-bpf`
Proposed Solution
- If not supported yet, can we have the command return an error at least? Instead of "no such subcommand" leaving the developer wondering if his setup is wrong
- If it is supposed to be supported then there is problem a problem to fix :)
Did you check if the executable cargo-build-bpf
is located within your $PATH
and that cargo build-bpf
is run in a directory with Cargo.toml
?
https://github.com/rust-lang/cargo/wiki/Third-party-cargo-subcommands
Yes we currently don't support native windows for cargo-build-bpf
unfortunately. Would using WSL be an option?
@mvines I switched to a full setup in WSL, then I can develop. I don't think requiring WSL for a windows setup is great, the developer should be free to go for full Windows or full Linux (through WSL if he wants to).
Since windows can be used to do most of the other things, it seems like this subcommand has to exist but throw something, so solution 1. What do you think?
Is this as simple as adding cargo-build-bpf in https://github.com/solana-labs/solana/blob/master/scripts/cargo-install-all.sh#L62-L68 then having a simple executable which can print "build-bpf not supported on windows" that we build on windows instead of the real one?
Is this as simple as adding cargo-build-bpf in https://github.com/solana-labs/solana/blob/master/scripts/cargo-install-all.sh#L62-L68 then having a simple executable which can print "build-bpf not supported on windows" that we build on windows instead of the real one?
Yep, this would be a fine solution until native windows support for development is available.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This was fixed in https://github.com/solana-labs/solana/pull/20276 -- it currently requires a bash-compatible shell, but at least it's a start!
This issue has been automatically locked since there has not been any activity in past 7 days after it was closed. Please open a new issue for related bugs.
Problem
cargo build-bpf
does not work on windowsIt took me a while to understand that it just seems like the command doesn't work on windows or isn't supported https://docs.solana.com/cli/install-solana-cli-tools I installed rust and the solana cli https://github.com/solana-labs/solana-program-library then followed the readme here to build the token program
Proposed Solution