You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to figure out how to build Rust projects for arm, and I've been pointed to cross. I tried following the instructions on the README:
# MAGIC! This Just Works
$ cross build --target aarch64-unknown-linux-gnu
# EVEN MORE MAGICAL! This also Just Works
$ cross test --target mips64-unknown-linux-gnuabi64
# Obviously, this also Just Works
$ cross rustc --target powerpc-unknown-linux-gnu --release -- -C lto
The first two of those commands do, in fact, Just Work. Great! However, the last one does not:
den-antares@patchwork-starfish calopr$ cross rustc --target powerpc-unknown-linux-gnu --release -- -C lto
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
stable-x86_64-unknown-linux-gnu unchanged - rustc 1.86.0 (05f9846f8 2025-03-31)
info: checking for self-update
info: downloading component 'rust-std' for 'powerpc-unknown-linux-gnu'
info: installing component 'rust-std' for 'powerpc-unknown-linux-gnu'
Trying to pull ghcr.io/cross-rs/powerpc-unknown-linux-gnu:main...
Getting image source signatures
Copying blob ee7e46a9de1a done |
Copying blob d4c3c94e5e10 done |
Copying blob b0a5c07c0529 done |
Copying blob 200f6c3ce795 done |
Copying blob 3406d94c528a done |
Copying blob 4f8138ed7f10 done |
Copying blob a61b035fb194 done |
Copying blob 12a84ba94b1f done |
Copying blob fcee21dd4534 done |
Copying blob 94a1325bdce5 done |
Copying blob 582f0e614940 done |
Copying blob 17b7aef5f6bd done |
Copying blob cf6dab830432 done |
Copying blob c918eb880934 done |
Copying blob dee0ebd71e6f done |
Copying blob 4db2cf5064ac done |
Copying blob 47b42473992c done |
Copying blob d41ae32f0052 done |
Copying blob eb856b0d03ba done |
Copying config 9c496bd08c done |
Writing manifest to image destination
Compiling itoa v1.0.14
Compiling memchr v2.7.4
Compiling num-traits v0.2.19
Compiling serde v1.0.217
Compiling serde_json v1.0.138
Compiling ryu v1.0.19
Compiling fnv v1.0.7
Compiling iana-time-zone v0.1.61
Compiling bytes v1.10.0
error: failed to run custom build command for `serde_json v1.0.138`
Caused by:
process didn't exit successfully: `/target/release/build/serde_json-cdb245fd4bc50387/build-script-build` (exit status: 1)
--- stderr
/target/release/build/serde_json-cdb245fd4bc50387/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /target/release/build/serde_json-cdb245fd4bc50387/build-script-build)
/target/release/build/serde_json-cdb245fd4bc50387/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /target/release/build/serde_json-cdb245fd4bc50387/build-script-build)
/target/release/build/serde_json-cdb245fd4bc50387/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /target/release/build/serde_json-cdb245fd4bc50387/build-script-build)
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `serde v1.0.217`
Caused by:
process didn't exit successfully: `/target/release/build/serde-52c92ade6ff07c97/build-script-build` (exit status: 1)
--- stderr
/target/release/build/serde-52c92ade6ff07c97/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /target/release/build/serde-52c92ade6ff07c97/build-script-build)
/target/release/build/serde-52c92ade6ff07c97/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /target/release/build/serde-52c92ade6ff07c97/build-script-build)
/target/release/build/serde-52c92ade6ff07c97/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /target/release/build/serde-52c92ade6ff07c97/build-script-build)
/target/release/build/serde-52c92ade6ff07c97/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.39' not found (required by /target/release/build/serde-52c92ade6ff07c97/build-script-build)
error: failed to run custom build command for `num-traits v0.2.19`
Caused by:
process didn't exit successfully: `/target/release/build/num-traits-2aaa1b4d29616261/build-script-build` (exit status: 1)
--- stderr
/target/release/build/num-traits-2aaa1b4d29616261/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /target/release/build/num-traits-2aaa1b4d29616261/build-script-build)
/target/release/build/num-traits-2aaa1b4d29616261/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /target/release/build/num-traits-2aaa1b4d29616261/build-script-build)
/target/release/build/num-traits-2aaa1b4d29616261/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /target/release/build/num-traits-2aaa1b4d29616261/build-script-build)
/target/release/build/num-traits-2aaa1b4d29616261/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.39' not found (required by /target/release/build/num-traits-2aaa1b4d29616261/build-script-build)
error[E0463]: can't find crate for `std`
|
= note: the `powerpc-unknown-linux-gnu` target may not be installed
= help: consider downloading the target with `rustup target add powerpc-unknown-linux-gnu`
error[E0463]: can't find crate for `core`
|
= note: the `powerpc-unknown-linux-gnu` target may not be installed
= help: consider downloading the target with `rustup target add powerpc-unknown-linux-gnu`
For more information about this error, try `rustc --explain E0463`.
error: could not compile `fnv` (lib) due to 1 previous error
error: could not compile `iana-time-zone` (lib) due to 1 previous error
error: could not compile `itoa` (lib) due to 1 previous error
error: could not compile `ryu` (lib) due to 1 previous error
error: could not compile `bytes` (lib) due to 1 previous error
error: could not compile `memchr` (lib) due to 1 previous error
I'm on Fedora 41, with Rust 1.86 and the powerpc toolchain does seem to be installed:
I've also tried the first two commands above but with --release, and this causes both to fail:
den-antares@patchwork-starfish calopr$ cross build --target aarch64-unknown-linux-gnu --release
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
stable-x86_64-unknown-linux-gnu unchanged - rustc 1.86.0 (05f9846f8 2025-03-31)
info: checking for self-update
Compiling serde v1.0.217
Compiling num-traits v0.2.19
Compiling serde_json v1.0.138
error: failed to run custom build command for `serde_json v1.0.138`
Caused by:
process didn't exit successfully: `/target/release/build/serde_json-cdb245fd4bc50387/build-script-build` (exit status: 1)
--- stderr
/target/release/build/serde_json-cdb245fd4bc50387/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /target/release/build/serde_json-cdb245fd4bc50387/build-script-build)
/target/release/build/serde_json-cdb245fd4bc50387/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /target/release/build/serde_json-cdb245fd4bc50387/build-script-build)
/target/release/build/serde_json-cdb245fd4bc50387/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /target/release/build/serde_json-cdb245fd4bc50387/build-script-build)
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `serde v1.0.217`
Caused by:
process didn't exit successfully: `/target/release/build/serde-52c92ade6ff07c97/build-script-build` (exit status: 1)
--- stderr
/target/release/build/serde-52c92ade6ff07c97/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /target/release/build/serde-52c92ade6ff07c97/build-script-build)
/target/release/build/serde-52c92ade6ff07c97/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /target/release/build/serde-52c92ade6ff07c97/build-script-build)
/target/release/build/serde-52c92ade6ff07c97/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /target/release/build/serde-52c92ade6ff07c97/build-script-build)
/target/release/build/serde-52c92ade6ff07c97/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.39' not found (required by /target/release/build/serde-52c92ade6ff07c97/build-script-build)
error: failed to run custom build command for `num-traits v0.2.19`
Caused by:
process didn't exit successfully: `/target/release/build/num-traits-2aaa1b4d29616
8000
261/build-script-build` (exit status: 1)
--- stderr
/target/release/build/num-traits-2aaa1b4d29616261/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /target/release/build/num-traits-2aaa1b4d29616261/build-script-build)
/target/release/build/num-traits-2aaa1b4d29616261/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /target/release/build/num-traits-2aaa1b4d29616261/build-script-build)
/target/release/build/num-traits-2aaa1b4d29616261/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /target/release/build/num-traits-2aaa1b4d29616261/build-script-build)
/target/release/build/num-traits-2aaa1b4d29616261/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.39' not found (required by /target/release/build/num-traits-2aaa1b4d29616261/build-script-build)
Mips fails in a different way when trying to do a release:
den-antares@patchwork-starfish calopr$ cross test --target mips64-unknown-linux-gnuabi64
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
stable-x86_64-unknown-linux-gnu unchanged - rustc 1.86.0 (05f9846f8 2025-03-31)
info: checking for self-update
Trying to pull ghcr.io/cross-rs/mips64-unknown-linux-gnuabi64:main...
Getting image source signatures
Copying blob 82d5affdeb10 done |
Copying blob 5c9fd615e608 done |
Copying blob 5ae61f7025bb done |
Copying blob b78922a2d99f done |
Copying blob 13b7e930469f skipped: already exists
Copying blob 6f7126e27102 done |
Copying blob f1c84ff7173a done |
Copying blob df07fe592639 done |
Copying blob c4b380e7982d done |
Copying blob 058b07fb4162 done |
Copying blob 4b1246e6c17d done |
Copying blob 6b74677ffb0a done |
Copying blob 0552e6d2d169 done |
Copying blob 2fbfd0bc409e done |
Copying blob c2321b9262b6 done |
Copying config 77a767a57b done |
Writing manifest to image destination
Compiling num-traits v0.2.19
Compiling itoa v1.0.14
Compiling iana-time-zone v0.1.61
Compiling serde v1.0.217
Compiling serde_json v1.0.138
Compiling bytes v1.10.0
Compiling memchr v2.7.4
Compiling fnv v1.0.7
Compiling ryu v1.0.19
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`
error[E0463]: can't find crate for `std`
|
= note: the `mips64-unknown-linux-gnuabi64` target may not be installed
= help: consider downloading the target with `rustup target add mips64-unknown-linux-gnuabi64`
For more information about this error, try `rustc --explain E0463`.
error: could not compile `itoa` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `iana-time-zone` (lib) due to 1 previous error
error: could not compile `fnv` (lib) due to 1 previous error
error: could not compile `ryu` (lib) due to 1 previous error
error: could not compile `bytes` (lib) due to 1 previous error
error: could not compile `memchr` (lib) due to 1 previous error
error: could not compile `serde` (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
Since the arm error mentioned glibc versions I tried building with aarch64-unknown-linux-musl instead of aarch64-unknown-linux-gnu, which produced an identical error.
Are release builds supported? If so, how do I produce them?
What target(s) are you cross-compiling for?
No response
Which operating system is the host (e.g computer cross is on) running?
macOS
Windows
Linux / BSD
other OS (specify in description)
What architecture is the host?
x86_64 / AMD64
arm32
arm64 (including Mac M1)
What container engine is cross using?
docker
podman
other container engine (specify in description)
cross version
0.2.5
Example
No response
Additional information / notes
No response
The text was updated successfully, but these errors were encountered:
Checklist
Describe your issue
I'm trying to figure out how to build Rust projects for arm, and I've been pointed to cross. I tried following the instructions on the README:
The first two of those commands do, in fact, Just Work. Great! However, the last one does not:
I'm on Fedora 41, with Rust 1.86 and the powerpc toolchain does seem to be installed:
I've also tried the first two commands above but with --release, and this causes both to fail:
Mips fails in a different way when trying to do a release:
Since the arm error mentioned glibc versions I tried building with aarch64-unknown-linux-musl instead of aarch64-unknown-linux-gnu, which produced an identical error.
Are release builds supported? If so, how do I produce them?
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
0.2.5
Example
No response
Additional information / notes
No response
The text was updated successfully, but these errors were encountered: