Closed
Description
This can be reproduced in a centos 5 docker container, such as the one provided by python's pypa:
docker run -it quay.io/pypa/manylinux1_x86_64 bash
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly
source $HOME/.cargo/env
rustup toolchain add stable
cargo new hello-world
cd hello-world
cargo +stable build # This works
cargo build # This crashes
The last command produces the following error:
error: process didn't exit successfully: `rustc -vV` (exit code: 1)
--- stdout
rustc 1.33.0-nightly (96d1334e5 2018-12-14)
binary: rustc
commit-hash: 96d1334e567237b1507cd277938e7ae2de75ff51
commit-date: 2018-12-14
host: x86_64-unknown-linux-gnu
release: 1.33.0-nightly
--- stderr
error: couldn't load codegen backend "/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so": "/lib64/libgcc_s.so.1: version `GCC_4.3.0\' not found (required by /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so)"
Versions:
cat /etc/redhat-release
: CentOS release 5.11 (Final)
cargo -V
: cargo 1.33.0-nightly (2cf1f5dda 2018-12-11)
rustc -V
: rustc 1.33.0-nightly (96d1334e5 2018-12-14)
rustc -vV
: crashes with the same output as above
Activity
alexcrichton commentedon Dec 15, 2018
Some bisection reveals that this is a regression from #56051 actually, and I suspect the most likely candidate of that rollup is #55952
cc @michaelwoerister
As to why these symbols are just now showing up, I'm not sure...
alexcrichton commentedon Dec 16, 2018
Ok I've confirmed #55952 is the cause of this bug. I don't really know how this is showing up though as none of the symbols which use
GCC_4.3.0
are even referenced from the file:None of those symbols are even used from
llc
or LLVM or... anywhere it seems. I have no idea what's putting that into some symbol table that needs to be resolved.This may be some LLD change though because if I disable ThinLTO for LLVM itself then these symbol references seem to go away...
alexcrichton commentedon Dec 16, 2018
Ok I've bisected this to rust-lang/lld@103b4dc, which makes sense sort of because that's injecting references to all builtins, even if we're not actually using them.
I'll follow up with LLVM later tomorrow
alexcrichton commentedon Dec 16, 2018
Or actually, I've gone ahead and opened an upstream bug report to get the ball rolling there.
This is also a beta regression as well, so I'm retagging as such.
I believe the only solution we have for now on this is to turn off ThinLTO, so I'm going to send a PR to do that.
rustc: Disable ThinLTO for LLVM's build
alexcrichton commentedon Dec 16, 2018
Er turns out this is likely already fixed at llvm-mirror/lld@3be4e82, so I can try out building that locally
rustc: Update Clang used to build LLVM on LInux
17 remaining items