Here are the instructions I follow whenever I want to build a new
version of ROOT 2.22.09 or later on RedHat Linux 6.0 Intel:
1) Download and install Mesa for optional OpenGL support (see below).
2) Install the latest ROOT. The following example is for ROOT 2.22.09,
which is the latest version of ROOT as I write this. I tested these
commands by literally executing them in order (after having stripped
off the leading dollar sign, of course). Hopefully, they will work
for you as well.
$ cd ~
$ wget -N ftp://root.cern.ch/root/root_v2.22.Linux.2.2.10.tar.gz
$ wget -N ftp://root.cern.ch/root/root_v2.22.source.tar.gz
$ wget -N ftp://root.cern.ch/root/ttf/ttf_1.1.tar.gz
$ export ROOTSYS=/usr/local/root
$ export CERNLIB=/usr/local/lib
$ mkdir -p $ROOTSYS
$ cd $ROOTSYS/..
$ gunzip -c ~/root_v2.22.Linux.2.2.10.tar.gz | tar -xpvf -
$ cd root
$ gunzip -c ~/root_v2.22.source.tar.gz | tar -xpvf -
$ gunzip -c ttf_1.1.tar.gz | tar -xpvf -
$ rm -rf include
$ (cd bin && rm g2root h2root makedepend rmkdepend)
$ rm -f lib/*
$ ln -s /usr opengl
$ ln -s src include
$ cd src
$ perl -i.orig -p -e 's{(?:/|\$ROOTSYS)[^\s]+}{};s{^[^:]+:\s*$}{}' Make-depend
$ patch -b < README.RHL6.0
$ ln -s Makefile.linuxegcs Makefile
$ make distclean
$ make
Notes:
1) You may have to adjust the ROOTSYS and CERNLIB environment
variables appropriately for your system. It is OK to leave CERNLIB
undefined if you don't have it installed, but this means that
`h2root' and `g2root' won't be built on your system.
2) The input file for the patch command "patch -b < README.RHL6.0" is
this file (i.e. the file that you are reading). You may have
called it something else (i.e. if you've saved it to a file from an
e-mail), in which case you should substitute the real file name for
`README.RHL6.0'.
Installing Mesa (for optional OpenGL support)
---------------------------------------------
$ cd ~
$ wget -N ftp://ftp.falsehope.com/pub/Mesa/Mesa-3.0-2.src.rpm
$ rpm --rebuild Mesa-3.0-2.src.rpm
$ rpm -Uvh /usr/src/redhat/RPMS/i386/Mesa*
If you don't have Perl
----------------------
If by some chance you don't have Perl on your system, but you have
"sed", then the Perl command can be replaced with the following two
lines:
$ mv Make-depend Make-depend.orig
$ sed -e 's/\$ROOTSYS//' -e 's/\/[^ ][^ ]*//' -e '/^[^:][^:]*:[ ]$/d' Make-depend.orig > Make-depend
NOTE: In the sed command above, the last two characters within the
1st, 2nd and 5th square brackets are a SPACE followed by a TAB.
Some broken MTUs translate TAB incorrectly, so you may need to
add the TAB characters back in by hand.
-- Matthew D. Langston SLD, Stanford Linear Accelerator Center langston@SLAC.Stanford.EDU
--- Makefile.linuxegcs.orig Wed Jul 7 23:20:59 1999 +++ Makefile.linuxegcs Fri Jul 9 00:19:01 1999 @@ -13,12 +13,12 @@ OPT = -O NOOPT = LD = g++ -LDFLAGS = $(OPT) +LDFLAGS = $(OPT) -Wl,-rpath,$(ROOTSYS)/lib SOFLAGS = -shared -Wl,-soname, SOEXT = so SYSLIBS = -lm -ldl -rdynamic SYSXLIBS = -L/usr/X11R6/lib -lX11 -lm -ldl -rdynamic -XLIBS = $(ROOTSYS)/lib/libXpm.a -L/usr/X11R6/lib -lX11 +XLIBS = -L/usr/X11R6/lib -lXpm -lX11 CILIBS = -lm -ltermcap -lbsd -ldl -rdynamic CRYPTLIBS = -lcrypt F77 = g77