Closed malbarbo closed 4 years ago
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.
This looks great! @malbarbo have you been able to work on this with the new driver script @pkgw mentioned? If not I can help complete this task.
@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.