Posted by: rakitha | May 10, 2011

Complete Steps to Install CERN ROOT on Ubuntu (10.04LTS) : Updated

This entry explains how to,

  1. Checkout the latest revision
  2. Configure root with desired options enabled or disabled
  3. Install necessary libraries to support selected options
  4. Compile
  5. 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)

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

  1. asimage
  2. astiff
  3. builtin_afterimage
  4. builtin_pcre
  5. cintex
  6. exceptions
  7. gdml
  8. genvector
  9. memstat
  10. minuit2
  11. reflex
  12. roofit
  13. shadowpw
  14. shared
  15. table
  16. tmva
  17. x11
  18. xft
  19. 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

  1. asimage
  2. astiff
  3. builtin_afterimage
  4. builtin_freetype
  5. builtin_glew
  6. builtin_pcre
  7. builtin_zlib
  8. cintex
  9. editline
  10. exceptions
  11. fftw3
  12. fitsio
  13. gviz
  14. gdml
  15. genvector
  16. krb5
  17. ldap
  18. mathmore
  19. memstat
  20. minuit2
  21. mysql
  22. odbc
  23. opengl
  24. python
  25. reflex
  26. roofit
  27. shadowpw
  28. shared
  29. ssl
  30. table
  31. tmva
  32. x11
  33. xft
  34. xml
  35. 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!!!!!!

Responses

  1. Thanks, very straightforward and helpful!

  2. Why don’t you update the tutorial for ubuntu 12.04?

    • I just did with basic features enabled. I followed same steps and installed 5.34.00


Leave a comment

Categories