-
Notifications
You must be signed in to change notification settings - Fork 161
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
Distribute a static build #185
Comments
For the curious, the static build have 50MB and 35MB stripped. |
Cool, and thanks for sharing! I will think about how to make this available. I am more than happy to accept PRs to integrate some of the changes needed here, but if you can't spend any more time on this, I understand. |
An update: I've upgraded the Travis infrastructure so that it is a bit more thinkable to generate static binaries on CI and upload them to GitHub releases — see the new driver script for some context. |
@efx it would be great if you could complete the task! |
I also noticed the work in #420 which could be applicable as well; as I get some "free time" I'll investigate that work compared with the above approach. |
Now we have a static build! Thanks @pkgw. |
I know what you're thinking: it's easier said than done!
But I did it! I built a static version of tectonic! It toke a lot of time, but the final patches are really small.
I used the following docker alpine container to do the build:
The image install the requirements including static version of the libs.
The env vars indicates to
tectonic
,pkg-config
andopenssl
packages andrustc
to do a static build.The rename of
AES_cbc_encrypt
toAES_cbc_encrypt2
is to avoid duplicate symbol between tectonic and openssl.The following changes to tectonic are needed:
serde_derive
(it does not work with static musl build). The changes disable loading config, so the final patch needs another approach, maybe implementingDeserialize
TECTONIC_STATIC
as an option tobuild.rs
to static linkstdc++
pkg-config-rs
crate that allows static linking system librariesI can no longer work on it, but I would be glad if anyone could move on from here and add a static builder to travis.
The text was updated successfully, but these errors were encountered: