The bundled rust-lld linker seems to be broken on macOS on the latest nightly (2020-09-13). The following error occurs:
error: linking with `rust-lld` failed: signal: 6
|
= note: "rust-lld" "-flavor" "gnu" "--eh-frame-hdr" [鈥
= note: dyld: Library not loaded: @rpath/libLLVM.dylib
Referenced from: /Users/runner/work/x86_64/x86_64/testing/target/sysroot/lib/rustlib/x86_64-apple-darwin/bin/rust-lld
Reason: image not found
It worked fine with yesterdays nightly (2020-09-12). The exact version numbers are listed below.
Judging from the diff between these two nightlies, this might be caused by https://github.com/rust-lang/rust/pull/76349. cc @Mark-Simulacrum
Failed on:
rustc 1.48.0-nightly (7402a3944 2020-09-13)
binary: rustc
commit-hash: 7402a394471a6738a40fea7d4f1891666e5a80c5
commit-date: 2020-09-13
host: x86_64-apple-darwin
release: 1.48.0-nightly
LLVM version: 11.0
cargo 1.48.0-nightly (875e01232 2020-09-08)
release: 1.48.0
commit-hash: 875e0123259b0b6299903fe4aea0a12ecde9324f
commit-date: 2020-09-08
Worked on:
rustc 1.48.0-nightly (dbb73f8f7 2020-09-12)
binary: rustc
commit-hash: dbb73f8f79ab176a897d5a95e696adb71b957cbe
commit-date: 2020-09-12
host: x86_64-apple-darwin
release: 1.48.0-nightly
LLVM version: 11.0
cargo 1.48.0-nightly (875e01232 2020-09-08)
release: 1.48.0
commit-hash: 875e0123259b0b6299903fe4aea0a12ecde9324f
commit-date: 2020-09-08
I'm testing a possible fix in #76708.
Unfortunately I'm still getting the same rust-lld error on nightly 2020-09-16 (285fc7d70):
error: linking with
rust-lldfailed: signal: 6
[鈥
= note: dyld: Library not loaded: @rpath/libLLVM.dylib
Referenced from: /Users/runner/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/bin/rust-lld
Reason: image not found
Yeah, it turned out that due to a bash bug the PR that landed didn't actually have any effect, I'm working on a better fix in https://github.com/rust-lang/rust/pull/76810.
Hi, any news on this?
The state as of 3 days ago (https://github.com/rust-lang/rust/issues/76698#issuecomment-694273128) reported in this thread is still accurate.
I tried the nightly-2020-09-12 but this build doesn't exist so I switched to nightly-2020-09-11 and it worked.
Interestingly, while I retried it today, as of 23 Sept 2020 SGT, it also worked perfectly fine so I believe the latest nightly builds have fixed this issue.
Well well well, lets see.
Seems to work indeed!
I pretty much sure this bug turns back on nightly-2020-10-06
rustc 1.49.0-nightly (a1dfd2490 2020-10-05)
binary: rustc
commit-hash: a1dfd2490a6cb456b92e469fa550dc217e20ad6d
commit-date: 2020-10-05
host: x86_64-apple-darwin
release: 1.49.0-nightly
LLVM version: 11.0
That nightly is pretty old, could you test with a more recent nightly and file a new issue if you can reproduce?
Most helpful comment
Yeah, it turned out that due to a bash bug the PR that landed didn't actually have any effect, I'm working on a better fix in https://github.com/rust-lang/rust/pull/76810.