Quickfix: libroot-python-dev for Ubuntu Gutsy

December 4, 2007 on 10:45 am | In Linux, ROOT | 1 Comment

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:
libroot-python-dev_5.17.05-3-quickfix_i386.deb

Steps to create this:

  • Get the libroot-python-dev package from the repository
    wget http://mirror.phy.bnl.gov/debian-root/...
    ubuntu/pool/main/r/root-system/libroot-python-dev_5.17.05-3_i386.deb
  • 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.

Update 2007-12-11:
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.

Update 2009-03-02:

Noticed a typo in the re-tarring command, now fixed.

Making Pretty ROOT Color Palettes

August 20, 2007 on 12:05 pm | In Physics, ROOT | 13 Comments

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

Continue reading Making Pretty ROOT Color Palettes…

Building ROOT Packages on Ubuntu Feisty

August 17, 2007 on 12:01 pm | In Linux, Physics, ROOT | 5 Comments

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:

Continue reading Building ROOT Packages on Ubuntu Feisty…

Creating a RedHat 7.2 VMWare Image

August 6, 2007 on 6:51 pm | In Linux | 11 Comments

Update: I have created a CentOS 2 virtual machine image for
VirtualBox which is available for download

I’ve created a VMWare image of a RedHat 7.2 operating system. I need one for compiling and testing programs since a cluster that I sometimes use runs this aging OS, and programs that I compile on my Ubuntu laptop or the Fedora Core 6 server at the lab don’t work properly on that system.

I would love to redistribute the base image for other people who might require it but unfortunately Red Hat’s trademark protection policy prevents this. I don’t have time to go through the image and remove all the trademark-covered files, so here’s a quick guide to getting a useful system in a short time. By useful, I mean with Subversion, GSL and Boost libraries.
Continue reading Creating a RedHat 7.2 VMWare Image…

Scaling ROOT PostScript Files

May 25, 2007 on 12:33 pm | In Linux, ROOT | No Comments

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.
Continue reading Scaling ROOT PostScript Files…

Don’t Define Template Functions In .cpp Files

May 17, 2007 on 11:50 am | In Code | No Comments

This is another gotcha from my recent C++ work. When I learned C++ I was taught to put the interface (function declarations) in a header file and the implentation (function definitions) in a .cpp module source file. Some small functions could be written inline in the class declarations, usually just get/set member functions for private data. At one point (or possibly just in C) having if/else statements in a header was not allowed, the compiler complained about branching. I recently realized (about 10 years after everyone else, it seems) that there is actually a very good reason to put implementation of templated functions in the header file.
Continue reading Don’t Define Template Functions In .cpp Files…

Mixing Inheritance and Templates in C++

May 5, 2007 on 11:36 am | In Code | Comments Off

I came across a gotcha today with some C++ code I’m working on. I have an abstract base class for doing interpolation, and when I tried converting it to a template class it stopped working – specifically the derived class could no longer access certain members of the base class.
Continue reading Mixing Inheritance and Templates in C++…

Slug USB Audio

March 21, 2007 on 4:27 pm | In Linux | Comments Off

I use a Linksys NSLU2 (slug) network attached storage device on my home network. The device is great, primarily because it is low power and runs full-fledged Debian GNU/Linux which makes it extremely versatile. I use mine as

  • File server – runs Samba, serves up music, videos and photos to home network
  • Print server – allows wired and wireless PC/Mac/Linux computers to print to the laser printer
  • Backup Server – makes automatic rsync backups of my website
  • Music Server – serves up MP3s from a web interface to play on other computers
  • Music Jukebox – has web interface to play songs through the stereo, using a USB Audio device

All this, and for less than 25W — 14W for the slug, which has no moving parts, and 5W each for 2×320GB USB hard drives.

Update: Tenx chipset USB adapters suck! See the end of the post for more details.
Continue reading Slug USB Audio…

Undistract: An Attention Watchdog

March 9, 2007 on 7:23 pm | In Code | Comments Off

I’m posting my distraction defeating program undistract today and wanted to explain how it came about and why I find it useful.

Continue reading Undistract: An Attention Watchdog…

Bash Output Redirection

March 1, 2007 on 4:55 pm | In Linux | 1 Comment

I know that doing this:

foo 2>err.log > log

will capture the output to stderr and stdout.

I was just trying to redirect ALL the output to a single file. I thought this would work:

foo 2>&1 > log

But for some reason the stderr stuff was still being output to the console.

Luckily the top result in Google led me straight to the answer: To send all output to a file, use &>

foo &> log
« Previous PageNext Page »

Powered by WordPress with theme based on Pool by Borja Fernandez.
Feeds: Entries and comments. Valid XHTML and CSS. ^Top^
Page required 23 queries and took 0.208 seconds.