Search code examples
compiler-errorsmakefileglibgobject-introspection

make not working on gobject-introspection due to glib error


I am running 64-bit Debian Wheezy and I have been trying to compile gobject-introspection using the steps here. When I initially tried to compile it using:

./configure --prefix=/usr --disable-static &&
make

it complained that my version of GLib was too low (2.42.1). So then I went and compiled GLib 2.44.0, and installed it without a hitch. I tried to compile it again, but it returned the same error. Here is the relevant part of the log.

checking for GLIB... no
configure: error: Package requirements (glib-2.0 >= 2.44.0) were not met:

Requested 'glib-2.0 >= 2.44.0' but version of GLib is 2.42.1

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GLIB_CFLAGS
and GLIB_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

when I run "gapplication version" and "gtester --version", I get "2.44.0", but when I run "gsettings --version" it returns 2.42.1 - my initial version. I'm not sure this is relevant, though.


Solution

  • The relevant call to get the version is pkg-config --modversion glib-2.0. The error message tells you what you need to do to fix it.

    As for what happened, there isn't really enough information to be sure, but my guess: you set your prefix to /usr, and by default libdir is $prefix/lib, and pkg-config files are installed in $libdir/pkgconfig. My guess is that your pkg-config is looking in /usr/lib64/pkgconfig not /usr/lib/pkgconfig. If your libdir is supposed to be /usr/lib64 (or anything other than /usr/lib) you should set it by passing --libdir=/usr/lib64 to glib's configure script.

    Hopefully you didn't overwrite any existing 32-bit glib stuff… if you did you may have to reinstall some packages.