LFS 5.0 - pkgconfig-0.15.0 - PKG_CONFIG_PATH

Dagmar d'Surreal dagmar.wants at nospam.com
Wed Feb 11 15:23:07 PST 2004


On Wed, 2004-02-11 at 14:49, David Jensen wrote:
> Albert wrote:
> 
> >chrooted to $LFS.
> >
> >In the BLFS-5.0 book, after installing pkgconfig-0.15.0 there is a
> >section on configuring:
> >---------------------------------------------------------
> >Configuring pkgconfig
> >Add to your system or personal profile:
> >
> >export PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig
> >
> >The default settings for PKG_CONFIG_PATH are /lib/pkgconfig, /usr/lib
> >pkgconfig and /usr/local/lib/pkgconfig. These settings are hard-coded
> >and do not have to be exported with the additional paths.
> >---------------------------------------------------------
> >I put the export statement in profile, logged out and chrooted again. 
> >Later, after installing glib and while configuring pango I got an error 
> >that indicated that the "hard coded" paths were missing.  I then put
> >*all* the paths in the export, chrooted again, and pango configured
> >without error.
> >
> >So, now I am confused.  Is the statement, "These settings are hard-coded
> >and do not have to be exported with the additional paths." in error? 
> >They never showed up when env was run until I manually added them.
> >
> >  
> >
> I've nagged on this before, at least /usr/local/lib/pkgconfig is
> not hardcoded, or perhaps ignored on installation because
> it was empty. Someone should chase this?

No, because it is not broken.  In the man page, this is all very clearly
explained:

 pkg-config retrieves information about packages from special metadata
 files. These files are named after the package, with the extension .pc.
 By default, pkg-config looks in the directory prefix/lib/pkgconfig  for
 these  files;  it  will  also  look in the colon-separated (on Windows,
 semicolon-separated) list of  directories  specified  by  the  PKG_CON-
 FIG_PATH environment variable.

...and...

 PKG_CONFIG_PATH
        A  colon-separated  (on  Windows,  semicolon-separated)  list of
        directories to search for .pc files.  The default directory will
        always be searched after searching the path; the default is lib-
        dir/pkgconfig where libdir is the libdir  where  pkg-config  was
        installed.

...which means if you built it with --prefix=/usr, it will always look
in /usr/lib/pkgconfig no matter what PKG_CONFIG_PATH is set to.  If you
followed the book's instructions, then pkgconfig was installed in /usr,
and if you want it to search /usr/local/lib/pkgconfig, you *must* add it
to the PKG_CONFIG_PATH variable.  This is not a bug in pkgconfig.

This is also not a bug in the book.  Since no packages in the book is
installed into /usr/local, people who follow the instructions won't have
any problem.  People who deviate from the instructions are expected to
understand the effect their changes will have.
-- 
The email address above is phony because my penis is already large enough, kthx. 
              AIM: evilDagmar  Jabber: evilDagmar at jabber.org




More information about the blfs-support mailing list