-
Notifications
You must be signed in to change notification settings - Fork 27
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
enable static linking #76
Conversation
@faldez awesome. Could you also add a CI job to validate this? |
Should I add separate job for static and dynamic? Or I just install necessary packages to existing jobs? |
I'd add it to the matrix so we ensure it works for all platforms. |
@faldez could you take a look at this? it'd be awesome to have it being tested on CI. |
I've added the deps for linux and macos, but I think I need to update rust cross image for aarch64 and armv7 tests |
I'm trying to get #81 fixed before we extend the CI; it is currently failing on Windows. |
Please rebase the PR. |
This applies part of commit from PR #76 which is unrelated. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
I have committed the unrelated workflow changes and merged the Docker images. Thanks for all that. I was reviewing the new code, and it is relatively complicated. So did you try the workaround in rust-lang/pkg-config-rs#102 (comment)? It'd be easier to understand if a good comment is added explaining the issue. |
actually I haven't tried that, I think I did this before noticing that workaround. All I did is linking every library necessary manually instead of relying on pkg-config crates. I'll add comment to explains the steps. though, it still failing on CI for nightly, because is the workaround includes moving/symlink necessary paths to another directory and declare them as |
Maybe, it's worth asking in the original issue about the workaround so we could use it here instead of adding all the linking of libraries manually? |
I tried to get back to this, but someone state that workaround in rust-lang/pkg-config-rs#102 (comment) cannot be used when cross compiling rust-lang/pkg-config-rs#102 (comment). I think manually link all the necessary libraries is the only option for now. |
@faldez please fix clippy issues, so we can try to get this merged. |
pkg-config can't statically link libraries inside
/usr/lib
which usually where libraries are installed as stated here rust-lang/pkg-config-rs#102This PR enable static linking via feature flags. To test extra dependencies is needed
Linux
macOS