LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-16-2016, 01:14 PM   #1
firejuggler86
LQ Newbie
 
Registered: Feb 2016
Posts: 8

Rep: Reputation: Disabled
pkg-config issues, modversion reporting is not correct and/or is outdated


Hello,

I was hoping someone who knows more than I regarding the functioning mechanisms of the pkg-config program can help me here.... in question is which version of glib-2.0 is installed-- which I know is version 2.49.2, because I just installed it. However, pkg-config continues to report the older version. to illustrate, I've provided the following two examples from terminal-- first running pkg-config, then ouputting hte countents of glib-2.0.pc:

Quote:
root:~# pkg-config --modversion glib-2.0
2.48.1

root:~# cat /usr/lib/pkgconfig/glib-2.0.pc
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

glib_genmarshal=glib-genmarshal
gobject_query=gobject-query
glib_mkenums=glib-mkenums

Name: GLib
Description: C Utility Library
Version: 2.49.2
Requires.private: libpcre
Libs: -L${libdir} -lglib-2.0
Libs.private: -pthread -lpcre
Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include
So...what am I missing here? Any help or suggestions would be much appreciated!

Thanks
 
Old 07-16-2016, 01:50 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
what is the operating system ?
replacing the OS's glib with a DIFFERENT version can and WILL FUBAR it
 
Old 07-16-2016, 07:00 PM   #3
firejuggler86
LQ Newbie
 
Registered: Feb 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by John VV View Post
what is the operating system ?
replacing the OS's glib with a DIFFERENT version can and WILL FUBAR it
Debian Unstable (booted with sysvinit instead of systemd). I already installed the newer version of glib, as far as I can tell anyway; but pkg-config doesn't think I did. I chose /usr for the prefix. Maybe glib uses a different prefix and that is why nothing has broken?

Last edited by firejuggler86; 07-16-2016 at 07:02 PM.
 
Old 07-16-2016, 07:05 PM   #4
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
If you are using apt to installma new glib the .pc file will not be installed, you need to also install the relevent -dev package aswell
 
Old 07-16-2016, 07:11 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
so you built a different version of glib instead of using the default deb

have fun ( you might want to reinstall the system ,if you are unable to reboot )

every now and then a *.pc file is not built
OR
and this is way more likely
you used the default /usr/local and installed it THERE
so the pc file in the default location did not change
/usr/lib64/pkgconfig/glib.pc

look in
/usr/local/lib64/pkgconfig

also you might want to read the output of
Code:
./configure --help
and software you are building
and then set the install location
like this
Code:
./configure --prefix=/usr

Last edited by John VV; 07-16-2016 at 07:12 PM.
 
Old 07-17-2016, 06:47 PM   #6
firejuggler86
LQ Newbie
 
Registered: Feb 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
so you built a different version of glib instead of using the default deb
Sure did! Building from source is fun-- do it all the time .

I do appreciate the feedback, but if you go back and read the information I provided in the OP, you will see that the issue is neither that a .pc file failed to build, nor that it was installed in /usr/local instead of /usr.

So, I guess the broader question is this: what does pkg-config use for its search PATH? How can I check this? pkg-config is not a user that I can login as and run 'echo $PATH'. How does one go about finding out what a program's PATH is? Because, IF pkg-config displays modversions by finding .pc files, and if I have a .pc file in /usr/lib/pkgconfig that does reflect the newer version I installed, then there clearly must be a .pc file for the older version that comes first in pkg-config's PATH. (it's not in /usr/lib64 either-- which is why I would like to know how to see what PATH it DOES use-- so that I don't have to play guessing games trying to determine in which of the half dozen or more possible directories a file could be in).

Thanks!
 
Old 07-17-2016, 07:13 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
in a /etc/profile.local
use
Code:
PATH=
LD_LIBRARY_PATH=
PKG_CONFIG_PATH= /???/???/???:/???/???/:

export PATH LD_LIBRARY_PATH PKG_CONFIG_PATH
as long as this file is sourced /etc/profile


be aware that 32 bit and 64 bit use different locations
--32 bit
/usr/lib/?

-- 64 bit
/usr/lib64/?

Last edited by John VV; 07-17-2016 at 07:15 PM.
 
Old 07-17-2016, 07:57 PM   #8
seasons
Member
 
Registered: Dec 2014
Distribution: siduction
Posts: 264

Rep: Reputation: 58
Code:
dpkg-query -L libglib2.0-dev | grep glib-2.0.pc
I also use Debian sid and mine's in the expected directory: /usr/lib/x86_64-linux-gnu/pkgconfig/

Quote:
Building from source is fun-- do it all the time
I enjoy a good source build too, but I don't think I'd mess around with something as widely depended upon as libglib.

BTW, I still don't understand how you installed your copy of glib 2.49.2. Did you actually install it to /usr and overwrite the installed 2.48 version (extremely bad) or install it locally in /usr/local, or something else?
IMO, you would have been better off grabbing 2.49.2 from experimental if you really, really needed it.

Quote:
it's not in /usr/lib64
Debian hasn't used this path in about 5 years or so. Sorry, but the fact that you didn't know that doesn't do anything to alleviate concern that you're in over your head here.
 
  


Reply



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
Cent OS GLib 2.12.3 pkg-config --modversion glib-2.0' returned 2.22.2 Styles Linux - Distributions 1 10-09-2009 03:12 AM
'pkg-config --modversion glib-2.0' returned 2.16.3, but GLIB (2.14.6) pgb205 Linux - Software 7 05-17-2008 03:21 PM
Unable to install ethereal, I get the error: 'pkg-config --modversion glib-2.0' retur abefroman Linux - Security 5 07-09-2007 11:09 AM
Compile issues related to GTK, pkg-config Snivek Slackware 7 11-01-2005 10:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:13 AM.

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
Open Source Consulting | Domain Registration