dependencies in different locations

Dan Nicholson dbn.lists at gmail.com
Mon Mar 23 11:06:00 PDT 2009


On Sun, Mar 22, 2009 at 10:17 AM, Adrian Bono <yanyan_1337 at yahoo.com> wrote:
>
> Hello,
>
> How can i make pkg-config look for a package's dependencies in /usr/lib/pkgconfig if they can't be found in /usr/local/lib/pkgconfig? And vice versa?
>
> Example:
>
> I have the following:
>
> /usr/lib/pkgconfig/fontconfig.pc
> /usr/local/lib/pkgconfig/cairo.pc
>
> Cairo requires fontconfig and i get an error saying that fontconfig can't be found. If i make a symlink to /usr/lib/pkgconfig/fontconfig.pc from /usr/local/lib/pkgconfig/, configure can continue.
>
> The reverse case is where a dependency is found in /usr/local/lib/pkgconfig and i have to make a symlink from /usr/lib/pkgconfig to allow configure to finish.
>
> PKG_CONFIG_PATH is /usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/opt/kde/lib/pkgconfig
>
> Is it really pkg-config's behavior to only look for a package's dependencies in the same directory and fail if it isn't there?

No, PKG_CONFIG_PATH should definitely be respected and look in all
those directories in order. Is it exported to the environment? Try
doing something like:

PKG_CONFIG_DEBUG_SPEW=1 pkg-config --modversion cairo

That should give you a pretty good trace of what pkg-config is doing.

--
Dan


More information about the pkg-config mailing list