Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 ./ 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
up vote 3 down vote accepted

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


it returned empty line

Then I searched for

  locate glib-2.0.pc

and I got


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 ./ and make

went smoothly

share|improve this answer

Your Answer


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.