Posted by: rakitha | February 2, 2010

Install CERN ROOT on Ubuntu 9.10

Steps to Install CERN ROOT are as Follows

see updated steps on Ubuntu 10.04 LTS

1. The latest version can be identified from the link,

http://root.cern.ch/viewcvs/tags/

2. Select the preferred location


cd $HOME/software/

3. Checkout the version into this location

svn co http://root.cern.ch/svn/root/tags/v5-26-00a root.5.26a

where root.5.26a is the directory root to be install.

4. Create a symbolic link from root.5.26a to root

ln -s root.5.22 root

This way when there are several versions of root we can easily select one from them by setting the symbolic link to version we want

5. To properly compile (make) the root and get the most out of root install following libraries

sudo apt-get install libgsl0-dev gsl-bin libxpm-dev libxpm libxft-dev g++ gfortran build-essential g++
libjpeg62-dev libtiff4-dev libxml2-dev libssl-dev libgnutls-dev libgmp3-dev libxmu-dev libpng12-dev libldap2-dev libkrb5-dev freeglut3-dev libxmu-dev fftw3 fftw3-dev python-dev libmysqlclient15-dev libgif-dev libungif4-dev libiodbc2 libiodbc2-dev

5.1 So root will support following packages,

asimage, astiff, builtin_afterimage, builtin_ftgl, builtin_freetype, builtin_glew, builtin_pcre, builtin_zlib, cint5, cintex, exceptions, fftw3, gdml, genvector, ldap, mathmore, memstat, minuit2, mysql, odbc, opengl, python, reflex, roofit, shadowpw, shared, ssl, table, tmva, xft, xml, xrootd.

6. For the first time installation

export ROOTSYS=$HOME/software/root

6.1 Deactivate root paths in the shell “.bash_export” or “.bashrc” file if this is only an update or new version installation


#
# ROOT path configuration
#
# export ROOTSYS=$HOME/software/root
## export PATH=$ROOTSYS/bin:$PATH
# export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH

6.2 Restart a xterm, and go to $HOME/software/root
6.3 Check the the ROOT path is empty by echo $ROOTSYS

7. Configure makefile by

./configure linux --enable-minuit2 --enable-roofit --enable-table --enable-gdml --enable-pgsql --enable-mysql

8. Now compile the root system

make

or

make -j 2

(to use both processors in a dual core machine)

8. Only for first time installation

enter path information to the shell (".bash_export" or ".bashrc" file)
exportexport ROOTSYS=$HOME/software/root/
export PATH=$ROOTSYS/bin:$PATH
export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH

9. Open a new terminal and type root

To Update Current Revision


cd $HOME/software/root.5.26a
svn up
cd $HOME/software/root
./configure linux --enable-minuit2 --enable-roofit --enable-table --enable-gdml
make

Advertisements

Responses

  1. That’s very useful information =)) Thanks and keep on blogging..

  2. Hey Rakitha,

    I am trying to build minuit2 with root. I have followed your steps. Do I need to do anything else to make the minuit2 libraries as I still cannot run the example program with the Minuit2Minimizer. Do I need to go to the minuit2 directory and build there as I do not see any .so file.

    thanks
    Jojo

    • Do did you check the package name minuit2 when you did the ./configure ? If you see it then that means root has support for minuit2. If you see the minuit2 there and still your example is not running, try to build it separately,
      http://seal.web.cern.ch/seal/MathLibs/Minuit2/html/
      and check.

      I have not worked with this package, So I nerver tested any minuit2 based programs on my root.

  3. Hi Rakitha,
    I was able to install and run root fine thanks to your directions but whenever I try to use “TMultiLayerPerceptron”, I get “Error in : libMLP[.so | .sl | .dl | .a | .dll] does not exist in .::/usr/lib/root/5.18”. I am somewhat new at this so I am not quite sure how to go about fixing this problem. How do I locate the missing files? Any suggestions are welcome.
    Thanks,
    Kenan

  4. if you have ubuntu i regularly build root for ubuntu 64bits
    here you find the packages: http://sourceforge.net/projects/cernrootdebs/

    bye
    d

  5. Hi Rathika

    I am using Ubuntu 10.04 (64-bit). I was able to follow your instructions all the way till step 8 i.e. to the point where I had to do a ‘make’.Doing a ‘make’ failed in my case.

    I can send you the details of the problem I encountered, but just wanted to write in and see if you are still following up on this page.

    Thanks
    Arjun

    • Hey,
      I have never done the compilation in a 64 bit machine. Did you see the comment made by Davide under the same entry? He has a link to a 64 bit build packages ( http://sourceforge.net/projects/cernrootdebs/)
      Anyway you could send the error and I’ll have look at it.

      Rakitha

      • Hi Rathika

        Yes I did see the comment by Davide and and downloaded the 64 bit Ubuntu libraries from http://sourceforge.net/projects/cernrootdebs/. So far it has been working well for me.

        If I do get to trying to compile ROOT again on 64 bit Ubuntu, I will make a note of the error message and send it to you.

        I appreciate your response to my query.

        Arjun

  6. whenever i am trying to run command listed in step7 (./configure linux …) i am facing the following error
    libX11 MUST be installed
    I have installed following packages
    libx11-dev
    for usr/include/X11/Xlib.h and for /usr/lib/libX11.so
    libxpm-dev
    for /usr/include/X11/xpm.h and for /usr/lib/libXpm.so
    libxft-dev
    for /usr/include/X11/Xft/Xft.h and for /usr/lib/libXft.so
    libxext-dev
    for /usr/include/X11/extensions/shape.h and for /usr/lib/libXext.so

    by running sudo apt-get install packagename
    Please help. I appreciate an early reply

    ashutosh

    • Hey did you figure out the problem? I recently installed root 5.28.00d and make an updated entry. You may find it helpful

  7. […] 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 […]

  8. Not yet I am trying to install root 5.28 as suggested by u
    update u if it works with UBUNTU 11.04
    Thanks

  9. I am now getting the following error when trying to run make – j2. please help. Thanks

    compilation terminated.
    In file included from /usr/include/features.h:388:0,
    from /usr/include/c++/4.5/x86_64-linux-gnu/32/bits/os_defines.h:39,
    from /usr/include/c++/4.5/x86_64-linux-gnu/32/bits/c++config.h:275,
    from /usr/include/c++/4.5/string:40,
    from /home/ashu/root.5.28/build/rmkdepend/mainroot.cxx:28:
    /usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory
    compilation terminated.
    bin/rmkdepend -R -fcint/cint/main/cppmain.d -Y -w 1000 — -pipe -m32 -Wall -W -Woverloaded-virtual -fPIC -Iinclude -DG__REGEXP -DG__UNIX -DG__SHAREDLIB -DG__OSFDLL -DG__ROOT -DG__REDIRECTIO -DG__STD_EXCEPTION -DG__HAVE_CONFIG -DG__NOMAKEINFO -DG__CINTBODY -I/home/ashu/root.5.28/cint/cint/inc -I/home/ashu/root.5.28/cint/cint/src -I/home/ashu/root.5.28/cint/cint/src/dict -pthread -I. -D__cplusplus — cint/cint/main/cppmain.cxx
    make: bin/rmkdepend: Command not found
    make: *** [cint/cint/main/cppmain.o] Error 127
    make: *** Waiting for unfinished jobs….


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: