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 http://mirror.phy.bnl.gov/debian-root/ unstable main contrib
deb-src http://mirror.phy.bnl.gov/debian-root/ 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 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
apt-get build-dep libroot-plugin-python. Instead, you can get the list of packages you need from debian/control. Here’s the dependencies:
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:
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.
Since my last post on building ROOT packages for Ubuntu the resourceful Christian Holm Christensen has got the unofficial Debian/Ubuntu ROOT repository back online. One problem is that due to a dh_python bug in Ubuntu, the libroot-python-dev package (required for PyROOT) is broken for Gutsy (and probably Feisty too), since it depends on python < 2.5. I’ve hacked the ‘control’ file to remove that broken dependency and repacked the .deb file to make a package that is installable and doesn’t break apt.
Download it here:
Steps to create this:
- Get the libroot-python-dev package from the repository
- Unpack the .deb
ar -x libroot-python-dev_5.17.05-3_i386.deb
- Unpack the control data:
tar -zxf control.tar.gz
- Edit the file ‘control’ to fix the dependencies and bump the version number
- Repack control data:
tar -zcf control.tar.gz control md5sums postinst prerm
- Repack the .deb
ar -r libroot-python-dev_5.17.05-3-quickfix_i386.deb debian-binary control.tar.gz data.tar.gz
I hope to help fix the underlying issue soon but right I’ve got a ton of thesis-related work to plough through so this band-aid will have to do for now.
I spent a morning last week tracking down this ROOT Python bug. Turns out there was a file not being deleted during the ‘clean’ stage of the debian package creation which led to a dependency confusion with python versions. New source packages have been uploaded which fix this issue:
deb-src http://mirror.phy.bnl.gov/debian-root unstable main contrib
Binary packages should be up shortly.
Noticed a typo in the re-tarring command, now fixed.
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.
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:
I encountered some trouble today printing PostScript files from ROOT at smaller sizes. This is most useful to me because my lab notebook, heretically, is smaller than ‘letter’ size, which I find more convenient for carrying than the huge squared notebooks which seem to be the norm around here. I was looking for a quick way of printing PostScript at 80% scale.