-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant 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.Performance or correctness regression from stable to nightly.
Description
The newest nightly breaks static musl builds.
This is most likely to be caused by the landing of #40113
Here's a very simple demo: https://github.com/golddranks/rustc_broken_static_demo (Try running build_old.sh
and build_new.sh
)
The scripts build the hello world program in two environments: one with nightly 2017-08-23
and one with 2017-08-24
. The latter contains the PR #40113. The Dockerfile for the image is here: https://github.com/golddranks/rust_musl_docker
The former succeeds, whereas the latter fails with:
Running `rustc --crate-name rustc_broken_static_demo src/main.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=5a6a9f373ff62f0b -C extra-filename=-5a6a9f373ff62f0b --out-dir /workdir/target/x86_64-unknown-linux-musl/debug/deps --target x86_64-unknown-linux-musl -L dependency=/workdir/target/x86_64-unknown-linux-musl/debug/deps -L dependency=/workdir/target/debug/deps`
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-nostdlib" "-Wl,--eh-frame-hdr" "-Wl,-(" "-m64" "/root/.rustup/toolchains/nightly-2017-08-24-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/crt1.o" "/root/.rustup/toolchains/nightly-2017-08-24-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/crti.o" "-L" "/root/.rustup/toolchains/nightly-2017-08-24-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib" "/workdir/target/x86_64-unknown-linux-musl/debug/deps/rustc_broken_static_demo-5a6a9f373ff62f0b.0.o" "-o" "/workdir/target/x86_64-unknown-linux-musl/debug/deps/rustc_broken_static_demo-5a6a9f373ff62f0b" "/workdir/target/x86_64-unknown-linux-musl/debug/deps/rustc_broken_static_demo-5a6a9f373ff62f0b.crate.allocator.o" "-Wl,--gc-sections" "-Wl,-z,relro,-z,now" "-nodefaultlibs" "-L" "/workdir/target/x86_64-unknown-linux-musl/debug/deps" "-L" "/workdir/target/debug/deps" "-L" "/root/.rustup/toolchains/nightly-2017-08-24-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib" "-Wl,-Bstatic" "/root/.rustup/toolchains/nightly-2017-08-24-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd-1873b4d191d228e8.rlib" "/root/.rustup/toolchains/nightly-2017-08-24-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/librand-655f47aee8a3420b.rlib" "/root/.rustup/toolchains/nightly-2017-08-24-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/liballoc_jemalloc-ab5831f4fba53ade.rlib" "/root/.rustup/toolchains/nightly-2017-08-24-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/liballoc_system-1c88582d9022c1cc.rlib" "/root/.rustup/toolchains/nightly-2017-08-24-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libpanic_unwind-fa52c59d2108c1f8.rlib" "/root/.rustup/toolchains/nightly-2017-08-24-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libunwind-45a286e82269a40e.rlib" "/root/.rustup/toolchains/nightly-2017-08-24-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/liblibc-d9d4ae8ab67a6001.rlib" "/root/.rustup/toolchains/nightly-2017-08-24-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/liballoc-d1d3fb714ff1a835.rlib" "/root/.rustup/toolchains/nightly-2017-08-24-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd_unicode-10859fb08aa219d9.rlib" "/root/.rustup/toolchains/nightly-2017-08-24-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libcore-da02dfafc4660314.rlib" "/root/.rustup/toolchains/nightly-2017-08-24-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libcompiler_builtins-126bb39b1b53af10.rlib" "-l" "unwind" "-static" "-Wl,-Bdynamic" "/root/.rustup/toolchains/nightly-2017-08-24-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/crtn.o" "-Wl,-)"
= note: /usr/bin/ld: cannot find -lunwind
shepmaster
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant 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.Performance or correctness regression from stable to nightly.