Install ROOT CERN on Mac OS X 10.7 Lion

Prerequisites

First, you need to install XCode 4 which can be found in the Mac App Store. You need it because it's providing the compiler and the git binary. Then install Homebrew using ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)".

ROOT Installation

Installing ROOT using configure and make is fairly easy. I recommend the following procedure on 10.7 Lion as it is easy and convenient:

brew update
brew install gfortran
sudo mkdir -p /opt/local
sudo chown -R $USER:wheel /opt
cd /opt/local
# Check for newer versions: http://root.cern.ch/drupal/content/downloading-root
curl -C - -O ftp://root.cern.ch/root/root_v5.30.04.source.tar.gz
tar -xf root_v5.30.04.source.tar.gz
mv root root_v5-30-04
cd /opt/local/root_v5-30-04
# consider adding more configure options to add more language bindings etc.:
./configure --with-f77=/usr/local/bin/gfortran
# On a dual core processor, use j=3:
make -j 3

Now you should be able to run the interpreter CINT provided by ROOT by entering

. /opt/local/root_v5-30-04/bin/thisroot.sh
root -l

More configure options

There are nice configure options available for different language bindings and additional features. Runnging /opt/local/root_v5-30-04$ ./configure --help reveals them.

Enable Python Bindings

http://root.cern.ch/drupal/content/how-use-use-python-pyroot-interpreter

--enable-python

Enable Ruby Bindings

http://root.cern.ch/drupal/content/how-use-ruby-interpreter (old: http://root.cern.ch/root/HowtoRuby.html)

--enable-ruby

Resources

Comments