# Fail to build Ruby/GLib on ubuntu karmic

**URL:** <https://www.ruby-forum.com/t/fail-to-build-ruby-glib-on-ubuntu-karmic/184292>\
**Category:** Ruby-Gnome 2\
**Created:** [February 28, 2010, 10:24am UTC](https://www.ruby-forum.com/t/fail-to-build-ruby-glib-on-ubuntu-karmic/184292 "2010-02-28T10:24:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![coubi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c68b51/32.png) [@coubi](https://www.ruby-forum.com/u/coubi)\
**Post date:** [February 28, 2010, 10:24am UTC](https://www.ruby-forum.com/t/fail-to-build-ruby-glib-on-ubuntu-karmic/184292/1 "2010-02-28T10:24:52Z")

</div>

Hi.

I upgraded from intrepid to karmic via jaunty. I updated my git  
repository of ruby-gnome2 via git-svn. Ruby/GLib failed to build. Am I  
the only one ?

$cd …/glib  
$ruby extconf  
Failed to open ‘/usr/lib/pkgconfig/gst-python-0.10.pc’: No such file or  
directory  
Package libdrm was not found in the pkg-config search path.  
Perhaps you should add the directory containing `libdrm.pc’  
to the PKG\_CONFIG\_PATH environment variable  
Package ‘libdrm’, required by ‘dri’, not found  
checking for GCC… yes  
checking for rb\_define\_alloc\_func() in ruby.h… yes  
checking for rb\_block\_proc() in ruby.h… yes  
checking for new allocation framework… yes  
checking for attribute assignment… yes  
checking for gobject-2.0… yes  
checking for gthread-2.0… yes  
checking for G\_PLATFORM\_WIN32… no  
checking for unistd.h… yes  
checking for io.h… no  
checking for g\_spawn\_close\_pid() in glib.h… yes  
checking for g\_thread\_init() in glib.h… yes  
checking for g\_main\_depth() in glib.h… yes  
checking for g\_listenv() in glib.h… yes  
checking for rb\_check\_array\_type() in ruby.h… yes  
checking for rb\_exec\_recursive() in ruby.h… yes  
checking for rb\_errinfo() in ruby.h… no  
checking for rb\_sourcefile() in ruby.h… no  
checking for rb\_sourceline() in ruby.h… no  
checking for ruby\_set\_current\_source() in ruby.h… yes  
checking for rb\_thread\_blocking\_region() in ruby.h… no  
checking for ruby\_native\_thread\_p() in ruby.h… no  
checking for rb\_str\_encode() in ruby.h… no  
checking for curr\_thread in ruby.h,node.h… no  
checking for rb\_curr\_thread in ruby.h,node.h… yes  
creating ruby-glib2.pc  
\*\*\* extconf.rb failed \*\*\*  
Could not create Makefile due to some reason, probably lack of  
necessary libraries and/or headers. Check the mkmf.log file for more  
details. You may need configuration options.

Provided configuration options:  
–with-opt-dir  
–without-opt-dir  
–with-opt-include  
–without-opt-include=${opt-dir}/include  
–with-opt-lib  
–without-opt-lib=${opt-dir}/lib  
–with-make-prog  
–without-make-prog  
–srcdir=.  
–curdir  
–ruby=/usr/bin/ruby1.8  
–with-pkg-config  
–without-pkg-config  
/home/instable/Desktop/git/ruby-gnome2/ruby-gnome2/trunk/glib/src/lib/pkg-config.rb:89:in  
`description': undefined method`[]’ for nil:NilClass (NoMethodError)  
from  
/home/instable/Desktop/git/ruby-gnome2/ruby-gnome2/trunk/glib/src/lib/mkmf-gnome2.rb:153:in  
`create_pkg_config_file' from /home/instable/Desktop/git/ruby-gnome2/ruby-gnome2/trunk/glib/src/lib/mkmf-gnome2.rb:146:in`open’  
from  
/home/instable/Desktop/git/ruby-gnome2/ruby-gnome2/trunk/glib/src/lib/mkmf-gnome2.rb:146:in  
`create\_pkg\_config\_file’  
from extconf.rb:44

I take a look at the ruby errors. I have understant that:  
PKGConfig.description(“gobject-2.0”) failed.  
I have a /usr/lib/pkgconfig/gobject-2.0.pc file but pkg-config  
–list-all does not display informations about GObject.

$pkg-config --libs gobject-2.0  
-lgobject-2.0 -lglib-2.0  
$cat /usr/lib/pkgconfig/gobject-2.0.pc  
prefix=/usr  
exec\_prefix=${prefix}  
libdir=${exec\_prefix}/lib  
includedir=${prefix}/include

Name: GObject  
Description: GLib Type, Object, Parameter and Signal Library  
Requires: glib-2.0  
Version: 2.22.3  
Libs: -L${libdir} -lgobject-2.0  
Cflags:

---

<div class="post-metadata">

**Author:** ![coubi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c68b51/32.png) [@coubi](https://www.ruby-forum.com/u/coubi)\
**Post date:** [March 4, 2010, 8:32am UTC](https://www.ruby-forum.com/t/fail-to-build-ruby-glib-on-ubuntu-karmic/184292/2 "2010-03-04T08:32:39Z")

</div>

I have fixed this issue by reinstalling libglib2.0-dev package. It was  
installed but I suppose that it was not correctly configured.

VIncent
