How to Build ROOT from a Source Tree
Japanese Page is here.
Compilation Environment
My current (99/03/17) compilation environment is as follows:
- egcs*-1.1.2-1a
- egcs-libg++-2.9.0-1d
- glibc-0.961212-1o
- binutils-2.9.1-19b
I only tried this, and thus I am not sure whether there are
other valid combinations.
Origin
You need to down load the following:
- ftp://root.cern.ch/root/root_v2.21.PPCLinux.2.2.0.egcs.tar.gz
- ftp://root.cern.ch/root/root_v2.00.source.tar.gz
- ftp://root.cern.ch/root/ttf_1.1.tar.gz
to build ROOT.
The first one is a binary package built with egcs-1.0.2
and linked with libg++.so.2.8. It should work with DR3.
If you are happy with this, you do not have to rebuild it. Quit here.
If you really want to rebuild the package, you need the second tar ball, which
is the complete source tree for ROOT. Even in this case, you need the
binary package.
If you want TrueType support, you need the third tar ball, too.
I found, however, some patches necessary to build ROOT under
the above conditions.
I prepared the following unofficial patches:
- root_v2.21b7-mklinux.patch
- root_v2.21b7-mklinux_ttf.patch
- root_v2.21b7-x3d_depth.patch
where the first one patches
- Makefile.mklinux
- to include "-fno-rtti -fno-exceptions" in CXXFLAGS as necessitated by "egcs",
- ROOTX_rootx.cxx
- to introduce a closing brace as appropriate,
- UNIX_UnixSystem.cxx
- to introduce a closing brace as appropriate, and
- to replace socklen_t by size_t since the former is undefined for glibc*-0.961212
being not completely glibc-2.x,
while the second one
- Make-macros
- to link libttf correctly.
The third patch is necessary to make X3D work in the 16-bpp mode.
Package Building Procedure
You first expand the binary package, then the source tar ball,
patch the source, and make:
- $ tar -zxvf orig/root_v2.21.PPCLinux.2.2.0.egcs.tar.gz
- $ cd root
- $ tar -zxvf ../orig/root_v2.21.source.tar.gz
- $ tar -zxvf ../orig/ttf_1.1.tar.gz
- $ export ROOTSYS=`pwd`
- $ export LD_LIBRARY_PATH=$ROOTSYS/lib
- $ export PATH=$ROOTSYS/bin:$PATH
- $ cd src
- $ patch -p1 -s < <somewhere>/root_v2.21b7-mklinux.patch
- $ patch -p1 -s < <somewhere>/root_v2.21b7-mklinux_ttf.patch
- $ patch -p1 -s < <somewhere>/root_v2.21b7-x3d_depth.patch
- $ ln -s Makefile.mklinux Makefile
- $ make distclean
- $ ln -s /usr/lib/libttf.so.2.0.0 ../lib
- $ ln -s G__TypeInfo.h ../cint/include/iosenum.h
- $ make OPT='-O4 -g' >& make.log &
- $ tail -f make.log
- $ cd ../tutorials
- $ patch -p1 -s < ../../patches/root_v2.21b7-demos.patch
which will renew some contents of the "bin" and all of "lib" libraries.
Note that I was brave enough to use "-O4" above.
Note also that the 3rd pach will soon be obsolete when a new
source distribution becomes available.
The so built binary package is:
- root_v2.21b7_egcs111.tar.gz
which has been stripped to be slim, though created with "-g".
This package requires a recent libstdc++ which can be found in
the egcs directory.
Back to the Top ROOT Page
fujiik@jlcuxf.kek.jp Sep. 3, 1998