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

liblightning needs to be able to be linked statically #22

Closed
kulp opened this issue May 10, 2020 · 0 comments · Fixed by #23
Closed

liblightning needs to be able to be linked statically #22

kulp opened this issue May 10, 2020 · 0 comments · Fixed by #23

Comments

@kulp
Copy link
Collaborator

kulp commented May 10, 2020

Since #10 switched to dylib linking for liblightning, there is a problem -- an external user of lightning-sys will not know where to find the dynamic liblightning (such as liblightning.so.1 on Linux, or liblightning.dylib on macOS), because it exists only in the crate build directory. This can manifest like this:

<name-of-binary>: error while loading shared libraries: liblightning.so.1: cannot open shared object file: No such file or directory

For example, even cargo tarpaulin does not find liblightning.so.1 unless it happens to be installed on the host computer already.

This was an unintended consequence of #10. I think static linking would be best, for multiple reasons, but I do not yet have an idea how to make it work given the issues raised in e9301f4.

We could reinstate the workaround from c465a46 (removed in 522ee66), but that is a bit of a hack.

Originally posted by @kulp in #21 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant