compiletest-rs
compiletest-rs copied to clipboard
link_deps() should also parse DYLD_FALLBACK_LIBRARY_PATH on OS X
This seems to have something to do with nightly, not sure exactly what. Also, it only happens on OS X (I'm running the same tests on travis/appveyor on linux/osx/win).
I've tried adding some logging before/after calling config.link_deps()
, here's the results (formatted for readability):
stable:
BEFORE: None
AFTER: Some("
-L ~/dev/rust/hdf5-rs/target/debug/deps
-L ~/dev/rust/hdf5-rs/target/debug
-L ~/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib
-L ~/.rustup/toolchains/stable-x86_64-apple-darwin/lib
")
nightly:
BEFORE: None
AFTER: Some(" -L ~/.rustup/toolchains/nightly-x86_64-apple-darwin/lib")
I'm a bit lost; any thoughts? (will try to keep digging to see if there's anything else I can find out)
This seems to be related to DYLD_LIBRARY_PATH
which .link_deps()
tries to parse; logging it yields:
// stable
DYLD_LIBRARY_PATH = "
~/dev/rust/hdf5-rs/target/debug/deps
:~/dev/rust/hdf5-rs/target/debug
:~/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib
:~/.rustup/toolchains/stable-x86_64-apple-darwin/lib
"
// nightly
DYLD_LIBRARY_PATH = "~/.rustup/toolchains/nightly-x86_64-apple-darwin/lib" // ???
However, now there's this, which seems to have all of the missing paths: (???)
DYLD_FALLBACK_LIBRARY_PATH = "
~/dev/rust/hdf5-rs/target/debug/deps
:~/dev/rust/hdf5-rs/target/debug
:~/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib
"
https://github.com/rust-lang/cargo/pull/6355/commits/b7516d386377dc2de5fd892a5f97bb62cf71888a
@aldanor Thanks for tracking this. Can we just make the change to link_deps()
directly and use DYLD_FALLBACK_LIBRARY_PATH
instead of DYLD_LIBRARY_PATH
? Or are there some caveats?