Installation
Precompiled binaries
Binaries are provided for 64-bit x86 Linux, ARM-based MacOSX, and Windows at https://github.com/MikkelSchubert/adapterremoval/releases/
Installing from source
This section describes how to build and install the latest version of AdapterRemoval from source.
AdapterRemoval uses make to simplify invoking the underlying meson build system. Power-users and package managers may invoke meson directly; use make -Bn to view the recommended build commands.
Prerequisites
Building and installing AdapterRemoval requires the following:
makeA C++17 capable compiler, such as GCC v9+ or Clang v8+. If using GCC, then v11+ is required for AVX512 support
meson v0.56+
ninja v1.10+ (may work with older versions)
python 3.7+
libdeflate v1.7+ (may work with older versions)
isa-l v2.30+
Sphinx is required to build the man page (on by default) and the full documentation (off by default)
Of these dependencies, only libdeflate and isa-l are required to run AdapterRemoval once it has been installed.
Debian and related distributions:
sudo apt-get install build-essential meson ninja-build libdeflate-dev libisal-dev python3 python3-sphinx pkgconfOSX, requires Homebrew to install the dependencies:
brew install llvm meson ninja isa-l libdeflate sphinx-doc pkgconfWindows, requires MSYS2 with an UCRT64 environment:
pacman -S make mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-isa-l mingw-w64-ucrt-x86_64-libdeflate mingw-w64-ucrt-x86_64-meson mingw-w64-ucrt-x86_64-python mingw-w64-ucrt-x86_64-python-sphinx
Building AdapterRemoval
To compile AdapterRemoval, first download and unpack the newest release from GitHub, and then run make in the resulting directory:
wget -O adapterremoval-3.0.2.tar.gz https://github.com/MikkelSchubert/adapterremoval/archive/v3.0.2.tar.gz
tar xvzf adapterremoval-3.0.2.tar.gz
cd adapterremoval-3.0.2
make setup
make
It is furthermore recommended to run the test-suite to verify that AdapterRemoval works correctly on your system:
make tests
The resulting adapterremoval3 executable is located in the build/src subdirectory, and can be run as-is. It is also possible to perform a system-wide installation of the AdapterRemoval executable, man-page, and examples using the following command:
sudo make install
Build options
The following options may be passed to make when building AdapterRemoval. For example, to build AdapterRemoval without the man page, thereby removing the dependency on Sphinx:
make setup MANPAGE=disabled
make
Core options:
MANPAGE=enabled/MANPAGE=disabled/MANPAGE=autoto enable or disable building of the man page. Requires Sphinx. If set toauto, the man page will only be built if Sphinx is available. Defaults toenabled.DOCS=enabled/DOCS=disabled/DOCS=autoto enable or disable building of the full documentation available at https://adapterremoval.readthedocs.org. Requires Sphinx. If set toauto, the documentation page will only be built if Sphinx is available. Defaults todisabled.STATIC=trueorSTATIC=falseto build statically or dynamically linked binary. Static libraries must be available to build a static binary. Defaults tofalse.HARDEN=true/HARDEN=falseto enable / disable additional hardening flags during compilation. In some cases it may be necessary to disable these, if the build-system also sets hardening flags. Defaults totrue.PREFIX=/path/to/prefixis passed to the meson using the--prefixoption. Is not set by default.
Development and experimental options:
COVERAGE=true/COVERAGE=falseto include coverage instrumentation in the build. Defaults tofalse.DEBUG=true/DEBUG=falseto toggle runtime POSIX asserts. Defaults tofalse, unlessCOVERAGEis set totrue.LTO=true/LTO=falseto toggle link-time optimization (experimental). Causes irreproducible builds and possibly other issues. Defaults tofalse.LTO_MODE=thin/LTO_MODE=defaultto select the link-time optimization mode.thinis recommended, but older systems may need to usemake LTO_MODE=default. Defaults tothin.UV=enabled/UV=disabled/UV=autoto select whether or not uv should be used to install optional requirements for running regression tests (fastjsonschema). Defaults toauto, which usesuv >= 0.5.17if it is available.SANITIZE=true/SANITIZE=falseto enable address and undefined behavior sanitation at runtime. This has a significant performance overhead. Defaults tofalse.