Caution
This document explains how to build Cabin from source. Building from source is not recommended unless you are familiar with the process. If your goal is simply to install Cabin, refer to the README.md instead.
You will require the following compilers, commands, and libraries:
- GCC:
13or later - Clang:
19or later - Apple Clang: provided by
macOS Sequoia (15)or later
(generally, the latest 3 versions are supported to build/test Cabin.)
- GNU Make
- Git
- pkg-config
- find
- grep
- mkdir
- rm
- fmt:
>=9 && <12libfmt-devon APT (Debian/Ubuntu)fmt-develon DNF (Fedora)fmton Homebrew
- libgit2:
>=1.7 && <1.10libgit2-devon APT (Debian/Ubuntu)libgit2-develon DNF (Fedora)libgit2on Homebrew
- libcurl:
>=7.79.1 && <9libcurl4-openssl-devon APT (Debian/Ubuntu)libcurl-develon DNF (Fedora)curlon Homebrew
- nlohmann_json:
>=3.10.5 && <4nlohmann-json3-devon APT (Debian/Ubuntu)json-develon DNF (Fedora)nlohmann-jsonon Homebrew
- oneTBB:
>=2021.5.0 && <2023libtbb-devon APT (Debian/Ubuntu)tbb-develon DNF (Fedora)tbbon Homebrew
- spdlog:
>=1.8.0 && <2.0.0libspdlog-devon APT (Debian/Ubuntu)spdlog-develon DNF (Fedora)spdlogon Homebrew
Installation scripts for libraries:
- APT (Debian/Ubuntu):
sudo apt-get update sudo apt-get install -y libfmt-dev libgit2-dev libcurl4-openssl-dev nlohmann-json3-dev libtbb-dev libspdlog-dev
- DNF (Fedora):
sudo dnf install -y fmt-devel libgit2-devel libcurl-devel json-devel tbb-devel spdlog-devel
- Pacman (Arch/Manjaro):
sudo pacman -Syu sudo pacman -S fmt libgit2 curl nlohmann-json tbb spdlog
- Homebrew:
brew install fmt libgit2 curl nlohmann-json tbb spdlog
When running Make, the following libraries will be installed automatically.
Once you have all the necessary requirements in place, you can build Cabin by the following commands:
git clone https://github.com/cabinpkg/cabin.git
cd cabin
make BUILD=release -j$(nproc) install