Getting GAMBIT to run on OSX (Mojave)


This is mostly a reminder to myself:
1) Install Xcode command line tools
2) Install Homebrew
3) Install the following packages using brew install XXX:
brew install gcc lapack boost gsl wget eigen pkg-config open-mpi cmake libomp
Note that a) boost 1.67 doesn’t work with flexiblesusy (which should be fixed soon). Use boost@1.60; b) gcc8 doesn’t work with Specbit, so you need to use gcc@7 for now.
4) On Mojave, many of these will not be properly linked, since many /usr/local/bin directories are not owned by the owner (??!) brew doctor will tell you what is not linked, then brew link XXX will tell you what needs an ownership change, each of which can be done in the form (where you just need to change the relevant path):
sudo chown -R `whoami`:admin /usr/local/bin
5) get Gambit:
git clone https://github.com/patscott/gambit_1.1.git
(or whatever the repo you want is)
6) build gambit
cd gambit_1.1
mkdir build
Now, gcc on OSX is a lie. It really calls clang. You want:
cmake -D CMAKE_CXX_COMPILER=g++-7 -D CMAKE_C_COMPILER=gcc-7 -D CMAKE_Fortran_COMPILER=gfortran-7 ..
7) make the scanners:
make -j2 scanners
(2 can be replaced by however many cores you have, you fancy person)
8) do the cmake step again
cmake -D CMAKE_CXX_COMPILER=g++-7 -D CMAKE_C_COMPILER=gcc-7 -D CMAKE_Fortran_COMPILER=gfortran-7 ..
9) actually build gambit
make -j2 gambit
10) if that worked, test it!
cd ..
./gambit backends
./gambit scanners
and make whatever you need by going back to the build
11) you should be in business. If gambit throws an error that looks pythony, try
export PYTHONHOME=/usr/lib/python2.7/
export PYTHONPATH=/usr/lib/python2.7/
(it complains about pythonhome, but really needs both…)