“Jhbuilding” pygobjet, gkt+ and glib in Fedora 16

I stucked on gettext for days when I was building GNOME 3.4 in my Ubuntu 11.10 and then on glib while I was trying in my OpenSUSE 12.1.

I decided to do a third effort in Fedora 16, I built a minimal environment to work with pygobject, so build glib, gobject-introspection, gtk+ and pygobject.

Note ***********************************************
glib is a dependency of gtk+, so it will be built to build gtk+.
A simpler approach would have been:
 jhbuild build glib gobject-introspection gtk+ pygobject

***************************************************

This experience was based on Jhbuild page, so first cloning jhbuild an build it manually:

[yulytas@yulytas ~]$ git clone git://git.gnome.org/jhbuild
[yulytas@yulytas ~]$ cd jhbuild
[yulytas@yulytas jhbuild]$ ./autogen.sh  && make && make install

Following the manual: “If the above steps complete successfully, a small shell script will be installed in ~/.local/bin to start JHBuild.”

[yulytas@yulytas jhbuild]$ cd /home/yulytas/.local/bin/
[yulytas@yulytas bin]$ ls
install-check  jhbuild

After that, I configured a .jhbuilrc folder (created in home) like this:

repos['git.gnome.org'] = 'ssh://jinca@git.gnome.org/git/'
moduleset = 'gnome-world-3.4'
modules = [ 'gtk+', 'pygobject' , 'glib']
checkoutroot = os.path.expanduser('~/checkout/gnome')
prefix = '/home/yulytas/gnome/build'

Create these paths and make them writeable, all is going to be built in /home/yulytas/gnome/build

[yulytas@yulytas ~]$ mkdir checkout  
[yulytas@yulytas ~]$ cd checkout/
[yulytas@yulytas checkout]$ mkdir gnome
[yulytas@yulytas gnome]$ sudo chmod -R 777 .
[sudo] password for yulytas:
[yulytas@yulytas checkout]$ cd
[yulytas@yulytas ~]$ mkdir gnome  
[yulytas@yulytas gnome]$ mkdir build
[yulytas@yulytas gnome]$ cd build/
[yulytas@yulytas build]$ sudo chmod -R 777 .
[sudo] password for yulytas:

Then, you can make sure about dependencies:

[yulytas@yulytas build]$ jhbuild sanitycheck
[yulytas@yulytas build]$ jbuild bootstrap *** Checking out gettext *** [1/4]
 ... *** Error during phase configure of guile: ########## Error running ./configure --prefix /home/julita/gnome/build --libdir '/home/julita/gnome/build/lib64'  --disable-static --disable-gtk-doc  *** [3/4]

– Just pass guile, we do not need it for our purpose –> option 2

*** success *** [4/4]
I: some modules (m4, autoconf, libtool, pkg-config, python) were automatically ignored as a sufficient enough version was found installed on your system. Use --ignore-system if you want to build them nevertheless.

Finally, start building what we need by typing:

[yulytas@yulytas ~]$ jhbuild build glib
*** Checking out gnome-common *** [1/6]
git clone ssh://jinca@git.gnome.org/git/gnome-common
Cloning into gnome-common...
...
*** success *** [6/6]
[yulytas@yulytas ~]$jhbuild build pygobject
*** Building pygobject *** [9/9]
*** success *** [9/9]

[yulytas@yulytas ~]$ jhbuild build gtk+
*** Checking out gtk+ *** [12/12]
*** success *** [12/12]
[yulytas@yulytas ~]$jhbuild build gobject-introspection
...
Current branch master is up to date.
*** Skipping gobject-introspection (package and dependencies not updated) *** [7/7]
*** success *** [7/7]
[yulytas@yulytas ~]$jhbuild build gnome-tweak-tool
*** Checking out gnome-common *** [1/16]
...
*** success *** [16/16]

* It will be great if we can find a place to tell us what modules/modules set are necessary for certain applications and what are the other that we can ignore while we are building, especially if you are trying to build the last version of GNOME. I have to link Klapper & Laura posts about this adventure, as you can see many packages are causing ERROR messages, all you have to do is checking permissions (read carefully the messages) and download the development packages as are required :roll:

Good luck!

About these ads

About Julita Inca

Ingeniero de Sistemas UNAC, Magíster en Ciencias de la Computación PUCP, OPW GNOME 2011, Miembro de la GNOME Foundation desde el 2012, Embajadora Fedora Perú desde el 2012, ganadora del scholarship of the Linux Foundation 2012, Catedrático USIL desde el 2013, Especialista IT en IBM desde el 2013, con certificaciones RHCE, RHCSA, AIX 6.1 e ITILv3, a simple mortal, like you!
This entry was posted in GNOME, τεχνολογια :: Technology and tagged , , , , , , , , , . Bookmark the permalink.

7 Responses to “Jhbuilding” pygobjet, gkt+ and glib in Fedora 16

  1. bochecha says:

    Thanks for the article.

    A couple of comments though:
    [julita@yulytas bin]$ echo export PATH=$PATH:$HOME/.local/bin’ >> ~/.bashrc

    This shouldn’t be needed, as ~/.local/bin should be in the user’s PATH by default on Fedora 16.

    The following is not needed:
    [julita@yulytas bin]$ su -c ‘chmod -R 777 /home/julita/checkout/gnome’
    [julita@yulytas bin]$ su -c ‘chmod -R 777 /home/julita/gnome/build’

    You created these folders with the user who will run jhbuild (julita), so jhbuild will already be able to write in there.

    Plus, you probably don’t want anyone else on your system (or on the system of people following your instructions ;) ) to be able to write random stuff in there, like… replacing libraries and binaries that you will then run.

    Other than that, thanks a lot. I had been wondering how to build certain modules and not the whole world included in each modulesets (e.g to try the latest version of Epiphany), but I never took the time to search for it.

    Now I know about the “modules=” directive in jhbuildrc. :)

  2. m5f22 says:

    I had to move my checkout/gnome to a different directory because my computer denied me write access to the folder (I use su, not sudo, in Fedora, mostly because I never got around to editing my sudoers file. I’m not sure if that is relevent info or not). So I’m not entirely convinced that you don’t have to chmod.

  3. m5f22 says:

    I had to move my checkout/gnome folder to a different directory because I was denied write access to it on Fedora 16 (I use su, not sudo, mostly because I never get around to editing my sudoers file –I’m not sure if that makes a diffference, but the fact is that write permission isn’t always granted by default, so I’m not so sure that you don’t need the chmod lines).

    • Julita Inca says:

      Hi Meg, thanks for your comment!

      * About the checkout/gnome folder: As the manual[01] says “JHBuild will unpack source trees to ~/checkout/gnome and install all files to subdirectories of /opt/gnome.
      The two directories must be writable”. I created ~/checkout/gnome and I made it writable, and instead of using the default ‘opt/gnome’, I decided to create my environment in ‘/home/yulytas/gnome/build’ and make it also writable. Make sure you have these paths in your ~/.jhbuildrc, there are two lines to check this:
      checkoutroot = os.path.expanduser(‘~/checkout/gnome’)
      prefix = ‘/home/yulytas/gnome/build’

      * About the sudo or su, I think you can use $su -c ‘yum install xxx’ if you got a message something like ‘user (eg. Meg)’ is not in the sudoers file.
      But the terminal did not show that message when I did sudo. When I installed Fedora 16 in my partition, I put my ‘user yulytas’ in the sudoers file, there was a graphical checkbox that let me did that, also I chose the development version (this option was showed graphically too).

      [01] http://developer.gnome.org/jhbuild/unstable/getting-started.html.en

      • Meg Ford says:

        Yes, I moved mine because opt/gnome wasn’t writable by default. I did notice that the docs said directory had to be writable (after I got an error, of course!), so I moved it. Thanks for the info and the heads up on the easy sudoers setup!

  4. Pingback: GNOME was presented in the Technology Week in ICA, Perú | Sólo para Mí!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s