-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix default DYLD_FALLBACK_LIBRARY_PATH on MacOS. #6625
Conversation
r? @dwijnand (rust_highfive has picked a reviewer for you, use r? to override) |
I think we should consider backporting to beta since this is a regression from stable. |
2697783
to
e1d0761
Compare
@bors: r+ Sounds good to me! A backport to beta also sound good to me |
📌 Commit e1d0761 has been approved by |
⌛ Testing commit e1d0761 with merge f18c9d56c6e8551c3e519261ed0a3994000eace0... |
💔 Test failed - checks-travis |
@bors retry |
Fix default DYLD_FALLBACK_LIBRARY_PATH on MacOS. On MacOS, dyld uses the default `$(HOME)/lib:/usr/local/lib:/lib:/usr/lib` for `DYLD_FALLBACK_LIBRARY_PATH` when it is not set. #6355 switched cargo to use `DYLD_FALLBACK_LIBRARY_PATH`, which means the default paths no longer worked. This explicitly adds the defaults back to the end of the list. Fixes #6623
☀️ Test successful - checks-travis, status-appveyor |
So fast! Thanks everyone!! |
[BETA] Fix default DYLD_FALLBACK_LIBRARY_PATH on MacOS. Backport of #6625.
Bump cargo to 865cb70 Merged PRs: * Replace util::without_prefix with Path::strip_prefix rust-lang/cargo#6620 * keep track of crates that are whitelisted to be used even if yanked rust-lang/cargo#6611 * Fix default DYLD_FALLBACK_LIBRARY_PATH on MacOS. rust-lang/cargo#6625 * Bail when trying to run "test --doc --no-run" rust-lang/cargo#6628 * In cargo test's help, add that examples are built rust-lang/cargo#6619 * Extract & re-use filter_targets in cargo_compile rust-lang/cargo#6621 * Test cleanup: remove unnecessary with_status(0) rust-lang/cargo#6630 * Fix run's help message rust-lang/cargo#6631 * Some updates to bash completion. rust-lang/cargo#6644 * Introduce Source::download_now rust-lang/cargo#6637 * Switch from unused_imports to deprecated to test unfixable warnings rust-lang/cargo#6649
Bump cargo to 865cb70 Merged PRs: * Replace util::without_prefix with Path::strip_prefix rust-lang/cargo#6620 * keep track of crates that are whitelisted to be used even if yanked rust-lang/cargo#6611 * Fix default DYLD_FALLBACK_LIBRARY_PATH on MacOS. rust-lang/cargo#6625 * Bail when trying to run "test --doc --no-run" rust-lang/cargo#6628 * In cargo test's help, add that examples are built rust-lang/cargo#6619 * Extract & re-use filter_targets in cargo_compile rust-lang/cargo#6621 * Test cleanup: remove unnecessary with_status(0) rust-lang/cargo#6630 * Fix run's help message rust-lang/cargo#6631 * Some updates to bash completion. rust-lang/cargo#6644 * Introduce Source::download_now rust-lang/cargo#6637 * Switch from unused_imports to deprecated to test unfixable warnings rust-lang/cargo#6649
When loading and linking a dynamic library or bundle, dlopen searches in LD_LIBRARY_PATH, DYLD_LIBRARY_PATH, PWD, and DYLD_FALLBACK_LIBRARY_PATH. In the Mach-O format, a dynamic library has an "install path." Clients linking against the library record this path, and the dynamic linker, dyld, uses it to locate the library. dyld searches DYLD_LIBRARY_PATH *before* the install path. dyld searches DYLD_FALLBACK_LIBRARY_PATH only if it cannot find the library in the install path. Setting DYLD_LIBRARY_PATH can easily have unintended consequences. See https://users.rust-lang.org/t/subprocess-and-dynamic-library-linking-problem-interaction/7873/10 See https://trac.macports.org/ticket/57692 See https://bugzilla.mozilla.org/show_bug.cgi?id=1536486 This is the same change as was applied to cargo in rust-lang/cargo#6355 See also rust-lang/cargo#6625 and rust-lang/cargo#6625
This is still an issue because Cargo is setting EDIT: Ignore me, it's not cargo but something else, it seems. Sent with GitHawk |
On MacOS, dyld uses the default
$(HOME)/lib:/usr/local/lib:/lib:/usr/lib
forDYLD_FALLBACK_LIBRARY_PATH
when it is not set. #6355 switched cargo to useDYLD_FALLBACK_LIBRARY_PATH
, which means the default paths no longer worked. This explicitly adds the defaults back to the end of the list.Fixes #6623