Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.