Steve Frécinaux

Jhbuild fun

Last days I had fun trying to set up jhbuild on my box. This was fun and breathtaking, but sometimes tricky, so I’m going to share what I learned from that first experience with you, gentle man (or woman, let’s not be sexist) who want to give jhbuild a first try.

The hints I will give now are from my own experience of setting up the gnome 2.16 moduleset, and it’s possible that they don’t fit well to what you’re doing, and that James Henstridge will think I’m on crack. Anyway, here they are (assuming you already have a basic knowledge of jhbuild):

Good options

First of all, be aware of the existence of jhAutobuild. You will probably use the jhbuild autobuild command since it does not require you to stay beside your computer while it’s compiling. Unlike the build option, it will pass automatically the unbuildable packages and their dependencies. This implies you’ll probably have to run through it several times, too. Anyway, registering to jhAutobuild and using jhbuild autobuild will send informations about your building process through the net, spotting the build bugs and helping developers (and yourself) to find why it failed.

Second, don’t hesitate to use the --start-at option. Once a whole part of the packages has been built successfully, there is no need to rebuild it, since it could be new bugs which would make them fail again, and, obviously, because it’s time consuming. Now, let’s start.

Where?

You’ll need about 4 gigabytes of free space to put your brand new Gnome. Since I have two partitions (/ and /home and I had enough free space on the former, I decided to put both source/build tree (~3.2GB) and install directory (~600MB) in /opt/gnome-2.16. This way it does not encumber my home directory. Here is how it’s translated in the configuration file ~/.jhbuildrc:

prefix = '/opt/gnome-2.16'
checkoutroot = os.path.join(prefix, 'src')

Something to skip?

You don’t want to build everything, even if you want to build the whole desktop. Yes, believe me, you really don’t want to. So add a line in your config file disabling these packages: ['mozilla', 'evolution-exchange', 'gnome-user-docs']. Instead of mozilla, install the firefox-dev package (or the equivalent if you’re not using Ubuntu. You don’t want to use jhbuild bootstrap, your distro packages will usually be enough.

Note: Some other development packages (like python-dev) will be required, packages will complain about them while building. But I can’t tell you much more about them…

“Autohell”

Autotools are a capricious tool. For your build to run fine, make sure you have the whole set of automake versions installed (this mean you’ll need 1.4, 1.7, 1.8 and 1.9). Also make sure the default automake version is 1.7, because a few package (like PolicyKit) don’t check the version and will fail if you use, say, automake 1.4. On the other hand a few other packages still require that old version. This check can be performed by simply typing automake --version. On Ubuntu and Debian-based systems, you can set the default version to use by using the update-alternatives utility.

A good idea might also be to remove all the libtool crap your distro may have installed. It shouldn’t have any consequency, but you’ll have to reconfigure the software you’ll want to build afterwards. This can be done by typing (as root):

# find / -name "*.la" | xargs rm

Warning: Before doing it, be sure you know what you’re doing! I can’t be responsible in any way if anything goes wrong on your system after that operation.

Some compile-time options

Last but not least, some hints about the autogen arguments. A good basis is --enable-maintainer-mode --disable-static --disable-gtk-doc. Building the doc is painful, time-consuming and useless. Other per-project arguments you may want to set are :

Totem
--disable-mozilla, otherwise it will try to install the module in /usr/lib, so the build will fail (it doesn’t have the rights required to do so).
PolicyKit
--with-pam-module-dir=/opt/gnome2/lib/security, for the same reason.
Hal
--with-hwdata=/var/lib/misc/pci.ids; it’s just better when it works.
OpenCDK and libtasn1
You’ll have to change the mirror used to download the tarball (or download it manually and copy it in your checkout directory), since the main one is down for some time now.
Gedit
--enable-python, because, well, python plugins are cool (and don’t forget to add gedit-plugins to your module list ;-)).

For the sake of memory, here is my latest unsuccessful build log, and my configuration file, if someone ever is interested in those. Oh, and last advice (but not least), don’t forget to look at the jhbuild page related to your distribution!

Last thing, don’t be afraid if the build isn’t successful, there are only a very few wholy successful builds listed on jhAutobuild, but many other that run just fine ;-)