My journey of JHBuild

To better support the latest feature of GTK+3, Gnome-games git master has recently bumped up GTK+ minimum requirement to 3.3.x. However my desktop Ubuntu only provides development packages up to GTK+3.2. As such my local build of Gnome-games was broken. I think it is a good time to try JHBuild.

Ubuntu’s official APT repo has JHBuild package but it is outdated. I gave it a try but ran into many build errors. Soon I switched to its git version and it turned out to be the way to go.

I don’t want to repeat what JHBuild website already has. I will just list what I have encountered in the process of making a working Gnome-games JHBuild build.

First, follow the instructions on JHBuild website until you have run


$ jhbuild build gnome-games

It’s gonna take a quite while to fetch source code from upstream git repos build  and install them. You can do it once and in future, as long as the library dependency is satisfied, we can type


$ jhbuild buildone gnome-games

to just update and build gnome-games itself.

If you already have your local clone of gnome-games, and you just want to install the broken libraries, you can just


$ jhbuild build gtk+

$ jhbuild build clutter

$ jhbuild build clutter-gtk

However, I noticed that the GTK+3 baked by JHBuild didn’t support SVG file which was wildly used in many game apps. It looked like gdk-pixbuf didn’t include the loader for SVG. The trick is


$ jhbuild build librsvg

After that you can check if the SVG loader libpixbufloader-svg.so is in $JHBUILDER_PREFIX/lib64/gdk-pixbuf-2.0/loaders.

Another annoying problem is when you run the games, you probably will see


GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.

The reason is that your system dconf is old, and the fix is to


$ jhbuild build dconf

All right. Hopefully this post can help you iron out all the glitches you have when you try to bake Gnome-games with JHBuild. Have fun!

3 responses to this post.

  1. Posted by Jasper St. Pierre on February 15, 2012 at 1:17 am

    To cut down on some of the dependencies, use jhbuild sysdeps –install. This installs all the system packages that it can find, cutting down on the amount of things you have to build.

    Reply

  2. Alternatively, you could try the development version of Ubuntu. Precise has the lastest GTK 3.3 snapshot, as well as gnome-games 3.3.5.

    Unfortunately, jhbuild is still an old version.

    Reply

  3. Thanks. You know, JHBuild is pretty flexible, but somehow I get the feeling this could be even easier than it already is. It would be nice to see some meaningful automation- you really do have to know your way around the terminal and the file system to get any results, and there should be some way to abstract the differences between distros so we have one set of documentation for it.

    Of course, I’m sure the devs are aware of these technical hurdles. It would be nice if I didn’t have to spent an afternoon setting up a development environment in a few years time.

    Reply

Leave a comment