
Description
Code
I tried this on the latest nightly compiler installed by rustup
:
cargo build
I expected to see this happen: My project builds.
Instead, this happened: rustc
crashed due to a dynamic library linkage problem.
Version it worked on
It most recently worked on: rustc 1.67.0-nightly (96ddd32c4 2022-11-14)
.
Version with regression
rustc --version --verbose
:
It crashes without giving the version, but so far it affects the rustup
toolchains nightly-2022-11-16
, nightly-2022-11-17
, and nightly
(which I assume is the same as nightly-2022-11-17
for now.)
Backtrace
The rustc
binary segfaults with the following output:
dyld: Library not loaded: @rpath/librustc_driver-dae4a1cad6347bf8.dylib
Referenced from: /Users/abuse/.rustup/toolchains/nightly-x86_64-apple-darwin/bin/rustc
Reason: no suitable image found. Did find:
/Users/abuse/.rustup/toolchains/nightly-x86_64-apple-darwin/bin/../lib/librustc_driver-dae4a1cad6347bf8.dylib: cannot load 'librustc_driver-dae4a1cad6347bf8.dylib' (load command 0x80000034 is unknown)
/Users/abuse/.rustup/toolchains/nightly-x86_64-apple-darwin/bin/../lib/librustc_driver-dae4a1cad6347bf8.dylib: stat() failed with errno=1
/Users/abuse/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/librustc_driver-dae4a1cad6347bf8.dylib: cannot load 'librustc_driver-dae4a1cad6347bf8.dylib' (load command 0x80000034 is unknown)
/Users/abuse/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/librustc_driver-dae4a1cad6347bf8.dylib: stat() failed with errno=1
Abort trap: 6
Setting RUST_BACKTRACE=1
does not get further diagnostics, probably because the compiler isn't even being run due to the linkage problem.
Likely cause
I am running MacOS Mojave. Yes, this is quite an old OS release, and no, I'm not intending to upgrade any time soon. It seems likely that whoever is building binaries for the x86_64-apple-darwin
target has upgraded their build environment and/or changed some settings, inadvertently causing it to produce binaries which require a newer version of MacOS. (Xcode is unhelpful like that.) I haven't seen any announcement of dropping of support for older MacOS versions.