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

Linker issue #1

Open
KillTheMule opened this issue Oct 16, 2018 · 1 comment
Open

Linker issue #1

KillTheMule opened this issue Oct 16, 2018 · 1 comment
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@KillTheMule
Copy link

As of d4d4024, compiling salmagundi and directly running the binary results in this error for me:

target/release/salmagundi: error while loading shared libraries:      libproc_macro-96fdba3b331ee226.so: cannot open shared object file: No such file or directory

Note this happens for both release and debug builds (of course with the appropriate directory reported). Using cargo run, it works for both builds.

Not sure what else matters here, using rust nightly as of de3d640f5, running on gentoo linux, I simply cloned the repo and built. If you need to know anything more, let me know :)

@pthariensflame
Copy link
Owner

Thank you!

This is very definitely a problem with the fact that salmagundi uses syn directly but also uses structopt, which relies on syn internally. This means that cargo will attempt to use only one version of syn if possible, which in turn means that that version of syn gets linked against the compiler-bundled proc-macro crate as a shared library. Then, even though that dependency is no longer necessary at run time, the linker includes it for salmagundi anyway, which fails at load time if the binary is run without instructions on how to find the shared library again (which cargo run somehow provides in the environment).

I have no idea where to begin in fixing this.

@pthariensflame pthariensflame self-assigned this Oct 16, 2018
@pthariensflame pthariensflame added bug Something isn't working help wanted Extra attention is needed labels Oct 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants