Building ROOT 2.22.10 from source on RedHat Linux 5.2 Intel

From: Matthew D. Langston (langston@SLAC.stanford.edu)
Date: Mon Aug 09 1999 - 08:20:04 MEST


      Building ROOT 2.22.10 from source on RedHat Linux 5.2 Intel

ROOT 2.22.10 does not build from source "out of the box" on RedHat Linux
5.2 Intel.  In addition to a patch which fixes the ROOT sources, I have
also listed below the commands I use to build ROOT on a RedHat Linux 5.2
Intel system in a "cut-and-paste" fashion.

1) Download and install Mesa for optional OpenGL support (see below).

2) Install the latest ROOT.  The following example is for ROOT 2.22.10,
   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.3.egcs111.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.3.egcs111.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.RHL5.2
  $ 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.RHL5.2" 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.RHL5.2'.

  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 28 01:48:50 1999
+++ Makefile.linuxegcs  Sun Aug  8 21:42:26 1999
@@ -13,17 +13,17 @@
 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
 F77FLAGS      = $(OPT)
-F77LIBS       = -lg2c
+F77LIBS       = -lf2c
 
 VPATH         = $(ROOTSYS)/include
 

--- RConfig.h.orig      Tue Feb  9 06:51:20 1999
+++ RConfig.h   Sun Aug  8 21:10:52 1999
@@ -106,9 +106,18 @@
 #ifdef __GNUG__
 #   define R__GNU
 #   define ANSICPP
-#   if __GNUC_MINOR__ >= 90   /* egcs 1.0.3 */
-#      define R__VECNEWDELETE    /* supports overloading of new[] and delete[] */
-#      define R__PLACEMENTDELETE /* supports overloading placement delete */
+
+#   if __GNUC_MINOR__ >= 90     /* egcs 1.0.3 */
+/*
+ * Defining R__PLACEMENTDELETE on RedHat Linux 5.2 Intel generates an
+ * internal compiler error for egcs 1.0.3 when compiling
+ * EG_Generator.cxx.
+ * 1999-08-08  Matthew D. Langston  <langston@SLAC.Stanford.EDU>
+ */
+#     if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
+#        define R__VECNEWDELETE    /* supports overloading of new[] and delete[] */
+#        define R__PLACEMENTDELETE /* supports overloading placement delete */
+#     endif
 #   endif
 #   if __GNUC_MINOR__ >= 91   /* egcs 1.1 */
 #      define R__ANSISTREAM      /* ANSI C++ Standard Library conformant */



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:38 MET