cross-rs / cross

“Zero setup” cross compilation and “cross testing” of Rust crates
Apache License 2.0
6.4k stars 359 forks source link

cannot install mips-unknown-linux-musl, and 'rustup target --list | grep mips' is empty #1398

Closed ramabu closed 7 months ago

ramabu commented 7 months ago

Checklist

Describe your issue

I installed rust on a new machine, and cannot compile code for mips-unknown-linux-musl target. same code compiles OK on another machine.

  1. Trying to add the missing target fails as below.
rustup target add mips-unknown-linux-musl
error: component 'rust-std' for target 'mips-unknown-linux-musl' is unavailable for download for channel 'stable'
If you don't need the component, you can remove it with:

    rustup target remove --toolchain stable mips-unknown-linux-musl
  1. Versions in the broken machine
me@broken-vm-ubuntu $ for A in rustup cargo rustc cross; do echo $($A --version); done
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.75.0 (82e1608df 2023-12-21)`
rustup 1.26.0 (5af9b9484 2023-04-05)
cargo 1.75.0 (1d8b05cdd 2023-11-20)
rustc 1.75.0 (82e1608df 2023-12-21)
[cross] note: Falling back to `cargo` on the host.
cross 0.2.5 cargo 1.75.0 (1d8b05cdd 2023-11-20)
  1. Versions in the compile-OK one:
me@my-ubuntu $ for A in rustup cargo rustc cross; do echo $($A --version); done
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.74.1 (a28077b28 2023-12-04)`
rustup 1.26.0 (5af9b9484 2023-04-05)
cargo 1.74.1 (ecb9851af 2023-10-18)
rustc 1.74.1 (a28077b28 2023-12-04)
[cross] warning: unable to get metadata for package
[cross] note: Falling back to `cargo` on the host.
cross 0.2.5 (7fb1a37 2023-12-25) cargo 1.74.1 (ecb9851af 2023-10-18)

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 cargo 1.75.0 (1d8b05cdd 2023-11-20)

Example

me@broken-vm-ubuntu $ uname -a
Linux accessible-chinook 5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
me@broken-vm-ubuntu $ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
...
me@broken-vm-ubuntu $ rustup update
...
me@broken-vm-ubuntu $ cargo install cross
...
me@broken-vm-ubuntu $ rustup target add mips-unknown-linux-musl
error: component 'rust-std' for target 'mips-unknown-linux-musl' is unavailable for download for channel 'stable'
If you don't need the component, you can remove it with:

    rustup target remove --toolchain stable mips-unknown-linux-musl
me@broken-vm-ubuntu $ rustup target list | grep -c mips
0

Additional information / notes

No response

ramabu commented 7 months ago

duplicate of https://github.com/cross-rs/cross/issues/1336