Subject: Re: RPATH and XFree86-libs package
To: None <tech-pkg@NetBSD.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 06/03/2004 21:28:43
On Thu, 27 May 2004, Hubert Feyrer wrote:
> On Wed, 26 May 2004, Jeremy C. Reed wrote:
> > Does anyone have any comments on the SharedLibraryLoadFlags above?
>
> Not really, but the libs in /usr/lib etc. don't pull in what they need
> either, and last time I asked why that was (quite some time ago) was to
> ensure that the application programmer knows what's going on by forcing
> him to list all the required libs manually.
>
> Maybe that's the same reasoning for XFree...
I think you are probably correct. I looked on a Red Hat 9 install and saw
the same:
$ ldd /mnt/usr/X11R6/lib/libXmu.so
libXt.so.6 => not found
libSM.so.6 => not found
libICE.so.6 => not found
libXext.so.6 => not found
libX11.so.6 => not found
libc.so.6 => /usr/lib/libc.so.6 (0x40020000)
/usr/lib/ld-linux.so.2 => /usr/lib/ld-linux.so.2 (0x80000000)
$ ldd /mnt/usr/X11R6/lib/libXt.so
libX11.so.6 => not found
libSM.so.6 => not found
libICE.so.6 => not found
libc.so.6 => /usr/lib/libc.so.6 (0x4005c000)
/usr/lib/ld-linux.so.2 => /usr/lib/ld-linux.so.2 (0x80000000)
objdump -x shows that no RPATH is defined for above.
But a Debian 3.0 box shows:
reed@sloth:~$ ldd /usr/X11R6/lib/libXmu.so.6
libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x40017000)
libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x40061000)
libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x4006a000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40080000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x4008d000)
libc.so.6 => /lib/libc.so.6 (0x40167000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
reed@sloth:~$ ldd /usr/X11R6/lib/libXt.so.6
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x4004d000)
libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x40127000)
libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x40130000)
libc.so.6 => /lib/libc.so.6 (0x40146000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
But the above Debian libraries do not have any RPATH set as shown by
objdump. Now I see that /etc/ld.so.conf (on that Debian box) has the
single line: "/usr/X11R6/lib".
I guess it is correct for Linux to not include a RPATH with the X libs.
For NetBSD (1.6.2_STABLE), it does have some rpath set though:
rainier:~$ ldd /usr/X11R6/lib/libXt.so
/usr/X11R6/lib/libXt.so:
-lX11.6 => /usr/X11R6/lib/libX11.so.6
-lICE.6 => /usr/X11R6/lib/libICE.so.6
-lSM.6 => /usr/X11R6/lib/libSM.so.6
rainier:~$ ldd /usr/X11R6/lib/libXmu.so
/usr/X11R6/lib/libXmu.so:
-lX11.6 => /usr/X11R6/lib/libX11.so.6
-lICE.6 => /usr/X11R6/lib/libICE.so.6
-lSM.6 => /usr/X11R6/lib/libSM.so.6
-lXt.6 => /usr/X11R6/lib/libXt.so.6
-lXext.6 => /usr/X11R6/lib/libXext.so.6
objdump -x shows "RPATH /usr/X11R6/lib" for above.
I had noticed this problem when building some qt3-based packages using a
qt3-libs that was using buildlink3. I am now using improved buildlink3'd
qt3-libs from Joachim Kuebart's PR pkg/25753. So I'll pkg_add my old
XFree86-libs back to the way it was.
... And now a day later, qt3-libs, qt3-tools, wip/qhacc, and lyx-qt all
build and appear to work fine using XFree86-libs without RPATH defined
(to /usr/X11R6/lib).
So my orginal patch idea for this can be ignored.
Jeremy C. Reed
BSD News, BSD tutorials, BSD links
http://www.bsdnewsletter.com/