-
Notifications
You must be signed in to change notification settings - Fork 955
rustup default
doesn't show proper warning when architecture is not compatible
#3972
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
Comments
I think there may be some confusion here. There are two concepts in rustup, the toolchain host, and the standard library targets. It looks like you may have installed toolchains for other hosts, which won't run. You only need to install the toolchain for the host you are running on (so on WSL, it would be Just beware that cross compiling from linux to windows or macos is not particularly easy. This recent blogpost contains an overview of how to cross-compile to windows. |
Thank you! I'll have a try a few hours later when I can reach my machine. |
rustup default
doesn't show proper warning when architecture is not compatible
But I still wonder if it is considerable that we change |
That would be a rustup bug. Could this issue be transferred? |
Attempting to transferr to rust-lang/rustup since this is an issue with the rustup tool... @rustbot transfer rustup |
FWIW we do emit this warning for Lines 820 to 825 in 4207838
> uname -mrs
Darwin 23.5.0 arm64
> rustup toolchain install stable-unknown-linux-gnu --profile=minimal
error: DEPRECATED: future versions of rustup will require --force-non-host to install a non-host toolchain.
warn: toolchain 'stable-unknown-linux-gnu' may not be able to run on this system.
warn: If you meant to build software to target that platform, perhaps try `rustup target add aarch64-unknown-linux-gnu` instead?
info: syncing channel updates for 'stable-aarch64-unknown-linux-gnu'
info: latest update on 2024-07-25, rust version 1.80.0 (051478957 2024-07-21)
info: downloading component 'cargo'
info: downloading component 'rust-std'
^C⏎ ... it could be that this is not covered by |
Lines 703 to 706 in 4207838
... calls: rustup/src/toolchain/distributable.rs Line 362 in 4207838
... so it looks like extracting the warning to a separate function and call it at the beginning of However, this function clashes with |
Fresh install rustup on my Windows Subsystem for Linux, choose
stable-x86_64-apple-darwin
toolchainafter installation, run
rustc
it reports~/.rustup/toolchains/stable-x86_64-apple-darwin/bin/rustc: 1: Syntax error: "(" unexpected
Or if you choose
stable-x86_64-pc-windows-gnu
, runrustc
after installation,it reports
error: the 'rustc' binary, normally provided by the 'rustc' component, is not applicable to the 'stable-x86_64-pc-windows-gnu' toolchain
The text was updated successfully, but these errors were encountered: