-
Notifications
You must be signed in to change notification settings - Fork 411
Incorrect toolchain check when running cross with active or default toolchain #1678
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
Thats strange, i was sure this fixed the issue, will have a look again |
@reneleonhardt This fix works for me, thanks! |
Fixes #1678 ### Old ```shell $ rustup --quiet toolchain list stable-aarch64-apple-darwin (active, default) ``` ### New ```shell $ rustup toolchain list --quiet stable-aarch64-apple-darwin ```
Hey! I'm seeing issues that may be related to this fix? I build cargo-cross from git.
|
Thank you for the report! https://github.com/rust-lang/rustup/tags rustup --version # rustup 1.28.2 (2025-04-28)
rustup toolchain list --help
rustup self update 1.28.0 added |
Hi, I also encountered an error with rustup v1.26.0 (ubuntu noble 1.26.0-5build1). $ cross build --release --target aarch64-unknown-linux-musl
Error:
0: `rustup toolchain list --quiet` failed with exit status: 1
Location:
src/errors.rs:147
Stdout:
error: Found argument '--quiet' which wasn't expected, or isn't valid in this context
If you tried to supply `--quiet` as a value rather than a flag, use `-- --quiet`
USAGE:
rustup toolchain list [OPTIONS]
For more information try --help
$ rustup --version
rustup 1.26.0 (2024-04-01)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.87.0 (17067e9ac 2025-05-09)`
$ rustup self update
error: self-update is disabled for this build of rustup
error: you should probably use your system package manager to update rustup Of course, this error should be fixed after installing rustup by non-APT methods. |
Thanks! rustup will only be available from Debian 13 onwards... but also only an outdated version like Ubuntu 24.04 provides 😞 Thank you for your report, I prepared another fix for legacy rustup versions. Interestingly enough, Despite installing rustup in the official way yourself of course... 😄 |
Fixes #1678 Unfortunately some installations use legacy versions, my previous fix was only working for the current rustup >= 1.28.0.
@wcampbell0x2a @ueda-soma my "backport" of --quiet has been merged if you want to try cross main again with legacy rustup versions 😅 |
@reneleonhardt Thanks, it seems to work with 51f46f2! $ cargo install cross --git https://github.com/cross-rs/cross
Installing cross v0.2.5 (https://github.com/cross-rs/cross#51f46f29)
$ cross build --release --target aarch64-unknown-linux-gnu
Finished `release` profile [optimized] target(s) in 41.39s
$ cross --version
cross 0.2.5 (51f46f2 2025-05-24)
$ rustup --version
rustup 1.26.0 (2024-04-01) |
Uh oh!
There was an error while loading. Please reload this page.
Checklist
Describe your issue
When running any cross command, cross tries to download the stable version while it is already installed.
This is because when running
rustup toolchain list
, my toolchain stable has a suffix(active, default)
, which makes the check fail. I believe adding the--quiet
flag at the end of the command should fix the issue.I have tried both the latest stable 0.2.5 version and the lastet version on the main branch (9e2298e at the time of writing)
Two months ago, on a version not released yet, the command
rustup toolchain list
was replaced withrustup --quiet toolchain list
. This however does not fix the issue as the--quiet
flag applies to therustup
command and not thelist
command.What target(s) are you cross-compiling for?
No response
Which operating system is the host (e.g computer cross is on) running?
What architecture is the host?
What container engine is cross using?
cross version
cross 0.2.5
Example
Example of
rustup toolchain list
resultAdditional information / notes
No response
The text was updated successfully, but these errors were encountered: