ROOT on MacOS X

ROOT on MacOS X requires X11 to run interactively. If you have not yet installed X11, install it.

As of ROOT v.3.01.05, MacOS X is officially supported. Consequently, the recent ROOT versions should compile and run out of the box.
So now building "ROOT" is fairly straightforward.
Moreover some official binary distributions for MacOS 10.12 are availabe. If you just want to use ROOT, there is no need for you to compile it. The instruction given below is for those who might want to build it themselves.

[1] Compilation Conditions

MacOS X Release 10.12
standard Mach Kernel (Darwin 16.3.0)
gcc-6.2.0-1osx10.12
gsl-2.2.1-10.12hepx3b
XQuartz's X11 (v.2.7.11) for MacOS X
CERNLIB-2006
pythia-6.428-10.12hepx3b.x86_64
pythia8-215-10.12hepx1b.x86_64
fftw3_gcc-3.3.5-1osx10.12
[2] Compilation Procedure

Get the source tar ball from ftp://root.cern.ch/root/ and expand it as

$ tar -zxvf <somewhere>/root_v6.08.02.source.tar.gz

then follow the steps below:

$ tar -zxvf <somewhere>/pythia6.tar.gz
$ cd pythia6
$ patch -p1 -s < <somewhere>/pythia6416-gfortran.patch
$ ./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
$ ./configure --with-cc=gcc --with-cxx=g++ --with-f77=gfortran --with-ld=g++ --with-pythia6-libdir=/opt/pythia/v6.428/lib --with-pythia8-incdir=/opt/pythia/v8.215/include --with-pythia8-libdir=/opt/pythia/v8.215/lib --enable-minuit2 --enable-roofit --enable-gdml --enable-mathmore --enable-gsl-shared --with-finkdir=/opt/osxws --disable-cocoa --disable-bonjour --with-xml-incdir=/usr/include --with-xml-libdir=/usr/lib --enable-unuran
$ make

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

$ su
# apt-get update
# apt-get install root
# apt-get clean

Before using ROOT, set up enviromental variables by sourcing a setup script as

$ . /opt/root/6.08.02/bin/thisroot.sh

Now you are ready to use ROOT.


Back to Keisuke Fujii's HEP on X Page
keisuke.fujii@kek.jp Dec. 28, 2016