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 08-11-2004, 01:09 AM   #1
inescapeableus
Member
 
Registered: Feb 2004
Location: Canada
Distribution: GNU/Linux Debian (Etch)
Posts: 319

Rep: Reputation: 30
Clarify EXPORT PKG-CONFIG


If somebody can please clarify this for me. I have GLIB installed. This has been checked. I want to make my fresh install of xmms see that this was installed. I have been told by a fellow linux used to use the PKG-CONFIG command to export a file that tells XMMS where GLIB is. I still am very confused on this. I have looked at some responses to my question yet nothing has clarified this to me. If you could please enlighten me with your wisdom that would be great. Thanks again. Cheers.
 
Old 08-11-2004, 02:35 AM   #2
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 372Reputation: 372Reputation: 372Reputation: 372
Well, I can clarify what pkg-config does for you, but I'm not quite sure how it would help you with your xmms install.

pkg-config is a nice program that will give you compiler arguments to locate the libraries header files and any special flags the compiler needs to use the code in the libraries. In a nutshell, you use the pkg-config command so you don't have to remember exactly where the library files are installed or (potentially) cryptic compiler arguments.

So, as an example, open up a command-line and type this command:
Code:
pkg-config --cflags --libs glib
You may need to be root to do that. For my system, it spits back this:
Code:
 -I/usr/include/glib-1.2 -I/usr/lib/glib/include   -lglib
If you get a command not found, the pkg-config is not installed.

If you get a "package was not found", then the library you're looking for is either not installed, or not configured to use pkg-config.

So the output I got above is supposed to be fed to the compiler during the "make" portion when compiling a program that uses glib. Since the make command reads directly from a Makefile, there's no way for you to introduce these options to the compiler without manually hacking at the Makefile itself. The configure script should take care of that for you... hacking the Makefile is not typically required.
 
Old 08-11-2004, 02:36 AM   #3
auditek747
Member
 
Registered: Feb 2004
Location: Ohio, USA
Distribution: Arch Linux
Posts: 464

Rep: Reputation: 30
I'm not sure what your asking and I'm no expert but I use
"export PKG_CONFIG_PATH" when compiling.
Sometimes a configure script will not be be able to find a
particular .pc file. I believe these files link libs during a compile.
They are in /usr/lib/pkgconfig/ or /usr/local/lib/pkgconfig/
For example if I was compiling a package and it could not find
"glib.pc", I would do:

export PKG_CONFIG_PATH=/usr/lib/pkgconfig

Then start the compile again.
 
Old 08-12-2004, 12:08 AM   #4
inescapeableus
Member
 
Registered: Feb 2004
Location: Canada
Distribution: GNU/Linux Debian (Etch)
Posts: 319

Original Poster
Rep: Reputation: 30
Well thanks for your help althought I have a few questions to follow up here, concerning Dark_helmuts response I have to tell you when I did

[mike@S01060020ed57a91d mike]$ pkg-config --cflags --libs glib
sh: line 1: glib-config: command not found
sh: line 1: glib-config: command not found
sh: line 1: glib-config: command not found

as you can see it tells me that the glib is not install, to me this is odd because I installed sucessfully. Is there something that I am missing here?

and to reply to the other response from auditek747 I have to ask where would I at the "export PKG-CONFIG" statement. thanks again!
 
Old 08-12-2004, 02:15 AM   #5
auditek747
Member
 
Registered: Feb 2004
Location: Ohio, USA
Distribution: Arch Linux
Posts: 464

Rep: Reputation: 30
I'll repeat that I'm no expert, but I think that output means
that you don't have pkg-config installed.
That seems odd but what do I know
Look in /usr/bin for pkg-config.
If it's not there it should be on your Mandrake cd's.
If for some bizzare reason it is not on your cd's (I'm sure it is)
you can google for rpm's or get the source from freedesktop.org.
 
  


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 brimble2010 SUSE / openSUSE 3 05-19-2008 08:01 AM
pkg-config supersucker Linux - Software 3 09-07-2004 09:45 AM
pkg-config help gexzd Linux - Newbie 14 05-03-2004 10:27 AM
How do i use PKG-Config? A1Ph4 Linux - Software 1 08-08-2003 09:06 PM
pkg-config Keebler Linux - Software 2 04-30-2003 02:10 PM


All times are GMT -5. The time now is 09:02 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