Skip to content

Installation

Derek Snider edited this page May 19, 2026 · 2 revisions

Installation

madc builds from source on Linux x86-64 systems.

Requirements

  • g++ with C++11 support
  • asmjit v1.14 (built from source — see below)
  • cmake (to build asmjit)

Step 1: Install asmjit

madc uses asmjit v1.14 for JIT compilation. Build it from source:

git clone https://github.com/asmjit/asmjit.git
cd asmjit
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local
make -j$(nproc)
sudo make install
sudo ldconfig

Verify the installation:

pkg-config --modversion asmjit    # should show 1.14.x
ls /usr/local/lib/libasmjit.so    # library exists
ls /usr/local/include/asmjit/     # headers exist

Note: The libasmjit-dev apt package installs an older, incompatible version. madc requires the v1.14 build at /usr/local/.

Step 2: Build madc

git clone https://github.com/derekbsnider/madc.git
cd madc
make -C src

The binary lands at bin/madc.

Step 3: Verify

bin/madc tests/testint.mad

You should see output like:

123: 123
i: 456
j: 456

Optional: Install system-wide

sudo cp bin/madc /usr/local/bin/

Then you can run madc from anywhere:

madc myprogram.mad

Running the test suite

make -C src fulltest    # unit tests + all integration tests

This runs 260+ unit tests and 280+ integration tests. Everything should pass on a clean build.

What's next?

Clone this wiki locally