Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing via Mucho lead to some issues #42

Open
jacobcreech opened this issue Jan 25, 2025 · 10 comments
Open

Installing via Mucho lead to some issues #42

jacobcreech opened this issue Jan 25, 2025 · 10 comments

Comments

@jacobcreech
Copy link

anchor % anchor build    
error: no such command: `+solana`

        Cargo does not handle `+toolchain` directives.
        Did you mean to invoke `cargo` through `rustup` instead?
--- start mucho info ---
System Info:
Darwin Jacobs-MacBook-Pro-4.local 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:01 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T6000 arm64
------------------------
Installed tooling:
  rust: 1.84.0
  solana: 1.18.1
  avm: 0.30.1
  anchor: 0.30.1
  yarn: 1.22.2
  trident: 0.6.0
  zest: 0.1.0
  cargo-update: 16.0.0
  verify: 0.2.1
------------------------
Platform tools:
  buildSbf: 1.18.1
  platformTools: 1.41
  rust: 1.75.0
------------------------
Solana CLI info:
  Config File: /Users/jacobcreech/.config/solana/cli/config.yml
  RPC URL: https://api.devnet.solana.com 
  WebSocket URL: wss://api.devnet.solana.com/ (computed)
  Keypair Path: /Users/jacobcreech/.config/solana/id.json 
  
  Commitment: confirmed
Does CLI config.yml exist: true
Balances for address:
  devnet: 106.766449986 SOL
  mainnet: 2.608347496 SOL
  testnet: 1000 SOL
  localnet: false
Is test-validator running? false
Localnet url: http://127.0.0.1:8899
---- end mucho info ----
@jacobcreech
Copy link
Author

jacobcreech commented Jan 25, 2025

Reinstalling solana did not fix my issue

@jacobcreech
Copy link
Author

@jacobcreech
Copy link
Author

jacobcreech commented Jan 25, 2025

Had to uninstall brew installed Rust. Brew install Rust in broken

brew uninstall rust

@nickfrosty
Copy link
Member

Had to uninstall brew installed Rust. Brew install Rust in broken

brew uninstall rust

maybe this has something to do with version issues of some type?

the "solana" toolchain should be installed via the solana-install command (which is used by the solana install shell script under the hood). do you have the solana toolchain on your system?

what is the output of the following command:

rustup list

@nickfrosty
Copy link
Member

I wonder if brew install rust will nuke the existing rust toolchains you have on your computer? or if it manages the rust toolchains differently than rustup does?

@nickfrosty
Copy link
Member

nickfrosty commented Jan 27, 2025

after some further research, it looks like brew install rust does not install rustup which is required by the solana install to fully configure the solana toolchain. see here for the source

so this does not appear to be a "mucho specific" issue, but rather a homebrew issue. mucho (naively) assumes rust is installed via rustup, since that is what the solana/agave/anchor docs all say to use.

we will have to improve the mucho install command to better understand this case, specifically that rustup is required and simply checking for rustc is not enough

edit: also opened an issue on the agave monorepo too: anza-xyz/agave#4651

@jacobcreech
Copy link
Author

maybe this has something to do with version issues of some type?
the "solana" toolchain should be installed via the solana-install command (which is used by the solana install shell script under the hood). do you have the solana toolchain on your system?
what is the output of the following command:

Unfortunately I've already fixed my setup

I wonder if brew install rust will nuke the existing rust toolchains you have on your computer? or if it manages the rust toolchains differently than rustup does?

Not sure, it's never worked for me

after some further research, it looks like brew install rust does not install rustup which is required by the solana install to fully > configure the solana toolchain. see here for the source

so this does not appear to be a "mucho specific" issue, but rather a homebrew issue. mucho (naively) assumes rust is installed via rustup, since that is what the solana/agave/anchor docs all say to use.

we will have to improve the mucho install command to better understand this case, specifically that rustup is required and simply checking for rustc is not enough

Seems like an odd requirement. Maybe there's a way we can install also with brew?

@nickfrosty
Copy link
Member

Seems like an odd requirement. Maybe there's a way we can install also with brew?

what do you mean here? meaning installing all the tools via brew for mac? or just rustup?

@jacobcreech
Copy link
Author

Install rust up with brew

@nickfrosty
Copy link
Member

The rustup installer script already works for all operating system. I just made this PR to always check if rustup is installed. in the next version of mucho, rustc and rustup are both checked and rustup will now be installed if the user does not have it, even if they already have rust installed

this also makes it so we do not need to perform any checks for user's having brew or not

note: the downside of that PR is that if a user already missing the solana toolchain due to already having run the solana installer without having rustup on their machine, no fix occurs to create the solana toolchain (aka platform tools). I am looking into how to manually fix this still and will add into mucho when I figure that out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants