Bitmaster Build Harness

You would not download sources from an untrusted source, would you?

This is the bitmaster build harness for software written in C or C++ (bmsrc for short). The collection came to be when I was set to work on an ancient build host without up to date software (and no admin access). It’s mostly for me but I will describe the setup briefly.

There is some connection with my recent Emacs configuration adventure.

Source Packages

Source packages reside in src/, each package is stored as a tar.gz file. Packages are extracted on demand when installed

The easiest way to clean a package of build products is to delete its source directory as it will be recreated automatically by the build process.

Note that the master copy in my possession doesn’t contain tar.gz files but each source package is managed by a GIT repository to be able to track upstream changes. The package source directory should not be removed in the master copy as its entire history would be lost.

Package Meta Data

Each package contain four files.

The build and install files are scripts invoked by the top level make file to build and install the package. The url file is the original source location and the version file contains the current package version.

Additionally there is a patch file for each package in src/ describing its modifications compared to upstream. The original upstream sources can be obtained by applying the reverse patch to the sources.

Installing Packages

Type make package-name to install package-name. List the content of src/ to discover available packages.

The installation prefix and number of CPU cores to used when compiling is configured in src/bmsrc.env.

Installed Package Markers

The system to keep track of installed packages is simplistic. It’s just a marker file in installed/ with the package name. Remove such a file to be able to build and install its package again.

Package Dependencies

The top level Makefile manually lists some package dependencies. For example gcc-8 depends on binutils, libelf, gmp, mpfr, mpc and isl. It’s not possible to build it without those packages. In many cases I suppose dependencies are missing and I’ve just relied on what happened to be available on my build hosts.

Ad hoc at best but simple to fix as the system is so transparent.

Tips and Tricks

Packages are are installed to ~/.local by default. You probably wan to add $HOME/.local/lib/pkgconfig to the PKG_CONFIG_PATH environment variable in .profile or similar (depending on shell).

I’ve had trouble building some of the packages on some hosts due to automake versions available. Running autoreconf -f -i in a package root directory may help.

Downloads

Package List

autoconf-2.69
automake-1.16.2
binutils-2.34
ccls-f21fd7e5a2181e342bf2de6cee2854c38b0b21e8
cmake-3.17.3
curl-7.71.1
emacs-27.2
feh-3.4.1
gcc-8.5.0
giflib-5.2.1
gmp-6.2.0
help2man-1.47.16
imlib2-1.4.4
isl-0.22.1
jansson-2.13.1
libelf-0.8.13
libevent-2.1.11
libpng-1.6.37
libtool-2.4.6
llvm-project-12.0.1
mpc-1.1.0
mpfr-4.0.2
ncurses-6.2
patchelf-0.11
st-0.8.4
terminfo-1.742
texinfo-6.7
tmux-3.1b
xsel-1.2.0

Published: 2020-07-04
Revised: 2021-08-09