ROOT on MacOS X

ROOT on MacOS X requires X11 to run interactively. If you have not yet installed X11, install it following the instruction given here. It also needs Christoph Pfisterer's dlcompat package to allow SysV-style dynamic loading of component libraries. Install it as:

# rpm -ivh dlcompat-20010123-2a.ppc.rpm

if you haven't.

Note that I have not yet tried to prepare a custom kernel with SysV semaphore support. The resultant root build thus lacks some functionality.
By the way as of ROOT v.3.01.05, MacOS X is officially supported. So now building "ROOT" is fairly straightforward, though the versions earlier than v.3.02.02 needed some patches to build on MacOS X Release 10.1: basically what you needed to do is to add -flat_namespace to link flags. MacOS X support of the current development release (v.3.03.04) is broken but the CVS version as of 2002/04/23 just compiles out of the box.  There were a lot of troubles before we reached this stage. See this note for more details.
If you just want to use a precompiled binary package, go directly to Installation subsection.

[1] Compilation Conditions

 MacOS X Release 10.1
 standard Mach Kernel (Darwin 1.4) w/o SysV semaphore patch
 gcc-with-g77-932.1-1c
 libdl.dylib: dlcompat-20010123-2a by Christoph Pfisterer
 XFree86 4.1.0
 freetype-*1.3.1-3a
[2] Compilation Procedure

If you want to use the current CVS tree, do

$ export CVSROOT=:pserver:cvs@root.cern.ch:/user/cvs
$ cvs login
(Logging in to cvs@root.cern.ch)
CVS password: cvs
$ cvs -z3 checkout root

or if you just want to use the production version, do

$ tar -zxvf ../orig/root_v3.03.04.source.tar.gz

(the latest source tarball: root_v3.03.04.source.tar.gz does not compile on MacOS X, use CVS)

then follow the steps below:

$ tar -zxvf ../orig/ttf_1.1.tar.gz
$ su
# mv ttf/fonts /usr/share/fonts/ttf
# pushd /cern/pro/lib
# ln -s libpythia6134.a libPythia.a
# exit
$ cd root
$ export ROOTSYS=`pwd`
$ export DYLD_LIBRARY_PATH=$ROOTSYS/lib
$ export PATH=$ROOTSYS/bin:$PATH
$ ./configure macosx
$ make

[3] Installation of a Precompiled Binary Package

A precompiled binary package is available as a tarball. All you need to do is expand it in whatever directory you want to install ROOT.
For instance, if you want to install it as /opt/root/pro, do the following:

$ su
# tar -zxvf <somewhere>/root_v3.03.04-cvs020421-macosx.tar.gz -C /opt/root
# ln -s root_v3.03.04-cvs020421-macosx /opt/root/pro
# exit
$ export ROOTSYS=/opt/root/pro
$ export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$ROOTSYS/lib
$ export PATH=$PATH:$ROOTSYS/bin

Then adjust the directory for ttf fonts by editing ~/.rootrc, for instance, as:

#Unix.*.Root.TTFontPath:     $(ROOTSYS)/ttf/fonts
Unix.*.Root.TTFontPath:     /usr/share/fonts/ttf


Back to Keisuke Fujii's HEP on X Page
fujiik@jlcuxf.kek.jp March 18, 2001