Skip to content
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

rust-lld: error: undefined symbol: __gxx_personality_v0 #135257

Open
hasenbanck opened this issue Jan 8, 2025 · 0 comments
Open

rust-lld: error: undefined symbol: __gxx_personality_v0 #135257

hasenbanck opened this issue Jan 8, 2025 · 0 comments
Labels
C-bug Category: This is a bug. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged.

Comments

@hasenbanck
Copy link

We encountered a bug, where the experimental rust-lld currently activated under nightly linux / x86-64, can't links certain executables in release mode with the "intel_tex_2" crate. Switching to the old linker solves the problem.

I created a small repository which includes a minimal example.

https://github.com/hasenbanck/rust_lld_bug

It will crash when compiled via:

cargo run --release

Normaly it should compile fine, but we instead get the following error:

error: linking with `cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH=".....*A LOT OF PATHS*...."
  = note: some arguments are omitted. use `--verbose` to show all linker arguments
  = note: rust-lld: error: undefined symbol: __gxx_personality_v0
          >>> referenced by ispc_texcomp_astc.cpp
          >>>               ispc_texcomp_astc.o:(DW.ref.__gxx_personality_v0) in archive /mnt/c/Development/rust_lld_bug/target/release/deps/libintel_tex_2-2caaaa92d5e41391.rlib
          collect2: error: ld returned 1 exit status

error: could not compile `rust_lld_bug` (bin "rust_lld_bug") due to 1 previous error

We used the nightly toolchain 2025-01-07, but older nightly versions are also affected.
We reproduces this error under WSL Ubuntu 24.04 and Fedora 41 running on bare metal.

The old linker works fine:

RUSTFLAGS="-Z linker-features=-lld" cargo run --release
@hasenbanck hasenbanck added the C-bug Category: This is a bug. label Jan 8, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged.
Projects
None yet
Development

No branches or pull requests

2 participants