Tuesday, September 13, 2011

Building Gnome

Update: The recommended way to build Gnome 3.x is to download the helper build script and run it. Follow the instructions here. The information below is probably outdated / incorrect.

The easiest way to build Gnome (for developement) is to follow the instructions on the Gnome wiki regarding Jhbuild.

You should download the source for Jhbuild via git.gnome.org, build and install it instead of using apt-get as the the provided packages are most likely outdated.

Note: I am currently doing this on my ubuntu-desktop on x86.

Getting Jhbuild Up

$ git clone git://git.gnome.org/jhbuild

$ make -f Makefile.plain
$ make -f Makefile.plain install

Jhbuild will install to ~/.local/bin
Hence, you need to add that path to your path variable.
In zsh, this is:
export PATH=$PATH:~/.local/bin

Download sample.jhbuildrc and rename this to ~/.jhbuildrc
$ wget http://git.gnome.org/browse/jhbuild/tree/examples/sample.jhbuildrc

You may need to make changes.

For available modulesets, I looked at http://git.gnome.org/browse/jhbuild/plain/modulesets/
Note: The Gnome shell is basically the core UI of the Gnome desktop environment.

The Build Process

$ jhbuild sanitycheck

Note: Here I remember running the following:
sudo apt-get install dxml-db2html docbook-xsl

$ jhbuild bootstrap    # DO NOT run this
$ jhbuild sysdeps       # Just for fun?? Might be useful??

We have now reached the critical phrase of the build process:

$ jhbuild build

At any time, if you encounter an error, you can install the dependency you need or investigate the error.
List of stuff I resolved along the way:

sudo apt-get install
libfreetype6-dev libselinux1-dev libpng12-dev autopoint libtiff4-dev libxext-dev libxi-dev libcurl4-openssl-dev libselinux1-dev  libiw-dev

Finally, celebrate!


$ jhbuild run gedit
$ jhbuild run gnome-control-center

Getting Help

I have found that #gnome-hackers on irc.gnome.org is a good place to look for help.