-
Notifications
You must be signed in to change notification settings - Fork 167
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
Failed to build on armv7 musl target on Alpine Linux #415
Comments
It seems that the
|
Thanks for the report! I've started working on a fix in #416. |
I can't find any upstream Rust Linux arm targets that enable thumb-mode which hit this. Would you be able to test whether #416 fixes the problem? |
Also fails in Alpine Linux armv7l docker container. |
I just tried this code #[cfg(not(target_arch = "arm"))]
compile_error!("not arm");
#[cfg(all(target_arch = "arm", target_feature = "thumb-mode"))]
compile_error!("arm thumb-mode");
#[cfg(all(target_arch = "arm", not(target_feature = "thumb-mode")))]
compile_error!("arm no thumb-mode");
So it looks like the |
|
~ # rustc --print cfg
debug_assertions
panic="unwind"
target_arch="arm"
target_endian="little"
target_env="musl"
target_family="unix"
target_has_atomic="16"
target_has_atomic="32"
target_has_atomic="64"
target_has_atomic="8"
target_has_atomic="ptr"
target_os="linux"
target_pointer_width="32"
target_vendor="alpine"
unix Indeed. |
no |
$ rustc --print cfg --target armv7-unknown-linux-musleabihf -C target-feature=+thumb-mode
debug_assertions
panic="unwind"
target_arch="arm"
target_endian="little"
target_env="musl"
target_family="unix"
target_feature="crt-static"
target_has_atomic="16"
target_has_atomic="32"
target_has_atomic="64"
target_has_atomic="8"
target_has_atomic="ptr"
target_os="linux"
target_pointer_width="32"
target_vendor="unknown"
unix
$ rustc +nightly --print cfg --target armv7-unknown-linux-musleabihf -C target-feature=+thumb-mode
debug_assertions
panic="unwind"
target_abi="eabihf"
target_arch="arm"
target_endian="little"
target_env="musl"
target_family="unix"
target_feature="aclass"
target_feature="crt-static"
target_feature="dsp"
target_feature="llvm14-builtins-abi"
target_feature="thumb-mode"
target_feature="thumb2"
target_feature="v5te"
target_feature="v6"
target_feature="v6k"
target_feature="v6t2"
target_feature="v7"
target_feature="vfp2"
target_has_atomic="16"
target_has_atomic="32"
target_has_atomic="64"
target_has_atomic="8"
target_has_atomic="ptr"
target_has_atomic_equal_alignment="16"
target_has_atomic_equal_alignment="32"
target_has_atomic_equal_alignment="64"
target_has_atomic_equal_alignment="8"
target_has_atomic_equal_alignment="ptr"
target_has_atomic_load_store="16"
target_has_atomic_load_store="32"
target_has_atomic_load_store="64"
target_has_atomic_load_store="8"
target_has_atomic_load_store="ptr"
target_os="linux"
target_pointer_width="32"
target_thread_local
target_vendor="unknown"
unix Seems like it's working on nightly Rust, not on stable yet. |
This also correctly outputs |
Related rust-lang/rust#83975 (comment) |
Thanks for that info! I didn't realize the |
Still the same error with #420 when building with RUSTFLAGS="-C target-feature=+thumb-mode" cargo build --target armv7-unknown-linux-musleabihf (I think maybe it's because But now it works in Alpine Linux armv7 container. |
this was the setting before, even though it's different from our gcc target. but this breaks compilation of the compiler itself for now, due to a vendored crate. see bytecodealliance/rustix#415
Closing as completed now that #420 is merged and Alpine Linux removed |
https://gitlab.alpinelinux.org/messense/aports/-/jobs/853878
rustc version information:
error message:
The text was updated successfully, but these errors were encountered: