Skip to content

Incremental compilation linker error: 'relocation R_X86_64_PC32 against undefined hidden symbol' #67802

Closed
@Aaron1011

Description

@Aaron1011

This looks very similar to #59535 - maybe #67020 didn't fix it completely.

This occured during incremetal compilation of rustc, so I don't really have a good reproducer. Here's the relevant part of the error:

  = note: /usr/sbin/ld: /tmp/rustcgtN4Kl/librustc_lint-0370311e82758631.rlib(rustc_lint-0370311e82758631.1cfi9zh1qwftgcfw.rcgu.o): in function `rustc::ty::sty::DebruijnIndex::from_u32':
          /home/aaron/repos/rust/<::std::macros::panic macros>:3: undefined reference to `anon.3397d7d767771b30960460dfd4dee5de.2.llvm.13934392132103289839'
          /usr/sbin/ld: /tmp/rustcgtN4Kl/librustc_lint-0370311e82758631.rlib(rustc_lint-0370311e82758631.1cfi9zh1qwftgcfw.rcgu.o): relocation R_X86_64_PC32 against undefined hidden symbol `anon.3397d7d767771b30960460dfd4dee5de.2.llvm.13934392132103289839' can not be used when making a shared object
          /usr/sbin/ld: final link failed: bad value
          clang-9: error: linker command failed with exit code 1 (use -v to see invocation)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-incr-compArea: Incremental compilationA-linkageArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions