-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Libraries not provided as arguments to the linker #25691
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
Comments
Also, manually running the
links the final executable successfully. |
Hmm, it's likely due to the fact that A simple fix in the meantime is to either drop the |
The real question is whether this is a |
@Aatch I'm not sure I fully understand what you wrote (I have a However, both the library ( What currently happens is that the dynamic library is fully compiled without any problem (and I tried to reproduce with a toy project: a dylib depending on toml and an executable depending on toml and this dylib, but it fully compiled successfully. However, changing |
However, I agree It's most likely a |
Actually, if I understand correctly rust/src/librustc_trans/back/link.rs Lines 1100 to 1102 in 43cf733
it means that rustc does not link the executable to To test this, I added a |
Actually, it's certainly linked to #14344 (possibly a dupe?). |
@alexcrichton I've let everything on the |
Thanks! After some more investigation I have confirmed that this is a dupe of #14344. |
I didn't manage to narrow it down to a simple example, because I couldn't reproduce it out of my project. So the beast is here: https://github.com/metallirc/metallircd/ on the branch
vberger
.When I run
cargo build
it fails at the linking phase, not able to find the symbols coming from the toml crate.The problem is that, if we compare the arguments provided to rustc by cargo:
and the arguments provided by rustc to the linker:
It appears that, for some reason,
libtoml-e4d393d734aaa578.rlib
is not present in the second list of arguments, even if I have aextern crate toml;
in mymain.rs
.It could be reproduced with these versions of rustc:
and also on travis ( https://travis-ci.org/metallirc/metallircd/builds/63566435 )
The text was updated successfully, but these errors were encountered: