Compile on Linux

The standard way to build revbayes is to use cmake. If you want to compile using meson, see revbayes/projects/meson/


First you will need to install gcc, cmake and boost

If you have root

Install these using your distribution’s package manager


sudo apt install build-essential cmake libboost-all-dev

If you do not have root

You will need your administrator to install build-essential (or equivalent package containing gcc) for you. If possible, ask them to install cmake as well.

If you need to compile CMake yourself:

TODO: Test instructions for installing cmake

Then you can compile boost:

curl -O -L
tar -xzvf boost_1_71_0.tar.gz
cd boost_1_71_0.tar.gz
./ --with-libraries=atomic,chrono,filesystem,system,regex,thread,date_time,program_options,math,serialization
./b2 link=static

When it is done, something like the following will be printed. You will need these paths for the next step.

The following directory should be added to compiler include paths:


The following directory should be added to linker library paths:



Then obtain the source:

git clone revbayes

To compile with system boost:

cd revbayes/projects/cmake

To compile with a locally compiled boost, do the following. Be sure to replace the paths in the build command with those you got from boost in the previous step.

cd revbayes/projects/cmake
./ -boost_root /root/boost_1_71_0 -boost_lib /root/boost_1_71_0/stage/lib

For the MPI version:

./ -mpi true