Failed testing proc-macros built with -Zbuild-std
#14735
Labels
A-proc-macro
Area: compiling proc-macros
C-bug
Category: bug
S-triage
Status: This issue is waiting on initial triage.
Z-build-std
Nightly: build-std
Problem
When testing proc-macros with
-Zbuild-std
, the binary under test fails to load the standard library (at least on macOS):Steps
Notes
This started happening since rust-lang/rust#131188, because now
$HOME/.rustup/toolchains/$TOOLCHAIN/lib
(which cargo is adding to theDYLD_FALLBACK_LIBRARY_PATH
/LD_LIBRARY_PATH
) no longer includeslibstd-*.dylib
, that is only present in$HOME/.rustup/toolchains/$TOOLCHAIN-$HOST/lib/rustlib/$HOST/lib
(which Cargo normally adds, but doesn't add when using-Zbuild-std
).This was found in sonos/dinghy#238.
Possible Solution(s)
Not sure, perhaps the code that sets
DYLD_FALLBACK_LIBRARY_PATH
/LD_LIBRARY_PATH
cargo/src/cargo/core/compiler/compilation.rs
Lines 293 to 339 in 80d82ca
Version
cargo 1.84.0-nightly (cf53cc5 2024-10-18)
release: 1.84.0-nightly
commit-hash: cf53cc5
commit-date: 2024-10-18
host: aarch64-apple-darwin
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.7.1 (sys:0.4.74+curl-8.9.0 system ssl:(SecureTransport) LibreSSL/3.3.6)
ssl: OpenSSL 1.1.1w 11 Sep 2023
os: Mac OS 14.7.0 [64-bit]
The text was updated successfully, but these errors were encountered: