-
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
Cargo nightly fails to create working executable when linking shared library #3838
Comments
I think this may be related to #3651 perhaps? That change specifically stopped automatically adding directories to |
Thanks Alex! It looks like this was the problem. I've replaced the line:
with one that copies the
The test seems to run (the test binaries can find the What is the best practice to build a Thanks a lot! 👍 |
Ok, good to know the cause at least! For now the predominant convention among |
Great, thanks a lot! I'll close this and fix the EDIT: I actually can't close this... Please do so. |
Sure thing! |
I want to use an FFI crate exposing a C library's API in Rust. This crate is
tensorflow-sys
, hosted here.I am facing an issue when trying to run the crate's tests using a nightly cargo (1.17.0-nightly (b1e31766d 2017-03-03)) while the tests passes fine using stable (1.16).
The issue is that the nightly compiled test binary cannot find, when run, the
.so
library. See issue tensorflow/rust#71.I have created a simple repository to illustrate the problem: https://github.com/nbigaouette/tfsys
The repository contains the same
build.rs
file as used in the original crate, stripped of everything "not needed" (it simply download the.so
library and instruct cargo to link it).I believe the problem is in cargo and not in the original crate (its build script) because cargo nightly version regressed compared to the stable version.
The text was updated successfully, but these errors were encountered: