-
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
Attempt to solve #3366, regarding spurious shared library search paths. #3651
Conversation
…arch paths. This drops `native_dirs` entries that are not within the target directory when modifying the (DY)LD_LIBRARY_PATH environment variable before running programs.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
As it stands, this patch breaks the |
Thanks for the PR! Could you update that test to print out a path that's gets passed through via Cargo? (e.g. print a path in the output dir) |
For the library paths to be passed through, they must reside within the build output directory.
Looks good to me, but I think tests are failing on Windows? |
Oh, FFS: the Windows paths contain |
I think maybe raw/literal strings in Rust may do the trick? |
I was just pasting the build directories into Rust string literals, so Windows paths with backslashes were being interpreted as having unknown string escapes. Raw string guards should fix this for all but the most pathological of build directories.
@bors: r+ |
📌 Commit d545a9f has been approved by |
☀️ Test successful - status-appveyor, status-travis |
@metajack @aturon This makes Servo fail to run unit tests on our |
Any dynamic library that has to be installed manually by the user on Windows will end up with DLLs that are not in |
A change in cargo nightly (merged on February 7th 2017) changed how dynamic libraries are loaded. This prevented the `tensorflow-sys` crate's tests to run. To fix, simply copy the `libtensorflow.so` pre-built library to `OUT_DIR` and change `cargo:rustc-link-search=` path so cargo can find it when running the tests. See: * issue: tensorflow#71 * cargo's pull request: rust-lang/cargo#3651
A change in cargo nightly (merged on February 7th 2017) changed how dynamic libraries are loaded. This prevented the `tensorflow-sys` crate's tests to run. To fix, simply copy the `libtensorflow.so` pre-built library to `OUT_DIR` and change `cargo:rustc-link-search=` path so cargo can find it when running the tests. See: * issue: tensorflow#71 * cargo's pull request: rust-lang/cargo#3651
work around new cargo runtime path changes rust-lang/cargo#3651
Fix add_plugin_deps-related tests. These tests were modified in #3974 in such a way that they stopped testing the `add_plugin_deps` code path. The tests can't be directly reverted because #3651 changed it so that dylib paths must be within the root output directory. I compromised by just copying the dylib into `$OUT_DIR`. Closes #6318.
This drops
native_dirs
entries that are not within the target output when modifying the (DY)LD_LIBRARY_PATH environment variable before running programs.CC #3366