Installing ROOT with MacPorts

I’m new for the Mac OS X. Could somebody provide instructions how to build ROOT with MacPorts?


ROOT can be simply installed from MacPorts. And if you want to compile ROOT itself from source that also works very simply after having installed Xcode and the command line tools., see: … oot-source

Cheers, Fons.

The port is called “root”, and it has several variants that correspond to different switches during the ./configure phase. You can use the variants to include optional components (like GSL, fftw3, PyROOT support, etc).


Thank you, but I need a bit more detailed instruction for MacPorts. Could you please provide command lines for the prerequisite (graphics, etc.). I was able to compile version 34.11 (I installed library needed using homebrew), but when I compiled version 34.12, I got error message about some X11 library. I decided to go with MacPorts now. The port version is just 34.11 and anyway I’d like to compile from source. Ideally I want to see a list of command lines to install dependencies. Usually I install just mathmore (with gsl) and fftw3 above the default configure.


If you are already using MacPorts (after installing XCode + command line utils + XQuartz), then all the dependencies should be added automatically when you install the root port. If you use the +fftw3 variant, then MacPorts will install the fftw-3 port to satisfy it. The same goes for all other variants that add dependencies.

MacPorts does provide pre-compiled binaries for some packages, but you can force it to do a local compilation with the -s option: … lt-package

I found that the root port with my variants usually isn’t available as a binary package, so it typically compiles locally.

From my understanding, you get awkward issues if you have both macports and homebrew and locally installed stuff around. If you want root from a port system, then install just MacPorts the usual way (in /opt as recommended) and it should work fine.