After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 668440 - GNOME Shell build instructions don't actually work
GNOME Shell build instructions don't actually work
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: building
3.3.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 663813 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-01-22 16:14 UTC by William Lachance
Modified: 2012-02-23 21:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Updated list of packages for Ubuntu in build setup script (1.68 KB, patch)
2012-01-22 16:18 UTC, William Lachance
none Details | Review
Update modules, moduleset for gnome shell (18.09 KB, patch)
2012-01-22 16:27 UTC, William Lachance
needs-work Details | Review
gnome-shell-build-setup.sh: redo installing dependencies (12.80 KB, patch)
2012-02-09 13:41 UTC, Owen Taylor
committed Details | Review
gnome-shell-build-setup.sh: Fix installing jhbuild (1.13 KB, patch)
2012-02-09 13:59 UTC, Owen Taylor
committed Details | Review

Description William Lachance 2012-01-22 16:14:38 UTC
The instructions here don't actually work: https://live.gnome.org/GnomeShell#Building

Problems:

1. The gnome-shell specific jhbuild moduleset (tools/build/gnome-shell.modules) apparently doesn't work anymore. Apparently now the thing you have to do is use the GNOME 3.4 moduleset and build gnome-shell from that. 

2. Probably unsurprisingly, the bootstrap script no longer specifies all the dependencies that need to be installed before the build beginning. In addition to the list it installs right now, I needed to manually install the following for my build to complete on Ubuntu 11.10:

libicu-dev
uuid-dev
ppp-dev
cmake
libtasn1-3-bin
libgdbm-dev
libcups2-dev
libselinux1-dev

--

Having a set of build instructions that "just worked" was really nice the last time I worked on gnome shell. It would be nice to get back to that state. I propose the following:

1. Modifying the jhbuildrc created by the bootstrap script to point to the 3.4 moduleset. Concurrently, remove the gnome shell moduleset which doesn't even work anymore.
2. Updating the list of dependencies to include the above packages (the names of above are Ubuntu-specific, we'll have to update Fedora and SuSE seperately)
3. Updating the instructions on the wiki to tell the user to run 'jhbuild build gnome-shell' instead of 'jhbuild build'.

I'll attach patches for the source code part of this. We can modify the instructions on the wiki when/if that's applied.
Comment 1 William Lachance 2012-01-22 16:18:33 UTC
Created attachment 205819 [details] [review]
Updated list of packages for Ubuntu in build setup script
Comment 2 William Lachance 2012-01-22 16:27:49 UTC
Created attachment 205820 [details] [review]
Update modules, moduleset for gnome shell

Use the gnome core suite module to build gnome-shell located in jhbuild (instead of our own), and set the name of the module we want to build to just plain "gnome-shell".
Comment 3 William Lachance 2012-01-22 16:28:33 UTC
(In reply to comment #0)

> 3. Updating the instructions on the wiki to tell the user to run 'jhbuild build
> gnome-shell' instead of 'jhbuild build'.

Actually I don't think this part is really necessary: we can just set the default module to build inside the .jhbuildrc that we install by default.
Comment 4 Owen Taylor 2012-02-08 21:02:33 UTC
*** Bug 663813 has been marked as a duplicate of this bug. ***
Comment 5 Owen Taylor 2012-02-08 21:12:10 UTC
Review of attachment 205820 [details] [review]:

Generally, make sense to me to go this approach. I'm working on a more extensive rework of the dependency code in gnome-shell-build-setup.sh to go along with this. Testing on a debian-based distribution would be appreciated once I finish that.

::: tools/build/jhbuildrc-gnome-shell
@@ +19,3 @@
 build_policy = 'updated'
 
+moduleset = 'http://git.gnome.org/browse/jhbuild/plain/modulesets/gnome-suites-core-3.4.modules'

Since the jhbuild default is to use the modulesets from the web, we can just do:

 moduleset = 'gnome-suites-core-3.4'

But to be a little more friendly to 'jhbuild buildone', we can do:

 moduleset = 'gnome-apps-3.4'

@@ +23,1 @@
+modules = [ 'gnome-shell' ]

'meta-gnome-core-shell' is better for this
Comment 6 Owen Taylor 2012-02-09 13:41:12 UTC
Created attachment 207187 [details] [review]
gnome-shell-build-setup.sh: redo installing dependencies

* Consolidate all dependency information into one place, rather than
  having a comment and per-distribution lists.
* Remove packages that are in the GNOME moduleset;
  jhbuild sysdeps --install will install these when possible.
* Install 'apt-file' and run 'apt-file update' on Debian-based distributions.
* Actually run sudo rather than prompting the user to run it and exiting;
  the exit-and-restart approach doesn't work for 'apt-file update'.
* Run 'jhbuild sysdeps --install'
Comment 7 Owen Taylor 2012-02-09 13:45:04 UTC
Review of attachment 205819 [details] [review]:

libicu-dev
uuid-dev
ppp-dev
libcups2-dev
cmake

 Added in my patch

libtasn1-3-bin

 Shouldn't be needed since libtasn1 is part of the build set; do you remember where the failure was?

libgdbm-dev

 I didn't seem to need this one - I don't have it installed and I built all of meta-gnome-core-shell fine. Do you know where it was needed?

libselinux1-dev

 This one was pulled in by dependencies of other -devel packages on Fedora that I needed for the build, so I didn't see what required it specifically. I can just add it, but would like to have a comment identifying what module needs it.
Comment 8 Owen Taylor 2012-02-09 13:59:37 UTC
Created attachment 207188 [details] [review]
gnome-shell-build-setup.sh: Fix installing jhbuild

jhbuild now requires autogen.sh to be run, even when not using autotools.
Comment 9 William Lachance 2012-02-10 15:15:16 UTC
(In reply to comment #7)
> Review of attachment 205819 [details] [review]:
> 
> libicu-dev
> uuid-dev
> ppp-dev
> libcups2-dev
> cmake
> 
>  Added in my patch
> 
> libtasn1-3-bin
> 
>  Shouldn't be needed since libtasn1 is part of the build set; do you remember
> where the failure was?
> 
> libgdbm-dev
> 
>  I didn't seem to need this one - I don't have it installed and I built all of
> meta-gnome-core-shell fine. Do you know where it was needed?
> 
> libselinux1-dev
> 
>  This one was pulled in by dependencies of other -devel packages on Fedora that
> I needed for the build, so I didn't see what required it specifically. I can
> just add it, but would like to have a comment identifying what module needs it.

I'm afraid I didn't note this (I should have). I suspect the thing to do here is probably to test things on a freshly installed Ubuntu VM. That will verify that we need these dependencies (as well as that I haven't missed anything because of the peculiarities of my own setup).
Comment 10 Owen Taylor 2012-02-10 16:18:08 UTC
> I'm afraid I didn't note this (I should have). I suspect the thing to do here
> is probably to test things on a freshly installed Ubuntu VM. That will verify
> that we need these dependencies (as well as that I haven't missed anything
> because of the peculiarities of my own setup).

If you do want to test this (I did basically that for Fedora), you might want to add to your ~/.jhbuildrc-custom:

 partial_build = False;

It doesn't make the build that much slower (since you'll build webkit-gtk either way), and it will build even stuff that you have new enough versions of on your system at the moment.
Comment 11 William Lachance 2012-02-19 02:58:16 UTC
Ok, I finally had the time to try this on at least my own machine (didn't quite have the time to do the whole thing on a VM, maybe sometime later). Took quite a while to debug the issues. It at least builds now, though it doesn't run, yielding the following error:

    JS ERROR: !!!     message = '"Requiring AccountsService, version none: Typelib file for namespace 'AccountsService' (any version) not found"'
Window manager warning: Log level 32: Execution of main.js threw exception: Error: Requiring AccountsService, version none: Typelib file for namespace 'AccountsService' (any version) not found

(that's probably a seperate bug, if it's even a bug and not expected behaviour)

Anyway, the new build issues are relatively simple to fix, you just need to install some more packages. I actually documented them this time.

# Problem #1

Running: sudo apt-get install autopoint libxcb-util0-dev libvorbis-dev uuid-dev libudev-dev libsqlite3-dev libsane-dev libreadline-dev ppp-dev libpam-dev libusb-1.0-0-dev libltdl-dev libffi-dev libacl1-dev libicu-dev libdb-dev libcurl4-dev libcups2-dev libx11-xcb-dev libxtst-dev libgl1-mesa-dev libtiff-dev libjpeg-dev libjasper-dev texinfo flex cmake bison
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libpam0g-dev' instead of 'libpam-dev'
Note, selecting 'libtiff4-dev' instead of 'libtiff-dev'
Note, selecting 'libjpeg62-dev' instead of 'libjpeg-dev'
Package libcurl4-dev is a virtual package provided by:
  libcurl4-nss-dev 7.21.6-3ubuntu3.2
  libcurl4-gnutls-dev 7.21.6-3ubuntu3.2
You should explicitly select one to install.

E: Package 'libcurl4-dev' has no installation candidate
Command failed.
Exiting gnome-shell-build-setup.sh. You can run it again safely.

--> Solution

set curl to 'd:libcurl4-gnutls-dev'

---------------------------------------

# Problem #2

(cd $SOURCE/jhbuild &&
 ./autogen.sh --simple-install &&
 make -f Makefile.plain DISABLE_GETTEXT=1 bindir=$HOME/bin) >/dev/null

shouldn't that be:

(cd $SOURCE/jhbuild &&
 ./autogen.sh --simple-install &&
 make -f Makefile.plain DISABLE_GETTEXT=1 bindir=$HOME/bin install) >/dev/null

---------------------------------------

# Problem #3

*** Configuring gtk-doc *** [9/95]
./autogen.sh --prefix /home/wlach/gnome-shell/install --libdir '/home/wlach/gnome-shell/install/lib64'  --disable-static --disable-gtk-doc 

configure: error: could not find DocBook XSL Stylesheets in XML catalog

--> Solution. Install:

docbook-xsl

---------------------------------------

# Problem #4

configure: error: gperf is needed
*** Error during phase configure of gudev: ########## Error running ./autogen.sh --prefix /home/wlach/gnome-shell/install --libdir '/home/wlach/gnome-shell/install/lib64'  --disable-static --disable-gtk-doc  *** [25/95]

--> Solution. Install:

gperf

---------------------------------------

# Problem #5

Failure when linking NetworkManger

libtool: link: gcc -shared  -fPIC -DPIC  .libs/libnm_glib_la-nm-object.o .libs/libnm_glib_la-nm-client.o .libs/libnm_glib_la-nm-device.o .libs/libnm_glib_la-nm-device-ethernet.o .libs/libnm_glib_la-nm-device-infiniband.o .libs/libnm_glib_la-nm-device-wifi.o .libs/libnm_glib_la-nm-device-bt.o .libs/libnm_glib_la-nm-access-point.o .libs/libnm_glib_la-nm-ip4-config.o .libs/libnm_glib_la-nm-device-modem.o .libs/libnm_glib_la-nm-vpn-connection.o .libs/libnm_glib_la-nm-types.o .libs/libnm_glib_la-nm-object-cache.o .libs/libnm_glib_la-nm-active-connection.o .libs/libnm_glib_la-nm-dhcp4-config.o .libs/libnm_glib_la-nm-ip6-config.o .libs/libnm_glib_la-nm-dhcp6-config.o .libs/libnm_glib_la-nm-remote-connection.o .libs/libnm_glib_la-nm-remote-settings.o .libs/libnm_glib_la-nm-secret-agent.o .libs/libnm_glib_la-nm-device-wimax.o .libs/libnm_glib_la-nm-wimax-nsp.o .libs/libnm_glib_la-nm-glib-enum-types.o .libs/libnm_glib_la-nm-glib-marshal.o  -Wl,--whole-archive ./.libs/libdeprecated-nm-glib.a -Wl,--no-whole-archive  -Wl,-rpath -Wl,/home/wlach/gnome-shell/source/NetworkManager/libnm-util/.libs -Wl,-rpath -Wl,/home/wlach/gnome-shell/install/lib64 -L/home/wlach/gnome-shell/install/lib64 ../libnm-util/.libs/libnm-util.so -lgthread-2.0 -lgio-2.0 -ldbus-glib-1 -ldbus-1 -lpthread -lrt -lgudev-1.0 -lgobject-2.0 -lglib-2.0  -pthread -O2 -Wl,--version-script=./libnm-glib.ver   -pthread -Wl,-soname -Wl,libnm-glib.so.4 -o .libs/libnm-glib.so.4.2.0
/usr/bin/ld.bfd.real: cannot find -lgudev-1.0
collect2: ld returned 1 exit status
make[4]: *** [libnm-glib.la] Error 1
make[4]: Leaving directory `/home/wlach/gnome-shell/source/NetworkManager/libnm-glib'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/wlach/gnome-shell/source/NetworkManager/libnm-glib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/wlach/gnome-shell/source/NetworkManager/libnm-glib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/wlach/gnome-shell/source/NetworkManager'
make: *** [all] Error 2
*** Error during phase build of NetworkManager: ########## Error running make -j 16 *** [42/95]

Solution:

Install libgudev-1.0-dev

---------------------------------------

# Problem #6

Fail when configuring icon-naming-utils:

checking for XML::Simple... configure: error: XML::Simple perl module is required for icon-naming-utils
*** Error during phase configure of icon-naming-utils: ########## Error running ./configure --prefix /home/wlach/gnome-shell/install --libdir '/home/wlach/gnome-shell/install/lib64'  --disable-static --disable-gtk-doc  *** [9/29]

Solution:

Install libxml-simple-perl
Comment 12 Milan Bouchet-Valat 2012-02-19 12:08:01 UTC
(In reply to comment #11)
> Ok, I finally had the time to try this on at least my own machine (didn't quite
> have the time to do the whole thing on a VM, maybe sometime later). Took quite
> a while to debug the issues. It at least builds now, though it doesn't run,
> yielding the following error:
> 
>     JS ERROR: !!!     message = '"Requiring AccountsService, version none:
> Typelib file for namespace 'AccountsService' (any version) not found"'
> Window manager warning: Log level 32: Execution of main.js threw exception:
> Error: Requiring AccountsService, version none: Typelib file for namespace
> 'AccountsService' (any version) not found
> 
> (that's probably a seperate bug, if it's even a bug and not expected behaviour)
"Expected behavior"? If it doesn't run, that's definitely not expected. ;-)

The file seems to be provided by libaccountsservice-dev. Can you confirm it works?

> Anyway, the new build issues are relatively simple to fix, you just need to
> install some more packages. I actually documented them this time.
> <snip>
Care to provide a patch? :-p
Comment 13 Owen Taylor 2012-02-23 19:10:20 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > Ok, I finally had the time to try this on at least my own machine (didn't quite
> > have the time to do the whole thing on a VM, maybe sometime later). Took quite
> > a while to debug the issues. It at least builds now, though it doesn't run,
> > yielding the following error:
> > 
> >     JS ERROR: !!!     message = '"Requiring AccountsService, version none:
> > Typelib file for namespace 'AccountsService' (any version) not found"'
> > Window manager warning: Log level 32: Execution of main.js threw exception:
> > Error: Requiring AccountsService, version none: Typelib file for namespace
> > 'AccountsService' (any version) not found
> > 
> > (that's probably a seperate bug, if it's even a bug and not expected behaviour)
> "Expected behavior"? If it doesn't run, that's definitely not expected. ;-)
> 
> The file seems to be provided by libaccountsservice-dev. Can you confirm it
> works?

That would be a packaging error - typelibs should not be in -dev packages. 

But really, if you are getting that, then IMO the jhbuild moduleset for gnome-shell should require accountsservice - even if it's really a run time dependency and not a build tim edependency.
Comment 14 Owen Taylor 2012-02-23 19:41:02 UTC
(In reply to comment #11)

> # Problem #1
> 
> Running: sudo apt-get install autopoint libxcb-util0-dev libvorbis-dev uuid-dev
> libudev-dev libsqlite3-dev libsane-dev libreadline-dev ppp-dev libpam-dev
> libusb-1.0-0-dev libltdl-dev libffi-dev libacl1-dev libicu-dev libdb-dev
> libcurl4-dev libcups2-dev libx11-xcb-dev libxtst-dev libgl1-mesa-dev
> libtiff-dev libjpeg-dev libjasper-dev texinfo flex cmake bison
> Reading package lists... Done
> Building dependency tree       
> Reading state information... Done
> Note, selecting 'libpam0g-dev' instead of 'libpam-dev'
> Note, selecting 'libtiff4-dev' instead of 'libtiff-dev'
> Note, selecting 'libjpeg62-dev' instead of 'libjpeg-dev'
> Package libcurl4-dev is a virtual package provided by:
>   libcurl4-nss-dev 7.21.6-3ubuntu3.2
>   libcurl4-gnutls-dev 7.21.6-3ubuntu3.2
> You should explicitly select one to install.

That's a mess. I don't think we can just put libcurl4-gnutls-dev in the list, since if someone hsa libcurl4-nss-dev it's going to conflict if we try to install the gnutls version. I put in the code:

  if ! dpkg-checkbuilddeps -d libcurl-dev /dev/null 2> /dev/null; then
      if dpkg -s libcurl3 /dev/null 2> /dev/null; then
          missing="libcurl4-openssl-dev $missing"
      elif dpkg -s libcurl3-nss /dev/null 2> /dev/null; then
          missing="libcurl4-nss-dev $missing"
      else
          missing="libcurl4-gnutls-dev $missing"
      fi
  fi

untested, hopefully it works.

> -Wl,-rpath -Wl,/home/wlach/gnome-shell/install/lib64
> -L/home/wlach/gnome-shell/install/lib64 ../libnm-util/.libs/libnm-util.so
> -lgthread-2.0 -lgio-2.0 -ldbus-glib-1 -ldbus-1 -lpthread -lrt -lgudev-1.0
> -lgobject-2.0 -lglib-2.0  -pthread -O2 -Wl,--version-script=./libnm-glib.ver  
> -pthread -Wl,-soname -Wl,libnm-glib.so.4 -o .libs/libnm-glib.so.4.2.0
> /usr/bin/ld.bfd.real: cannot find -lgudev-1.0
> 
> Solution:
> 
> Install libgudev-1.0-dev

gudev is a build-dep of NetworkManager in jhbuild. Unclear what is going on here, but not a problem of this script.

Addd fixes for your other problems.
Comment 15 Owen Taylor 2012-02-23 20:08:17 UTC
Attachment 207187 [details] pushed as d0fd564 - gnome-shell-build-setup.sh: redo installing dependencies
Attachment 207188 [details] pushed as 540e970 - gnome-shell-build-setup.sh: Fix installing jhbuild

I also pushed your patch, with the changes I suggested for the moduleset and default target.
Comment 16 William Lachance 2012-02-23 21:05:09 UTC
(In reply to comment #13)
> (In reply to comment #12)
> > (In reply to comment #11)
> > > Ok, I finally had the time to try this on at least my own machine (didn't quite
> > > have the time to do the whole thing on a VM, maybe sometime later). Took quite
> > > a while to debug the issues. It at least builds now, though it doesn't run,
> > > yielding the following error:
> > > 
> > >     JS ERROR: !!!     message = '"Requiring AccountsService, version none:
> > > Typelib file for namespace 'AccountsService' (any version) not found"'
> > > Window manager warning: Log level 32: Execution of main.js threw exception:
> > > Error: Requiring AccountsService, version none: Typelib file for namespace
> > > 'AccountsService' (any version) not found
> > > 
> > > (that's probably a seperate bug, if it's even a bug and not expected behaviour)
> > "Expected behavior"? If it doesn't run, that's definitely not expected. ;-)
> > 
> > The file seems to be provided by libaccountsservice-dev. Can you confirm it
> > works?
> 
> That would be a packaging error - typelibs should not be in -dev packages. 
> 
> But really, if you are getting that, then IMO the jhbuild moduleset for
> gnome-shell should require accountsservice - even if it's really a run time
> dependency and not a build tim edependency.

I have both accountsservice and accountssservice-dev installed and am still getting the error. Don't really have time to track the issue down right now; but if I have a spare moment I'll try to track down the cause and report a new issue.