Quick Start
Supported platforms
| Platform | State |
|---|---|
macOS on Apple silicon (AArch64) |
Tier 1: Primary development platform |
Linux on AArch64 |
Tier 2: Builds and runs, validated |
Linux on x86-64 |
Tier 2: Sources compile; a complete build has not been run |
Other hosts are not currently supported.
Prerequisites
-
CMake 4.1 or newer.
-
LLVM 22.x.
-
A C++20 host compiler. Clang is required if you want Adinkra, the C++ standard library Aburi uses by default. A GCC build still works, but see Building without Adinkra.
-
Clang’s libc++abi (comes with MacOS)
-
Ninja is optional and recommended.
macOS
brew install cmake llvm ninja
Homebrew installs LLVM under its own prefix rather than on the default search path, which is why the configure line below points CMake at it. libc++abi ships with the system, so there is nothing to install for it.
Debian and Ubuntu
The distribution’s LLVM and CMake are usually too old. Take LLVM from apt.llvm.org:
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 22
sudo apt install clang-22 libc++abi-22-dev ninja-build
Get the source
git clone https://github.com/serjective/aburi aburi
cd aburi
Build
macOS:
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="$(brew --prefix llvm)"
cmake --build build
Linux:
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=clang-22 \
-DCMAKE_CXX_COMPILER=clang++-22 \
-DLLVM_DIR=/usr/lib/llvm-22/lib/cmake/llvm
cmake --build build
This produces build/aburi along with the Adinkra standard library. Use
-DCMAKE_BUILD_TYPE=Debug for a debug build (slower to run, faster to compile)
You can run the compiler straight out of the build tree:
./build/aburi -std=c++20 hello.cpp -o hello
./hello
Build options
| Option | Default | Effect |
|---|---|---|
|
|
Build the Adinkra C++ standard library |
|
|
Also build the shared Adinkra runtime |
|
|
Add the public runtime smoke tests |
Install
cmake --install build --prefix /usr/local
This installs the compiler to <prefix>/bin/aburi, its builtin headers to
<prefix>/lib/aburi/builtin_headers, and Adinkra’s headers, runtime, and CMake
package to <prefix>/include/adinkra and <prefix>/lib. With <prefix>/bin on
your PATH, aburi then works from anywhere:
aburi -std=c++20 hello.cpp -o hello
If you need to relocate the compiler/stdlib from its relative locations, set ABURI_ADINKRA_ROOT to the Adinkra location when running.
Check the installation
aburi --version
cat > hello.cpp <<'EOF'
#include <string>
#include <vector>
#include <iostream>
int main() {
std::vector<std::string> greetings{"mema wo akye", "zdravo", "buna", "pershendetje"};
for (const std::string& greeting : greetings) {
std::cout << greeting << '\n';
}
}
EOF
aburi -std=c++20 hello.cpp -o hello && ./hello
To confirm which C++ standard library you got, inspect the result’s linkage. An Adinkra build depends on libc++abi but not on libc++ or libstdc++:
otool -L hello # macOS
ldd hello # Linux
Choosing a standard library
Aburi uses Adinkra by default for C++ on a native macOS or Linux target.
-stdlib=libc++ and -stdlib=libstdc++ select the platform libraries instead,
and ABURI_STDLIB sets a default for a whole build. Note that GCC libstdc++ is not usable with Aburi yet.
Building without Adinkra
Adinkra needs Clang: its headers use __make_integer_seq,
__type_pack_element, __builtin_complex, __builtin_source_location, and the
__builtin_coro_* family, which GCC does not provide. Configuring with GCC
prints a warning and disables Adinkra rather than failing, meaning you will have a compiler with no C++ stdlib to use with. C compilation should still work.
You can deliberately disable Adinkra:
cmake -S . -B build -DABURI_BUILD_ADINKRA=OFF
Troubleshooting
- Undefined
__cxa_throwor__cxa_begin_catchwhen linking C++ -
libcabi is missing. Install `libcabi-22-dev` on Debian or Ubuntu.
couldn’t find file <vector>(or other C++ standard header)-
The C++ standard library was not located. The error lists every root that was searched, including the Adinkra ones, and names the requested and resolved libraries. Set
ABURI_ADINKRA_ROOTor pass--adinkra-root=DIR. - C++ silently uses libc++ instead of Adinkra
-
The compiler could not find an Adinkra tree next to itself and fell back. This usually means the executable was copied out of its build tree or install prefix. Run it from where it was built or installed, or set
ABURI_ADINKRA_ROOT.