-
Notifications
You must be signed in to change notification settings - Fork 394
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
cross 0.2.4 failed to compile detect-wasi on aarch64-unknown-linux-gnu #1067
Comments
Pretty certain this is invalid as well, as you need to disable $ rustc +nightly -Z unstable-options --print target-spec-json --target aarch64-unknown-linux-gnu
{
"arch": "aarch64",
"crt-static-respected": true,
"data-layout": "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128",
"dynamic-linking": true,
"env": "gnu",
"features": "+outline-atomics",
"has-rpath": true,
"has-thread-local": true,
"is-builtin": true,
"llvm-target": "aarch64-unknown-linux-gnu",
"max-atomic-width": 128,
"os": "linux",
"position-independent-executables": true,
"relro-level": "full",
"supported-sanitizers": [
"address",
"cfi",
"leak",
"memory",
"memtag",
"thread",
"hwaddress"
],
"target-family": [
"unix"
],
"target-mcount": "\u0001_mcount",
"target-pointer-width": "64"
} Not closing this yet because I need to do a few small tests first to ensure this is the case. It seems there's some issues with feature detection in zlib-ng, however. See also japaric/xargo#329. |
This comment was marked as resolved.
This comment was marked as resolved.
@Alexhuszagh This error is caused by detect-wasi, not libz-ng. To reproduce it, you need to clone cargo-bins/cargo-binstall then run the |
Ah good to know. By any chance can you get a minimal package so I can test this locally? |
detect-wasi is quite small (only a few lines of code) and you may be able to reproduce it compiling only detect-wasi since the error is from this crate. |
@Alexhuszagh https://github.com/cargo-bins/cargo-binstall/tree/main/crates/detect-wasi it is inside the cargo-binstall repository as a workspace. |
Thank you, it's getting late here so I'll get to this tomorrow, but I'll email myself to do it first thing tomorrow. |
This isn't reproducing for me with the last main of $ cross --version
cross 0.2.4 (0fcfc0b 2022-09-29)
$ cargo +nightly --version
cargo 1.66.0-nightly (0b84a35c2 2022-10-03)
$ cross +nightly build --target aarch64-unknown-linux-gnu --profile release --no-default-features --features zlib-ng,static,rustls,trust-dns,fancy-no-backtrace,log_release_max_level_debug -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort It does reproduces on cross It seems like the move to GCC 9.4.0 and glibc 2.31 (from GCC 5.4.0 and 2.23) fixes the issue. |
Good to hear that, I'm looking forward to the 0.3.0 release |
If you want stability but also a recent distro, you can always pin to a specific cross version before the official release. We're getting there, there's just some work on the backburner we'd like to solve first. For example, |
Thanks for the advice, I would like to stick with using point release though. Using specific git rev would add a lot of trouble and either makes the CI more expensive or make the code for the CI more complex by adding more caching. Currently we uses taikie-e/install-actions which uses pre-built binaries and I'd like to keep that. |
Checklist
Describe your issue
Running cmd
on cargo-binstall v0.15.0 failed with error:
The error originates from std lib synchronization APIs (thread key, mutex, rwlock
Once
),std::thread::Thead::new
,std::process::Command::output
andstd::sys::unix::fs::remove_dir_impl::remove_dir_all_recursive
.This might be related to #1066
I've tried setting export RUSTFLAGS="-C link-arg=-lgcc -Clink-arg=-static-libgcc" according to https://github.com/cross-rs/cross/wiki/FAQ#undefined-reference-with-build-std but still doesn't work.
Compiling cargo-binstall worked before #1046
What target(s) are you cross-compiling for?
aarch64-unknown-linux-gnu
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.4
Example
No response
Additional information / notes
No response
The text was updated successfully, but these errors were encountered: