Installing RevBayes from source on Mac OS X
1) Make sure that you have a c++ compiler installed on your computer. GCC 4.2 (or higher) and Apple LLVM version 6.0 have been used successfully. If you don't have a c++ compiler, you can get it on a Mac when you download and install XCode.
2) Make sure that you have CMake installed. One option to install CMake is using homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install cmake
3) Download RevBayes from our github repository. You can either clone the repository using git by running the following command in the terminal
git clone https://github.com/revbayes/revbayes.git revbayes-master
or you can download the zipped source code directly by clicking in the link somewhere on the right side. In this case you need to unzip the source files.
Remember where you downloaded the sources. You will need this directory later.
4) Open a terminal and go to the RevBayes source directory if you haven't already done so, e.g.,
Next, go into the projects and then the cmake subdirectory:
Now you can either build the standard version, e.g., for older Mac OS or Linux distributions using
This builds the standard RevBayes executable rb. Alternatively, you can build the MPI version using instead the
./build.sh -mpi true
build scripts which produces the rb-mpi executable.
5) You should be ready to use RevBayes. We have listed below some potential issue to troubleshoot below.
1) Error cmake not found!
Please go to step 2.
2) Error can't find the libboost_filesystem.dylib library or Library not loaded: libboost_filesystem.dylib
The error you are getting can most likely be solved by the following steps (see also here: https://www.nescent.org/sites/academy/Software_Required). You basically need to add the directory to the boost libraries to your
DYLD_LIBRARY_PATH every time you open a new terminal window.
To get around this, you can add this to your .bash_profile. This file lives in your home directory.
To change this, open a new terminal window and you should be in the home directory. Use the text editor nano to create this file type:
This will open the nano editor and you can paste in the
export DYLD_LIBRARY_PATH line above.
Then save the file using
ctrl^o and hit return, then exit using
Now quit the Terminal app and reopen it and the boost libraries will forever be in your path.
3) -bash: rb: command not found
The problem is that you tried to run RevBayes but your computer doesn't know where the executable is. The easiest way is to set add the directory in which you compiled RevBayes to your path variable. You can do this by following exactly the instructions given for problem 2).