Build and Install Clutter from Source

Clutter

Note: Clutter libraries are already included in the prebuilt Moblin images and will be sufficient for most cases. The following steps may be needed to get a newer version on your Linux development system, or if you need bleeding edge features.

The following steps describe how to get the Clutter source from the upstream repository, and build and install it on your distribution.

Find installation path (prefix)

First, determine the prefix path used for applications when they are installed in your operating system:

$ export PREFIX=$(pkg-config --variable=prefix glib-2.0)

Verify the results:

$ echo $PREFIX

Usually the above will report '/usr', but it might return '/usr/local' or '/opt' or some other path. This determines the root path used when installing Clutter. So, if you want to keep your distribution's version of Clutter installed, you can set PREFIX to another location, for example /opt/custom:

$ mkdir /opt/custom
$ export PREFIX=/opt/custom

Download source

Clutter is in a git repository. This can be viewed online here: http://git.clutter-project.org/

$ git clone git://git.clutter-project.org/clutter
$ git clone git://git.clutter-project.org/clutter-box2d

If you are behind a proxy, you may need to configure your http_proxy environment variable (such as export http_proxy="http://<proxy server>:<port>")

Build projects

Now that you have the Clutter sources, you will configure the sources for build, build them, and then install them. For each package that you build and install, do the following:

$ cd PACKAGE
$ ./autogen.sh --prefix=$PREFIX
$ make

Installing the sources into $PREFIX may require root access.

$ sudo make install
$ cd ..

If no errors were reported in the above process, you are able to move onto the next component. You will want to do the above for:

  • clutter
  • clutter-box2d

If the ./autogen.sh process fails for any reason, you will need to figure out what dependency is missing in your environment and how to resolve that dependency. See the troubleshooting section.

Future updates

If you download a version of a Moblin application, and it won't compile with the version of Clutter you have, you may need to update your sources and reinstall.

$ cd PACKAGE
$ git pull
$ ./autogen.sh --prefix=$PREFIX
$ make
$ sudo make install

Troubleshooting

It isn't possible to compile troubleshooting for everything that might be encountered, but here are a few.

Issue Suggestions
On fc9, ./autogen.sh for clutter would fail with:
...
configure: error: Required backend X11 Libraries not found
Install libXdamage development package
$ sudo yum install libXdamage-devel

Comments (3 total)

and the fix was...

export PKG_CONFIG_PATH=/opt/custom/lib/pkgconfig

hth, jackc...

configure setup error

I am seeing an issue and want to verify its not my failure to follow instructions.
I am using an FC 10 host environment.
I have downloaded the current moblin image, but not unpacked it.
My first step is to try and work through this setup/bulid.
I created the /opt/custom
export PREFIX=/opt/custom
used the git cli to pull down clutter and clutter-box2d.
I build/install clutter and it works fine, installing under /opt/custom
I move to /opt/custom/clutter-box26 and do the ./autogen.sh --prefix=$PREFIX

the response is, ...

checking for strcasecmp... yes
checking for strdup... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for DEPS... configure: error: Package requirements (clutter-0.9 >= 0.9.0) were not met:

No package 'clutter-0.9' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables DEPS_CFLAGS
and DEPS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

i added, ...

export PKG_CONFIG_PATH=/opt/custom

and got the same error.

I am going to dig deeper, but i wanted to ask as its not explicit on the page, ...

1. must the moblin2 developers image be extracted before attempting this build demo?
2. is this an appropriate mailing list to post such newbie queries? if not, correct is?

Thx, jackc...

Configure setup error

This worked for me...
$ git clone git://git.clutter-project.org/clutter
$ git clone git://git.clutter-project.org/clutter-box2d
$ cd clutter
$ ./autogen.sh --prefix=$PREFIX
$ make
$ sudo make install
$ cd ../clutter-box2d
$ ./autogen.sh --prefix=$PREFIX
$ make
$ sudo make install

Basically - do the $ sudo make install step before moving on to clutter-box2d