6

Cern's ROOT environment installs fine on 10.10, and is even available in the Software Center, but it will not install or compile on Natty because the x11 directories are in new locations.

I can redefine the paths, but then I get compile errors because only gcc 4.3 is supported through ROOT and Natty uses 4.5. I've given up and gone back to 10.10, but my question is, after installing ROOT on Maverick, if I upgrade back to Natty, will my old software still work with these new directory paths?

2

3 Answers 3

6

It's a pitty that root is not in repository anymore (applies for Ubuntu 11.04). Here is a way

HOW-TO install root on Ubuntu Natty (x86):

DEPENDENCIES:

sudo aptitude install gcc g++ make binutils \
                      libx11-dev libxpm-dev libxft-dev libxext-dev
OPTIONAL DEPENDENCIES: (I've this installed)
sudo aptitude install cmake \
                      gsl-bin libgsl0-dev \
                      liblzma2 liblzma-dev \
                      libgmp3c2 libgmp3-dev \
                      libpcre3 libpcre3-dev \
                      zlib1g zlib1g-dev

HOW TO INSTALL:

wget ftp://root.cern.ch/root/root_v5.30.00.source.tar.gz
tar -xzvpf root_v5.30.00.source.tar.gz
cd root

WHERE_TO_INSTALL_ROOT=/usr/local     ## feel free to change this
./configure linux \
            --with-x11-libdir=/usr/lib/i386-linux-gnu \
            --with-xft-libdir=/usr/lib/i386-linux-gnu \
            --with-xext-libdir=/usr/lib/i386-linux-gnu \
            --with-xrootd-opts=--syslibs=/usr/lib/i386-linux-gnu \
            --prefix=$WHERE_TO_INSTALL_ROOT

make
# sudo make install                     ## sudo needed at least for for /etc/root
# NEVER use make install in modern distros. Instead use:
sudo checkinstall --pkgname=root-framework --fstrans=no --strip=no make install
sudo 

cd $WHERE_TO_INSTALL_ROOT
source bin/thisroot.sh
root                                  ##  :-)   works...
       .Q                             // to quit root

NOTE: At a time of writing this 5.30/00 was latest and recommended version. Feel free to change this to other (I suggest recommended) version available at time you are reading this.

1
  • Very helpful indeed, thanks ! I had a weird problem with lzma, solved using the internal library : --enable-builtin-lzma
    – user21703
    Jul 16, 2011 at 19:02
4

You can download a compiled package from here http://sourceforge.net/projects/cernrootdebs/ it is quite straightforward. Read the instructions.

To reply to Roland Taylor: the instructions are listed in the Readme file. The installation requires simply a double-click on the deb archive.

Quoting: "This package is going to be installed on /opt/root dir, to not conflict with Root package provided by Ubuntu repos. So you might want to create a symbolic link in /usr/bin; this is my choice:

sudo ln -s /opt/root/bin/root /usr/bin/root-latest 

so you can run root from ubuntu repos typing root, or my version typing root-latest (to upgrade from a previous version packaged by me, first remove old package)"

In case root doesn't start because it doesn't find libCore.so, but these two lines in your ~/.bashrc

export ROOTSYS=/opt/root/ 
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib/root:

Enabled support for asimage, astiff, builtin_afterimage, builtin_ftgl, builtin_glew, cintex, explicitlink, fftw3, genvector, krb5, mathmore, memstat, minuit2, opengl, pgsql, python, reflex, roofit, shadowpw, shared, ssl, tmva, unuran, x11, xft, xml."

1
  • Please include contents of the link (the instructions) in your answer.
    – RolandiXor
    Sep 25, 2012 at 19:26
2

I found a rather short how to on the web: http://www.thecampaign.eu/?p=73

From that page:

Compiling ROOT 5.28/00b (CERN) on Ubuntu 11.04 (Natty Narwhal) April 5, 2011 – 16:49

As the matter of the this topic stole me some of my “very” precious time I will give you the >solution to this rather easy problem. IT IS JUST NOT VERY LONG!

ROOT battles to be not compiled on Ubuntu 11.04 stating that it cannot find some libraries (libX11.so, libXext.so and libXft.so). To get

./configure –prefix=/usr/local

to work just tell the script where to find those ominous libs by adding –with-x11-libdir=/usr/lib/i386-linux-gnu –with-xft-libdir=/usr/lib/i386-linux-gnu –with-xext-libdir=/usr/lib/i386-linux-gnu –with-xrootd-opts=–syslibs=/usr/lib/i386-linux-gnu to the command that it reads

./configure --with-x11-libdir=/usr/lib/i386-linux-gnu --with-xft-libdir=/usr/lib/i386-linux-gnu 
--with-xext-libdir=/usr/lib/i386-linux-gnu --with-xrootd-opts=–syslibs=/usr/lib/i386-linux-gnu 
--prefix=/usr/local

Apparently the Ubuntu team changed the structure of the /usr/lib directory for compatibility between system architectures.

One rule to remember is to define every library path for every feature by hand if possible.

Again do not just copy and paste the above command as it seems that the double line is transformed to a long line by WordPress.

For everything else to work just follow the instructions regarding ROOT in my former post.

Hope this works.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .