Closed
Description
ref: https://bugzilla.redhat.com/show_bug.cgi?id=1701339
BUILDSTDERR: error: linking with `cc` failed: exit code: 1
BUILDSTDERR: |
BUILDSTDERR: = note: "cc" [...trimmed arguments...]
BUILDSTDERR: = note: /usr/bin/ld: /builddir/build/BUILD/tokei-9.1.1/target/release/deps/libhandlebars-cbf3fa5b112da913.rlib(handlebars-cbf3fa5b112da913.handlebars.8lxzppfs-cgu.8.rcgu.o): in function `handlebars::registry::Registry::setup_builtins':
BUILDSTDERR: /usr/share/cargo/registry/handlebars-1.2.0/src/registry.rs:116: undefined reference to `handlebars::helpers::helper_if::IF_HELPER'
BUILDSTDERR: /usr/bin/ld: /usr/share/cargo/registry/handlebars-1.2.0/src/registry.rs:117: undefined reference to `handlebars::helpers::helper_if::UNLESS_HELPER'
BUILDSTDERR: /usr/bin/ld: /builddir/build/BUILD/tokei-9.1.1/target/release/build/tokei-b80c0fc585eb7773/build_script_build-b80c0fc585eb7773: hidden symbol `_ZN10handlebars7helpers9helper_if9IF_HELPER17h94bc0b06c1b1df67E' isn't defined
BUILDSTDERR: /usr/bin/ld: final link failed: bad value
BUILDSTDERR: collect2: error: ld returned 1 exit status
BUILDSTDERR:
BUILDSTDERR: error: aborting due to previous error
BUILDSTDERR: error: Could not compile `tokei`.
We ran into this linking failure only on i686 Fedora 30+, with LLVM 8. Other arches are fine with LLVM 8, and all arches are fine with LLVM 7 on Fedora 29.
I can reproduce this building stock tokei with normal crates.io dependencies, so that takes Fedora's crate packaging out of the picture. I also reproduced similar errors with ffsend, but different symbols: colored::style::CLEAR
and time::NSEC_PER_SEC
.
I can't reproduce this with official stable-1.34, 1.35-beta, nor 1.36-nightly compiler builds. However, I can reproduce it when I build those locally myself, even with a minimal config so I'm using rust's llvm-project
. I have no idea what is the difference in my build at this point.