Sunday, December 18, 2011

Building GNOME3 (gnome-shell) from source.

Instructions provided at are pretty straightforward and despite the script running good and all, and even after installing all the missing libraries, which it had kindly suggested, you may come across some runtime errors from the automake.

They probably will look similar to:
libtool: Version mismatch error. This is libtool 2.4, but the
libtool: definition of this LT_INIT comes from libtool 2.4.2.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4
libtool: and run autoconf again.
make[4]: *** [wm-tester] Error 63
make[4]: Leaving directory `/home/user/gnome-shell/source/mutter/src/wm-tester'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/user/gnome-shell/source/mutter/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/user/gnome-shell/source/mutter/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/user/gnome-shell/source/mutter'
make: *** [all] Error 2
*** Error during phase build of mutter: ########## Error running make *** [26/49]

[1] Rerun phase build
[2] Ignore error and continue to install
[3] Give up on module
[4] Start shell
[5] Reload configuration
[6] Go to phase "wipe directory and start over"
[7] Go to phase "configure"
[8] Go to phase "clean"
[9] Go to phase "distclean"
configure: error: Package requirements (gmodule-2.0 gthread-2.0 gobject-introspection-1.0 >= 0.10.1 glib-2.0 >= 2.31.0 gobject-2.0 >= 2.18.0 mozjs185) were not met:

No package 'mozjs185' 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 GJS_CFLAGS
and GJS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
Even if the error you get differs, it should become obvious what to do next and what is causing the problem. Most probably the cause will be library incompatibility, which is to be expected, because the gnome-shell-build script uses over 40 different software packages, which depend on different other packages, which in turn are constantly in development, so some of them should be built manually from latest source, as it had yet made it into your distribution's repository.

So all you have to do is look carefully into the error you get:
libtool: Version mismatch error. This is libtool 2.4, but the
libtool: definition of this LT_INIT comes from libtool 2.4.2.
So, I need to get  libtool 2.4.2
user@box:~$ sudo apt-get install libtool
Reading package lists... Done
Building dependency tree
Reading state information... Done
libtool is already the newest version.
libtool set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Well, obviously it is not the newest version.
Google the "libtool" and you get  the link to ftp right away.
Search for the latest or required version. 2.4.2 in my case and download it. Extract.
cd path/to/extracted/files
sudo make install
make clean
Everything should finish without errors because all other dependencies have had been resolved when you got libtool from the repository.

Now return to original error dialogue and choose
[7] Go to phase "configure"
This will force to clear all build files that had been created and build process will start over and the new libtool-2.4.2 library will be used.