This document describes the alternate Meson build system for Llama, which complements the existing autotools build.
Install Meson build system:
# On macOS with Homebrew
brew install meson
# On Ubuntu/Debian
sudo apt install meson
# On Fedora/RHEL
sudo dnf install meson
# Via pip
pip install mesonmeson setup builddirmeson compile -C builddirmeson test -C builddirmeson install -C builddirmeson setup builddir --buildtype=debugmeson setup builddir --buildtype=releasemeson setup builddir -Dasan=trueThe Meson build system requires the same dependencies as the autotools build:
Required:
- Boost (date_time, program_options, system)
- Lightgrep
- The Sleuth Kit (libtsk)
- DuckDB
- libarchive
- libhasher
- pdfextractor
- jsoncons (header-only)
Optional:
- YARA (for rule-based analysis)
- Catch2 (for testing)
meson.build- Root build file with project configuration and dependenciesmeson_options.txt- Build options (e.g., ASAN support)src/meson.build- Main executable build configurationtest/meson.build- Test suite build configuration
Both build systems are maintained and should produce equivalent results:
| Feature | Autotools | Meson |
|---|---|---|
| Configuration | ./configure |
meson setup builddir |
| Build | make -j8 |
meson compile -C builddir |
| Test | make -j8 check |
meson test -C builddir |
| Install | make install |
meson install -C builddir |
| Clean | make clean |
rm -rf builddir |
Meson has excellent cross-compilation support. Create a cross-file and use:
meson setup builddir --cross-file=cross_file.txt