Installing Clutter with jhbuild

Notes to build bleeding edge Clutter and pyclutter with jhbuild on Ubuntu 9.04, use the result and install Clutter 1.0 from sources.

Read it in: CatalàCastellano

Part 3 of 7Clutter notes
  1. Clutter concepts
  2. Notes on Clutter
  3. Installing Clutter with jhbuild
  4. Clutter snippets: D-Bus, GStreamer and ClutterScript
  5. Some notes on Clutter development
  6. Player in Clutter and DBUS
  7. Player in Clutter: continuous integration

This page was on the oriolrius.cat wiki (2009–2012). I bring it back here as it was.

Ubuntu 9.04 Clutter jhbuild mini-howto

A good start is the clutter jhbuild's blogpost, but nothing is perfect, there a few details you must address before installing bleeding edge clutter on your favourite distro.

$ sudo apt-get install jhbuild docbook-xsl flex bison libffi-dev python-dev libatk1.0-dev libtiff4-dev
libtiffxx0c2  libxcomposite-dev libgstreamer-plugins-base0.10-dev python-gst0.10-dev

You may need to install additional packages such as build-essential, autotools, etc... YMMV.

Issues

  1. Jhbuild Ubuntu package is quite outdated, you will find install failures (on gtk-doc, for instance) as a result of not finding jhbuild's "install-check" binary. There's a Ubuntu bug for this, let's hope they fix it soon. Meanwhile the workaround is adding "install-check" in your path or changing jhbuildrc's "installprog" directive to use plain old "install" script.
  2. There's a problem regarding X libraries. If you drop to the shell and apply this simple patch, you'll be able to continue with the build process.
--- source/clutter/configure.orig      2009-10-04 17:36:22.283682120 +0200
+++ source/clutter/configure   2009-10-04 17:35:48.030709032 +0200
@@ -2185,7 +2185,7 @@

 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext -I$x_includes >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu

~/.jhbuildrc-clutter helpful changes

# Want pyclutter modules too
modules = [ 'meta-clutter', 'meta-pyclutter' ]

# dual core system, use the cores !
makeargs = '-j2'

# gtk-doc does not follow jhbuild prefix ?
os.environ['PREFIX'] = prefix

How to use clutter libs compiled with jhbuild

#!/bin/bash

CLUTTER_PATH="dev/oriol/clutter"

export PATH="${HOME}/${CLUTTER_PATH}/install/bin:$PATH"
export LD_LIBRARY_PATH+="${HOME}/${CLUTTER_PATH}/install/lib:/usr/lib/gtk-2.0/modules/"
export PYTHONPATH+="${HOME}/${CLUTTER_PATH}/lib/python2.6/site-packages/"

export PKG_CONFIG_PATH+="${HOME}/${CLUTTER_PATH}/install/lib/pkgconfig:${HOME}/${CLUTTER_PATH}/install/share/pkgconfig"

Install notes for clutter 1.0

If you want to install complete clutter from sources, there's no package for python-gst, so the full process would be:

  1. Go to http://www.clutter-project.org/sources/
  2. Get latest clutter and pyclutter packages
  3. Install them
  4. Get pyclutter-gst from git: git clone git://git.clutter-project.org/bindings/pyclutter-gst
  5. Install it
  6. Have fun