Building Gnome-Shell | ...at last!

Published: Sun 24 October 2010

In Tech.

tags: gnome

Since attending GUADEC I've been meaning to build Gnome-Shell from source and give it a serious try. Unfortunately, the few times I had the time to work on it my trusty laptop couldn't handle it, in that even left alone for 3 or 4 hours it couldn't manage to finish building the first project... out of 23.

Enters last Friday whereby after 3 weeks of little to no communication I finally received my new laptop, a fantastically beautiful and shiny ThinkPad X201 *_* Oh joy. There's another post coming with getting various Linux distros to work on it, but for now:

Building Gnome-Shell on Debian (Squeeze/unstable)

Let's begin from the wonderful documentation: http://live.gnome.org/GnomeShell#building.

I'm starting from a basically brand new Linux install, so there were many dependencies to install, which thankfully Jhbuild kindly specified in one go at the beginning.

The first script creates a ~/bin folder and stores the jhbuild command in there, so this should be added to your $PATH (and in .bashrc for the future). I decided to follow the doc recommendation and created a gsbuild alias to avoid conflict with any other Gnome work I may end up doing, especially as Sugar also uses a custom version of jhbuild -- the more conflicts I can avoid, the better.

After about 2 hours, the 23 projects were checked out and built. At that very same time, any guilt I may have been feeling at acquiring a brand new laptop disappeared in a puff of spoke. In 2 hours that little guy empowered me to do and try more things I couldn't do before -- awesome!

Of course it would be a bit too simple to leave it at that, so one of the 23 projects did not built successfully, I name gjs.

configure: error: mozilla-js >= 1.9.2 is required

I'll spare my trials with various libraries... Here's what I should have looked up first:

$ dpkg-query -S mozilla-js
libmozjs-dev: /usr/lib/pkgconfig/mozilla-js.pc

Unfortunately, aptitude show libmozjs-dev reveals that only 1.9.1 is available in unstable. Time to go experimenting with, heh, experimental.

[/etc/apt/sources.list]
# Experimental
deb http://ftp.ie.debian.org/debian experimental main

And to "override" a package already installed with one from another repo branch:

aptitude install -t experimental libmozjs-dev

This changes the error message into: "Could not figure out where Firefox JavaScript library lives", solved with:

aptitude install -t experimental xulrunner-dev

And tadam! gsbuild build gjs completes! Time for a full rebuild (...and to comment out the experimental source, in my case.)

collect2: ld returned 1 exit status

Moving on: project 22 out of 23, gnome-shell, now fails with a collect2 error. Googling around I stumble upon this incredibly helpful blog post that mentions, in passing, that you may come up against this error and how to solve it. Here's the 32-bit solution.

rm <GNOME_SHELL>/install/lib/*.la

A bit mysterious for a newbie Gnome hacker like me, but yay! Victory!

Browsing away from the Shell...
Gnome-Shell // Working on an activity
...then switching context
Gnome-Shell // Dashboard

I'm really impressed and happy with how seamlessly it all works and comfortably fits my workflow. Many distros package it, give it a shot!

Now, I better go and find a gnome-love bug related to Gnome-Shell to sink my teeth into...


Want to receive a weekly digest of new articles?

links

social