This post has been archived. It's pretty old and likely concerns topics that are avoidable by using more modern tools and techniques. The original text is preserved below for posterity but it may no longer be relevant or correct.
Note: Running OS X 10.9 Mavericks or later? Check out the latest tutorial.
Many people had similar issues with ROOT and Mavericks, from compiling ROOT itself to compiling programs with ROOT dependencies. Luckily, the developers have now fixed the problems in later versions. There are a couple of caveats I’ll throw in for good measure, though:
- Install the Xcode command line developer tools by running
xcode-select --installin a terminal; and
- Reinstall XQuartz to make sure you have the latest version.
If you’ve never installed ROOT before, you’ll need to follow my previous ROOT installation tutorial, up until the ‘Installing ROOT’ step.
There are two ways we can proceed.
- Download the ROOT source code and compile it ourselves; or
- Let Homebrew do the heavy lifting.
Each way has it advantages and disadvantages. The following ‘Compiling’ section walks through the first option, and the ‘Homebrew’ section does the same for the second. Choose whichever you prefer. (Homebrew is arguably simpler and cleaner, though, and a safe bet if you’re unsure.)
Mavericks compatibility seems to be at its best with versions from 5.34/13, so we’ll use that.
In a terminal (like
Terminal.app), we download the 5.34/13 source code and extract it on to the desktop.
$ cd ~/Desktop
$ curl -O ftp://root.cern.ch/root/root_v5.34.13.source.tar.gz
$ tar -xzf root_v5.34.13.source.tar.gz
Then we create and move in to the directory we want to install ROOT into. If this directory already exists, we’ll need to move it.
$ export INSTALL_DIR=/usr/local/root
$ mv $INSTALL_DIR ~/Desktop/old_root
$ mkdir $INSTALL_DIR
$ cd $INSTALL_DIR
Next, configure ROOT with with
$ cmake ~/Desktop/root -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -Droofit=ON -Dcocoa=ON
If you installed the dependencies outlined in the previous tutorial, this step should complete without errors. If not, look at what’s missing and install it with Homebrew.
If this works, ROOT is now compiled!
You can set up the environment for ROOT by sourcing
$ . $INSTALL_DIR/bin/thisroot.sh
And then check everything works by trying a
root  TBrowser tb
Rather than downloading the source code and running
make yourself, you can ask Homebrew to do the heavy lifting for you.
We used Homebrew to install the dependencies for us, and now we can do the same for ROOT.
To install with Homebrew, we need to add the science formula repository.
$ brew tap homebrew/science
Then simply install ROOT, enabling the Cocoa interface.
$ brew install --with-cocoa root
ROOT is now fully compatible with Mavericks from version 5.34/13, as far as I can tell. There are two choices for installation, either compiling manually or with Homebrew. I’m currently using the Homebrew option, as it seems tidier given my previous reliance on it.
As before, if you’re having trouble with the install, feel free to let me know.