Skip to content

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

Open
@hasenbanck

Description

@hasenbanck

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesA-linkersArea: linkers... you gotta love linkersC-bugCategory: This is a bug.S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-untriagedUntriaged performance or correctness regression.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions