cross-rs / cross

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

Fail to compile target `mips64-unknown-linux-gnuabi64` #1520

Closed axetroy closed 4 days ago

axetroy commented 4 days ago

Checklist

Describe your issue

Cross-compiling mips64el-unknown-linux-gnuabi64 failed with the following error

Digest: sha256:59e496d0e1ebe88c6c1ba878c0c7ac256b74922e113b0082fd4d9a95e2f2f95d
Status: Downloaded newer image for ghcr.io/cross-rs/mips64-unknown-linux-gnuabi64:main
   Compiling proc-macro2 v1.0.66
   Compiling crossbeam-utils v0.8.20
   Compiling unicode-ident v1.0.11
   Compiling libc v0.2.155
   Compiling cfg_aliases v0.1.1
   Compiling rayon-core v1.12.1
   Compiling nix v0.28.0
error[E0463]: can't find crate for `core`
  |
  = note: the `mips64-unknown-linux-gnuabi64` target may not be installed
  = help: consider downloading the target with `rustup target add mips64-unknown-linux-gnuabi64`

   Compiling cfg-if v1.0.0
For more information about this error, try `rustc --explain E0463`.
error: could not compile `libc` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `cfg-if` (lib) due to 1 previous error
error: could not compile `crossbeam-utils` (lib) due to 1 previous error
[cross] warning: rust-std is not available for mips64-unknown-linux-gnuabi64
[cross] note: you may need to build components for the target via `-Z build-std=<components>` or in your cross configuration specify `target.mips64-unknown-linux-gnuabi64.build-std`
              the available components are core, std, alloc, and proc_macro
Error: Process completed with exit code 101.

What target(s) are you cross-compiling for?

mips64-unknown-linux-gnuabi64

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

0.2.5

Example

cargo install cross --git https://github.com/cross-rs/cross
cross build --release --locked --target=mips64-unknown-linux-gnuabi64

Additional information / notes

All run in Github Action Ubuntu-latest Runner

Bold mips64-unknown-linux-gnuabi64 and mips64el-unknown-linux-gnuabi64 got and issue

No response

axetroy commented 4 days ago

resolve by adding cargo flags

- cross build --release --locked --target=mips64-unknown-linux-gnuabi64
+ cross build --release --locked --target=mips64-unknown-linux-gnuabi64 -Z build-std=core,std,alloc,proc_macro,panic_abort

I thought cross would help me build these exact libraries.