Skip to content

Hidden symbol in nightly. #146239

@siennathesane

Description

@siennathesane

When running cargo build --verbose --lib --bins --tests --no-fail-fast --workspace --exclude compliance-tests on nightly, this linker error happens:

error: linking with `cc` failed: exit status: 1  |
      = note:  "cc" "-m64" "<2 object files omitted>" "-Wl,--as-needed" "-Wl,-Bstatic" "/opt/teamcity-agent/temp/buildTmp/rustcuHkehP/{liblibmimalloc_sys-f386dc886ef9faa0,libzstd_sys-4d1bdf22f0af6c0a,liblibz_ng_sys-55cd647bfe47e601}.rlib" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-*.rlib" "-Wl,-Bdynamic" "-ldl" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-L" "/opt/teamcity-agent/temp/buildTmp/rustcuHkehP/raw-dylibs" "-B<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/bin/gcc-ld" "-fuse-ld=lld" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/opt/teamcity-agent/work/4fd10b34be461958/target/release/build/libz-ng-sys-09bbb6b968db038d/out/lib" "-L" "/opt/teamcity-agent/work/4fd10b34be461958/target/release/build/zstd-sys-122eb6fbc9fe3e49/out" "-L" "/opt/teamcity-agent/work/4fd10b34be461958/target/release/build/libmimalloc-sys-b65fdd9ef2cbea04/out" "-L" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/opt/teamcity-agent/work/4fd10b34be461958/target/release/deps/ursa-55cf7196a2c55d3c" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-Wl,--strip-all" "-nodefaultlibs"
      = note: some arguments are omitted. use `--verbose` to show all linker arguments
      = note: rust-lld: error: undefined hidden symbol: __rustc::__rg_oom
              >>> referenced by af43pctzftqzheu2scfg3q3xb
              >>>               /opt/teamcity-agent/work/4fd10b34be461958/target/release/deps/ursa-55cf7196a2c55d3c.af43pctzftqzheu2scfg3q3xb.rcgu.o:(__rustc::__rust_alloc_error_handler)
              collect2: error: ld returned 1 exit status

Code

Unfortunately I can't share the code, but it based on Cloudflare's Pingora.

Version it worked on

It works on 1.85.1, stable, and beta (5 September 2025).

Version with regression

rustc --version --verbose:

rustc 1.91.0-nightly (af00ff2ce 2025-09-04)
12:31:55   binary: rustc
12:31:55   commit-hash: af00ff2ce62b6617ed19305ae39e135ac71d0b22
12:31:55   commit-date: 2025-09-04
12:31:55   host: x86_64-unknown-linux-gnu
12:31:55   release: 1.91.0-nightly
12:31:55   LLVM version: 21.1.0

The compiler did not crash.

Backtrace

Backtrace

<backtrace>

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions