Subject: Re: pkg-config files
To: Matthieu Herrb <matthieu.herrb@laas.fr>
From: Frederick Bruckman <fredb@immanent.net>
List: tech-x11
Date: 10/27/2003 16:55:43
On Mon, 27 Oct 2003, Matthieu Herrb wrote:

>  > Index: Xcursor/xcursor.pc.in
>  > ===================================================================
>  > RCS file: /cvsroot/xsrc/xfree/xc/lib/Xcursor/xcursor.pc.in,v
>  > retrieving revision 1.1.1.1
>  > diff -u -r1.1.1.1 xcursor.pc.in
>  > --- xcursor.pc.in	2003/02/28 13:18:51	1.1.1.1
>  > +++ xcursor.pc.in	2003/10/26 18:48:55
>  > @@ -7,5 +7,5 @@
>  >  Description: X Cursor library
>  >  Version: @PACKAGE_VERSION@
>  >  Requires:
>  > -Libs: -L${libdir} -lXcursor
>  > +Libs: -Wl,-R${libdir} -L${libdir} -lXcursor
>  >  Cflags: -I${includedir}
>
> Hmm after some reflexion (and trying to handle XFree86 Bugzilla #832)
> it seems more or less useless to me.

Thanks for the quick response. :-)

> The current X applications in xsrc/xfree/xc/programs are not linked
> with -R/usr/X11R6/lib, assuming that /usr/X11R6/lib is in the ld.so
> default search path anyways. I don't see why packages should be
> different.

That's news to me:

  # objdump -p /usr/X11R6/bin/xdm | grep RPATH
  RPATH       /usr/X11R6/lib

"/usr/X11R6/lib" is absolutely not in the built-in default run-path
for the linker, nor is it in the shipped "/etc/ld.so.conf", either.

> If X apps should not assume that, then NetBSD.cf should define
> ExtraLoadFlags too. (See FreeBSD.cf and sco.cf for the 2 only systems
> already doing that).

Actually, it looks we're getting ExtraLoadFlags from including
"bsdLib.rules", as does OpenBSD, so that's two more.

The NetBSD package system, "pkgsrc", does stuff RPATHS everywhere, but
this patch is for users who are not using "pkgsrc", of course. I just
took a quick look at "pkgsrc/mk/defs.*", and it looks like Darwin does
not do RPATHS, and I seem to recall that it doesn't tolerate them, so
I was indeed mistaken about that being acceptable in general. Sorry.

Frederick