LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-03-2008, 07:13 AM   #1
HarryBoy
Member
 
Registered: Apr 2008
Distribution: MontaVista Linux Version 4.0.1, Professional Edition
Posts: 215

Rep: Reputation: 16
pkg-config-0.22 not being picked up..


I am trying to install glib. I am told:
error: pkg-config too old version 0.16 or better required
so I downloaded pkg-config-0.22 to a directory on my machine (opt folder) and exracted it.

I then installed pkg-config-0.22, and ran make check and all is ok.

Now when I try to install glib again I still get the same message:
error: pkg-config too old version 0.16 or better required

I figure that the new version of pkg-config-0.22 is not getting picked up.
If I do echo $PKG_CONFIG_PATH it gives me:
/usr/lib/pkgconfig is this not the correct path?

Would the newer pkg-config-0.22 files have been installed somewhere else.

How can I fix this problem?

Thanks for your help.
 
Old 06-03-2008, 08:24 AM   #2
lylemwood
Member
 
Registered: Jan 2008
Location: Toronto, Canada
Distribution: Slackware, CentOS
Posts: 47

Rep: Reputation: 18
Welcome to the source-building nightmare that is sometimes our world...

The answer to your question, "/usr/lib/pkgconfig is this not the correct path?" is a very consultantesque maybe (or, even better, "It depends...")...

What were the configure options you used on the package? Did you just do the old ./configure and then make, make install, make check as you indicated above? Or was there more to it than that? Did you specify a --prefix= after the ./configure?

Lyle
 
Old 06-03-2008, 09:05 AM   #3
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,812
Blog Entries: 1

Rep: Reputation: 259Reputation: 259Reputation: 259
The answer to your question is yes it is the correct path. But, you're looking at the wrong env variable.

PKG_CONFIG_PATH is the list of directories containing the metadata (*.pc) files, not the pkg-config binary itself. You installed pkg-config in the /opt or /usr/local hierarchy (can't tell from what you posted) and, I suspect, your old version is installed in the /usr hierarchy. Since it is likely that /usr/bin precedes /usr/local/bin/ or /opt/bin in your PATH variable, the configure script picks up the pkg-config binary in /usr/bin. As this is your old version, configure complains.

There are several options to deal with the problem. First and best, use your distro's package manager to upgrade pkg-config rather than install from source. For that matter use your package manager to install glib. Second, put /usr/local/bin or /opt/bin before /usr/bin in your PATH variable. Third, see if there is an option you can pass to the glib configure script to point to the version of pkg-config you want to use. Fourth, rebuild pkg-config-0.22 and pass --prefix=/usr to the configure script. This will overwrite your 0.16 binary with the 0.22 binary.

BTW, executing make check AFTER you install the package isn't much help. What if the test suite had failed? Now you have a broken package installed on your system. make check should be executed after make and BEFORE make install.
 
Old 06-03-2008, 10:58 AM   #4
HarryBoy
Member
 
Registered: Apr 2008
Distribution: MontaVista Linux Version 4.0.1, Professional Edition
Posts: 215

Original Poster
Rep: Reputation: 16
Thank you guys you have been very helpful indeed.
I used --prefix=/usr like weibulguy suggests and now I have the correct 0.22 binary. Thanks also for the long detailed description of things.

Harry.

 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
pkg-config sinXposed Linux - Software 12 10-30-2008 06:48 AM
pkg-config? vraidroit Linux - Software 1 06-10-2006 11:33 PM
pkg-config supersucker Linux - Software 3 09-07-2004 10:45 AM
pkg-config help gexzd Linux - Newbie 14 05-03-2004 11:27 AM
How do i use PKG-Config? A1Ph4 Linux - Software 1 08-08-2003 10:06 PM


All times are GMT -5. The time now is 01:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration