This entry explains how to,
- Checkout the latest revision
- Configure root with desired options enabled or disabled
- Install necessary libraries to support selected options
- Compile
- Setup Ubuntu environment properly to work root properly at any directory
List of all the pro and development revision versions can be found at root/tags . I have recently installed version 5.28.00d and decided to update my previous entry – Install CERN ROOT On Ubuntu 9.10.
Checkout the source code (required subversion support)
svn co http://root.cern.ch/svn/root/tags/v5-28-00d root.5-28-00d
Use a symbolic link to the above source code, this way if you want to try out another revision you only have to change the symbolic link.
ln -s root.5-28-00d root
Now you are ready to configure root using many options it supports.
Goto the root main directory (cd /_path_/root)
First install required set of packages that root need,
sudo apt-get install g++ g++-4.4 libstdc++6-4.4-dev g++-multilib g++-4.4-multilib gcc-4.4-doc libstdc++6-4.4-dbg libx11-dev libxpm-dev libxft-dev libxext-dev
This will enable to compile the basic version of root with following options enabled
- asimage
- astiff
- builtin_afterimage
- builtin_pcre
- cintex
- exceptions
- gdml
- genvector
- memstat
- minuit2
- reflex
- roofit
- shadowpw
- shared
- table
- tmva
- x11
- xft
- xrootd
So If you satisfied with these set of options run,
./configure linux --enable-minuit2 --enable-roofit --enable-table --enable-gdml --enable-pgsql --enable-mysql
If you want to enable more features like mathmore and fast fourier transform install following packages as well,
Install these optional packages,
sudo apt-get install gfortran ncurses-dev libpcre3-dev xlibmesa-glu-dev libglew1.5-dev libftgl-dev libmysqlclient-dev libfftw3-dev cfitsio-dev graphviz-dev libavahi-compat-libdnssd-dev libldap-dev python-dev libxml2-dev libssl-dev libgsl0-dev gfortran-multilib gfortran-doc gfortran-4.4-multilib gfortran-4.4-doc libgfortran3-dbg glew-utils ocaml-findlib libtool-doc gsl-bin build-essential libjpeg62-dev libtiff4-dev libgnutls-dev libgmp3-dev libxmu-dev libpng12-dev libkrb5-dev freeglut3-devlibxmu-dev libgif-dev libgif-dev libiodbc2 libiodbc2-dev
Now root will support following options
- asimage
- astiff
- builtin_afterimage
- builtin_freetype
- builtin_glew
- builtin_pcre
- builtin_zlib
- cintex
- editline
- exceptions
- fftw3
- fitsio
- gviz
- gdml
- genvector
- krb5
- ldap
- mathmore
- memstat
- minuit2
- mysql
- odbc
- opengl
- python
- reflex
- roofit
- shadowpw
- shared
- ssl
- table
- tmva
- x11
- xft
- xml
- xrootd
Now configure root to enable above options,
./configure linux --enable-minuit2 --enable-roofit --enable-table --enable-gdml --enable-pgsql --enable-mysql --enable-builtin-zlib --enable-builtin-pcre --enable-builtin-freetype --enable-builtin-glew
Now compile source,
use
make
or
make -j no.of-cores-you-have
Finally set the environment variables in your favorite shell,
# # ROOT path configuration # export ROOTSYS=$HOME/softwares/root export PATH=$ROOTSYS/bin:$PATH export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH Open a new terminal and type, :~$ root ******************************************* * * * W E L C O M E to R O O T * * * * Version 5.28/00d 7 May 2011 * * * * You are welcome to visit our Web site * * http://root.cern.ch * * * ******************************************* ROOT 5.28/00d (tags/v5-28-00d@39145, May 09 2011, 00:20:11 on linux) CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010 Type ? for help. Commands must be C++ statements. Enclose multiple statements between { }. root [0] happy rooting!!!!!!
Thanks, very straightforward and helpful!
By: Alan on December 19, 2011
at 12:52 am
Why don’t you update the tutorial for ubuntu 12.04?
By: John on May 18, 2012
at 8:05 pm
I just did with basic features enabled. I followed same steps and installed 5.34.00
By: rakitha on June 14, 2012
at 5:12 am