~aman/static-mozjpeg

2068dbb69af48146166df2dd0c49e5f07b5e08fa — Aman Verma 2 months ago 4f3105d
Big update to README: unify with static-opus-tools
1 files changed, 38 insertions(+), 6 deletions(-)

M README.md
M README.md => README.md +38 -6
@@ 1,9 1,34 @@
# Build mozjpeg statically
# Build various encoding tools statically

This is simply a Dockerfile to do a static build of the latest git master of mozjpeg on
This project contains 2 repos: one to do a static build of opus-tools and flac,
and another to do a static build of mozjpeg.

## Instructions

### Build opus-tools and flac statically

This is simply a script to do a static build of opus-tools (and flac) on Linux.
Run it inside a musl-based Linux distribution like Void or Alpine. It grabs the
latest releases of libogg, libflac, libopus, and libopusfile and grabs the git
masters of opus-tools and libopusenc. There is also a Dockerfile based on the
script that you can run if you aren't on a musl-based Linux distribution.

The Docker workflow is

    docker build
    docker cp <name>:/usr/local/bin/ <output_dir>

### Build mozjpeg statically

This is simply a script to do a static build of the latest git master of mozjpeg on
Linux. It is somewhat nontrivial for anyone not used to CMake, so I decided to share
this. After you build it you can run the container and run
this. You have to run it inside a musl-based Linux distribution because glibc
isn't great for static linking. There is also a Dockerfile based on the
script that you can run if you aren't on a musl-based Linux distribution.

The Docker workflow is

    docker build
    docker cp <name>:/home/builder/mozjpeg/build/ <output_dir>

## How to verify the binaries attached in the releases


@@ 30,9 55,9 @@ If you didn't download all the attached executables, signify will complain with 
verification failed", that is **bad** and you should delete the files you downloaded
immediately.

Additionally, the binaries were built on builds.sr.ht, so you can see the log
for the build at <https://builds.sr.ht/~aman/job/302552>. The script prints out
the checksums for the binaries at the end so you can check them that way too.
Additionally, the binaries were built on builds.sr.ht. Read the release notes
to find out where to inspect the log of the build. The script prints out the
checksums for the binaries at the end so you can check them that way too.

[paste]: https://paste.sr.ht/~aman/392dcc7b5e04f047eb6b80addf4f43787e3ff29c
[toot]: https://mastodon.online/web/statuses/104769781342888143


@@ 41,4 66,11 @@ the checksums for the binaries at the end so you can check them that way too.

## Todo

MozJPEG:

- Add a Dockerfile for the latest release when they cut a new one.

opus-tools:

- Experiment with LTO (-flto in CFLAGS and LDFLAGS).
- Try compiling with Clang and LLD.