Skip to content
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

link_deps() should also parse DYLD_FALLBACK_LIBRARY_PATH on OS X #155

Open
aldanor opened this issue Jan 12, 2019 · 4 comments
Open

link_deps() should also parse DYLD_FALLBACK_LIBRARY_PATH on OS X #155

aldanor opened this issue Jan 12, 2019 · 4 comments

Comments

@aldanor
Copy link

aldanor commented Jan 12, 2019

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)

@aldanor
Copy link
Author

aldanor commented Jan 12, 2019

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" // ???

@aldanor
Copy link
Author

aldanor commented Jan 12, 2019

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
"

@aldanor
Copy link
Author

aldanor commented Jan 12, 2019

rust-lang/cargo@b7516d3

@aldanor aldanor changed the title link_deps() doesn't seem to work on nightly on osx with workspace crates link_deps() should also parse DYLD_FALLBACK_LIBRARY_PATH on OS X Jan 12, 2019
aldanor added a commit to aldanor/hdf5-rust that referenced this issue Jan 12, 2019
@laumann
Copy link
Collaborator

laumann commented Mar 12, 2019

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants