[1] Compilation Conditions
MacOS X Release 10.13[2] Compilation Procedure
standard Mach Kernel (Darwin 17.5.0)
gcc-7.3.0-1osx10.13
gcc-symlinks-7.3.0-1osx10.13
gsl-2.4-10.13hepx3a
XQuartz's X11 (v.2.7.11) for MacOS X
CERNLIB-2006
pythia-6.428-10.13hepx3a.x86_64
pythia8-235-10.13hepx2a.x86_64
fftw3_gcc-3.3.7-1osx10.13
Get the source tar ball from ftp://root.cern.ch/root/ and expand it as
$ tar -zxvf <somewhere>/root_v6.13.02.source.tar.gz
then follow the steps below:
$ tar -zxvf <somewhere>/pythia6.tar.gz
$ cd pythia6
$ ./makePythia6.macosx
$ mkdir ../root/lib
$ cp -p libPythia6.* ../root/lib
$ cd ../root
$ patch -p1 -s < <somewhere>/root_v5.28.00-macosx10.6.patch
$ patch -p1 -s < <somewhere>/root_v6.08.00-macosx.patch
$ mkdir build_root
$ cd build_root
$ cmake -DCMAKE_INSTALL_PREFIX=`pwd`/.. -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_Fortran_COMPILER=gfortran -DPYTHIA6_LIBRARY=/opt/pythia/v6.428/lib/libPythia6.dylib -DPYTHIA8_INCLUDE_DIR=/opt/pythia/v8.235/include -DPYTHIA8_LIBRARY=/opt/pythia/v8.235/lib/libpythia8.dylib -Dminuit2=ON -Droofit=ON -Dgdml=ON -Dgsl_shared=ON -Dunuran=ON -Dcocoa=OFF -Dbonjour=OFF -Dx11=ON ..
$ make -j4
where <somewhere> stands for a directory into which you downloaded the source tarballs and my private patch for root to compile with gfortran.
[3] Installation of a Precompiled Binary Package
Thanks to Remi Mommsen and the ROOT team, ROOT for MacOS X is now available as a Fink package or as a binary tarball from the official ROOT site.
Alternatively, you can use an RPM package through APT/RPM as
$ sudo apt-get update
$ sudo apt-get install root
$ sudo apt-get clean
Before using ROOT, set up enviromental variables by sourcing a setup script as
$ . /opt/root/6.13.02/bin/thisroot.sh
Now you are ready to use ROOT.