-
-
Notifications
You must be signed in to change notification settings - Fork 47
Tried to write dynamic symbol definition without a resolution #381
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
I tried to reproduce this, but it does not manifest and I double-checked (by adding a |
Weird, I had encountered it on Ubuntu VM on the company workstation and then on Arch Linux on my home machine. |
Good, now I can reproduce it from an Ubuntu docker image. |
I'm able to reproduce.
It does affect linking of build scripts, however it doesn't affect what linker might be used when those build scripts invoke GCC or clang. The problem was because there were multiple weak definitions of the same function and we were trying to export all of them from the shared object, not just the canonical definition. PR coming... |
I have hit rust-lang/cargo#4423 so many times previously that I think they do not apply. Or at least, not all ways to configure them are applied to build scripts. Anyway, thanks for the fix. I'll restore the /usr/local/bin/ld symlink to wild and see how it goes. |
You can check what linker was used (although GNU ld doesn't write a comment, but the other linkers do):
So for me at least, the setting in ~/.cargo/config.toml is sufficient for build scripts to be linked with wild.
Another option for overriding the linker is setting PATH. e.g. |
Writing a script that would look for binaries in a given path that are not linked with wild would certainly be an option, but I like the nuclear solution: "ld is wild". No build system so far has outsmarted that yet 😉
I cannot recall the specific (it wasn't related to wild), but I have learned it hard way to be wary about RUSTFLAGS when linker script are involved.
Yeah, matter of personal preference. For Dockefiles using |
Error:
Reproduction:
It doesn't reproduce by changing
~/.cargo/config.toml
like in the README because[target.<triple>]
doesn't apply when linking build scripts.The text was updated successfully, but these errors were encountered: