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

Build truly static binaries #20

Closed
vbrandl opened this issue Jun 23, 2018 · 1 comment
Closed

Build truly static binaries #20

vbrandl opened this issue Jun 23, 2018 · 1 comment

Comments

@vbrandl
Copy link

vbrandl commented Jun 23, 2018

Linking Linux binaries against the glibc targets i686-unknown-linux-gnu and x86_64-unknown-linux-gnu will not produce static binaries since it dynamically links against the systems glibc and possibly others (e.g. OpenSSL).
Since binaries produced in CI should work without depending of specific versions of libraries being installed in the users system, I think it is better to link the released binaries against the musl targets (i686-unknown-linux-musl and x86_64-unknown-linux-musl).
While you might have to use helper crates like openssl-probe to make some things work, I prefer truly portable binaries over the alternative.
To link against musl in CI, I use the ekidd/rust-musl-builder image in my CI setup.

Edit: I didn't catch #11 before...

@epage
Copy link
Contributor

epage commented Jun 23, 2018

Went ahead and merged this into #11. Thanks for all of the additional information!

@epage epage closed this as completed Jun 23, 2018
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

No branches or pull requests

2 participants