Skip to content
Jarno N. Alanko edited this page May 1, 2024 · 2 revisions

Developer documentation: Building a new binary release of Themisto

The most important thing is to link against an old version of glibc to maximize compatibility with older Linux distributions. This is most easily done by building with CentOS 7 using the the Holy Build Box container. To set up the build environment in the build box, follow the instructions below.

Install basic dev tools

yum install devtoolset-10-toolchain git wget
scl enable devtoolset-10 bash

Install Rust (will require a confirmation keypress)

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
. "$HOME/.cargo/env"

Install Cmake from source

wget https://github.com/Kitware/CMake/releases/download/v3.29.2/cmake-3.29.2.tar.gz
tar -xvzf cmake-3.29.2.tar.gz
cd cmake-3.29.2
./bootstrap
make -j6
make install

Compiling Themisto

Before compiling, you should have attached to the latest commit of the release a git tag labeled with the version number of the release. This will set the version number printed by Themisto on startup. To maximize binary compatibility, link to zlib and bzip2 statically, and disable architecture-specific optimizations in Roaring:

git clone https://github.com/algbio/Themisto
cd Themisto/build
cmake .. -DCMAKE_BUILD_ZLIB=1 -DCMAKE_BUILD_BZIP2=1 -DROARING_DISABLE_NATIVE=ON -DCMAKE_BUILD_TYPE=Release
make -j6

Publishing

Make a tar.gz archive containing the Themisto binary, the latest README.md and the license file. Create a new release in Github, update the README to point to that release, and attach the tar.gz archive to the release.