Skip to content

Build fails on armv7: Invalid attribute group entry (Producer: 'LLVM19.1.7-rust-1.86.0-stable' Reader: 'LLVM 18.1.6') #140343

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

Closed
yurivict opened this issue Apr 26, 2025 · 2 comments
Labels
C-external-bug Category: issue that is caused by bugs in software beyond our control

Comments

@yurivict
Copy link

Build of the nushell project fails on armv7:

  = note: ld: error: /wrkdirs/usr/ports/shells/nushell/work/target/release/deps/libnu_explore-86352eedad260480.rlib(nu_explore-86352eedad260480.nu_explore.1c17d43c8d09c5dd-cgu.00.rcgu.o): Invalid attribute group entry (Producer: 'LLVM19.1.5-rust-1.84.0-stable' Reader: 'LLVM 18.1.5')
          cc: error: linker command failed with exit code 1 (use -v to see invocation)

log

This is possibly because the system compiler is based on clang-19 but rust uses the bundled llvm-18.
This problem doesn't happen on any other architectures.

$ rustc --version --verbose
rustc 1.86.0 (05f9846f8 2025-03-31) (built from a source tarball)
binary: rustc
commit-hash: 05f9846f893b09a1be1fc8560e33fc3c815cfecb
commit-date: 2025-03-31
host: x86_64-unknown-freebsd
release: 1.86.0
LLVM version: 19.1.7

FreeBSD 14.1

@yurivict yurivict added the C-bug Category: This is a bug. label Apr 26, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Apr 26, 2025
@nikic
Copy link
Contributor

nikic commented Apr 26, 2025

This is possibly because the system compiler is based on clang-19 but rust uses the bundled llvm-18.

Based on the error message, it's the other way around. Rust is using LLVM 19, while Clang is on LLVM 18. That's generally not a problem, but you are explicitly asking for cross-language LTO (-C linker-plugin-lto in the build log), in which case you need to ensure the versions are compatible.

@nikic nikic closed this as not planned Won't fix, can't repro, duplicate, stale Apr 26, 2025
@yurivict
Copy link
Author

@jieyouxu jieyouxu added C-external-bug Category: issue that is caused by bugs in software beyond our control and removed C-bug Category: This is a bug. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-external-bug Category: issue that is caused by bugs in software beyond our control
Projects
None yet
Development

No branches or pull requests

4 participants