Subject: Re: PKGCONFIG_OVERRIDE only for buildlinking (not for installed *.pc
To: Jeremy C. Reed <reed@reedmedia.net>
From: Todd Vierling <tv@duh.org>
List: tech-pkg
Date: 03/03/2006 10:58:27
On Thu, 2 Mar 2006, Jeremy C. Reed wrote:

> The above fails for me, because the "-Wl,-R/home/reed/pkg/lib" which came
> from the pkg-config --libs xft. This causes the wrong and old libX11 to be
> used (causing an undefined reference).

Unfortunately, there is no such thing as a per-library rpath -- either you
have an rpath, or you don't, and it applies to all libraries directly loaded
by the binary (shlib or application) being built with the -R option.

The rpath, while global in the built binary, *is* ordered, which is why
removing the -R for /home/reed/pkg/lib worked; the ELF runtime linker is now
searching in /home/reed/xorg/lib first, as it's the only one left in the
rpath.  However, that is not an argument in support of removing the -Rs
from pkgsrc's .pc files.

I think what you really want here is the ability to detect "builtin"s in
more than just the default /usr location.  That way you can build xorg
directly, then rebuild pkgsrc packages to use that rather than one in the
pkg tree.

-- 
-- Todd Vierling <tv@duh.org> <tv@pobox.com> <todd@vierling.name>