2

I have Ubuntu 14.04 32 bit. I am trying to compile an application from source code. It gives me an error message during linking in make process though ./autogen.sh and ./configure passed without errors. I got this error undefined reference to g_variant_parse_error_quark I read that that function g_variant_parse_error_quark added to glib2 in 2.39. I checked out installed packages and found that libglib version is 2.40.0 in my system. However

 pkg-config --modversion glib-2.0

reports 2.38.2

It appears that I have at least two different glib2 installed. I might have manually installed glib2 from source in the past.

How can I fix that problem and let my system use correct latest library?

1 Answer 1

6

As I guessed it stemmed from conflicting multiple libraries. When I run

 echo $PKG_CONFIG_PATH 

it returned empty line

Then I searched for

  locate glib-2.0.pc

and I got

  /usr/lib/i386-linux-gnu/pkgconfig/glib-2.0.pc
  /usr/lib/i386-linux-gnu/pkgconfig/spice-client-glib-2.0.pc
  /usr/local/lib/pkgconfig/glib-2.0.pc

I also run

  pkg-config --debug --modversion glib-2.0

to find which directories were searched for

I looked in the glib-2.0.pc files and checked out the version numbers.

I located the correct glib-2.0.pc file

then I run

  export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig/

after then ./autogen.sh and make

went smoothly

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .