rust-lld: error: undefined symbol: __gxx_personality_v0
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal reproduction at https://github.com/hasenbanck/rust_lld_bug and run cargo run --release using the affected nightly toolchain. Compare it with RUSTFLAGS="-Z linker-features=-lld" cargo run --release; the issue is done when the release build links successfully with rust-lld without the undefined __gxx_personality_v0 error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100