Linux Physics ROOT

Building ROOT for Debian Lenny (testing)

Debian Lenny is currently the ‘testing’ version, but it is pretty stable and that’s what my workstation runs at work. However the annoying bug I had before with libroot-python-dev is still present (short version: the package wants (python < 2.5) but the version that ships with Lenny and Ubuntu Hardy is 2.5.)

Anyway, the easiest way around it is to build the packages from source. So add this to your sources.list

# Apt ROOT distribution.
deb unstable main contrib
deb-src unstable main contrib

Then do these commands

  • mkdir temp/root/
  • cd temp/root
  • apt-get source libroot-python-dev (this downloads the source)
  • cd root-system-5.17.07

Now we come up against another problem. The maxdb packages aren’t available in Lenny (I’m not sure why they were removed) but the source packages depend on them, so you’ll need to work around that. If the packages weren’t broken, you could do apt-get build-dep libroot-plugin-python. Instead, you can get the list of packages you need from debian/control. Here’s the dependencies:

apt-get install debhelper po-debconf libssl-dev comerr-dev libxpm-dev libfreetype6-dev libpcre3-dev zlib1g-dev python-dev libjpeg62-dev libpng12-dev libtiff4-dev libungif4-dev libxinerama-dev libpacklib1-dev gfortran libxmlrpc-c3-dev libxmlrpc-c-dev libcurl4-gnutls-dev fftw3-dev libkrb5-dev krb5-user libldap2-dev libgsl0-dev libmysqlclient15-dev libiodbc2-dev libglu1-xorg-dev libglu-dev ftgl-dev libpq-dev python-support libqt4-dev qt4-dev-tools ruby ruby-dev libxml2-dev

Now you have to edit the Debian control files to remove the maxdb dependencies.

Edit debian/rules, and

  • Delete the ‘–enable-maxdb‘ line. (You can’t comment it out in place, but you could move it down a few lines and comment it out there)
  • Comment out lines 35-45, just leaving ‘SAPDB = –disable-sapdb

Edit debian/control to remove the dependency on libsqlod-dev in the first stanza and delete the entire root-plugin-maxdb stanza.

mv debian/root-plugin-maxdb.install debian/root-plugin-maxdb.install.bak

If you like, you can edit debian/changelog and give it a new version number. The version extension must contain a digit, e.g.

root-system (5.17.07-1-ultrahigh1) unstable; urgency=low

Avoid this gotcha: I’d symlinked /usr/bin/gfortran to /usr/bin/gfortran4.3 for another project. ROOT’s config/Makefile.linux checks that gcc and gfortran are the same version, so I had to undo that symlink.

Build the packages:

dpk-buildbackage -rfakeroot

My build failed with this error but all of the packages seem to be there (including root-plugin-asimage, so I don’t know what it’s complaining about):

dpkg-genchanges -b >../root-system_5.17.07-1-ultrahigh1_i386.changes
dpkg-genchanges: binary-only upload – not including any source code
dpkg-genchanges: failure: cannot fstat file ../root-plugin-asimage_5.17.07-1-ultrahigh_i386.deb: No such file or directory
dpkg-buildpackage: failure: dpkg-genchanges gave error exit status 2

And if you are too lazy to build the packages and you trust me (why would you!), you can download my packages which should install OK.

Physics ROOT

Making Pretty ROOT Color Palettes

My friend and colleague (I like him even more since he told me about this!) Segev gave me this information, which he had gleaned from some old posts on ROOTtalk and a lot of experimentation. It’s a technique for setting the color palette of ROOT plots so that, for example, Graph2D with the “COLZ” option doesn’t look like total crap. I have no idea why something like this isn’t used as the default palette in ROOT.

In short, here’s before and after screenshots of the plot.

Default PaletteBefore
New PaletteAfter
Linux Physics ROOT

Building ROOT Packages on Ubuntu Feisty

I read with satisfaction the fact that Cern’s ROOT physics and data analysis framework has finally been integrated into Debian. I assumed that this would lead to easier installation on Ubuntu and in the future, hopefully, ROOT in the Ubuntu repositories. For a brief and happy period there was a third party repository with up-to-date and semi-official ROOT packages.

My hopes were dashed with the news that the Brookhaven machine hosting the repository lost a hard disk and the Ubuntu repository was down. I frequently need access to ROOT packages, so I just recently built .debs from the lastest stable release (5.16.00). Here’s a guide as to how to make it work: