Re: -rpath not used under Linux

2004-01-27 Thread Martin MOKREJ
On Sat, 24 Jan 2004, David Dawes wrote: Hi, I see the patch already comitted to xc tree so wanted to compile xfree86 with -rpath ... On Sat, Jan 24, 2004 at 06:09:46PM +0100, Matthieu Herrb wrote: David Dawes wrote (in a message from Saturday 24) If there is no general consensus, I will

Re: -rpath not used under Linux

2004-01-27 Thread David Dawes
On Tue, Jan 27, 2004 at 03:22:35PM +0100, Martin MOKREJS wrote: On Sat, 24 Jan 2004, David Dawes wrote: I will stick to -rpath on Linux, so what should I do to compile X with it on Linux and where is it documented, Dave?;) Add the following line to your host.def file: #define UseRpath YES The

Re: -rpath not used under Linux

2004-01-27 Thread Martin MOKREJ
On Tue, 27 Jan 2004, David Dawes wrote: On Tue, Jan 27, 2004 at 03:22:35PM +0100, Martin MOKREJS wrote: On Sat, 24 Jan 2004, David Dawes wrote: I will stick to -rpath on Linux, so what should I do to compile X with it on Linux and where is it documented, Dave?;) Add the following line to

Re: -rpath not used under Linux

2004-01-27 Thread David Dawes
On Tue, Jan 27, 2004 at 05:44:57PM +0100, Martin MOKREJS wrote: On Tue, 27 Jan 2004, David Dawes wrote: On Tue, Jan 27, 2004 at 03:22:35PM +0100, Martin MOKREJS wrote: On Sat, 24 Jan 2004, David Dawes wrote: I will stick to -rpath on Linux, so what should I do to compile X with it on Linux

Re: -rpath not used under Linux

2004-01-27 Thread Mario Klebsch
Hi! Am 27.01.2004 um 18:13 schrieb David Dawes: No, LD_LIBRARY_PATH always overrides except SUID case. That's not what I've found (or what Jakub Jelinek reported for Linux or what the rtld codes shows for FreeBSD). I've done some simple tests on FreeBSD, Linux, and Solaris, and the

Re: -rpath not used under Linux

2004-01-27 Thread David Dawes
On Tue, Jan 27, 2004 at 08:13:51PM +0100, Mario Klebsch wrote: Hi! Am 27.01.2004 um 18:13 schrieb David Dawes: No, LD_LIBRARY_PATH always overrides except SUID case. That's not what I've found (or what Jakub Jelinek reported for Linux or what the rtld codes shows for FreeBSD). I've done some

Re: -rpath not used under Linux

2004-01-24 Thread Sven Luther
On Fri, Jan 23, 2004 at 05:43:02PM -0500, David Dawes wrote: On Wed, Jan 21, 2004 at 12:34:17PM +0100, Gian Filippo Pinzari wrote: David Dawes wrote: I don't have any objections to doing this on Linux. As I said, we already do it on a range of other platforms and I'm not sure why Linux is

Re: -rpath not used under Linux

2004-01-24 Thread David Dawes
On Sat, Jan 24, 2004 at 07:08:00AM +0100, Bernd Ernesti wrote: On Fri, Jan 23, 2004 at 08:23:38PM -0500, David Dawes wrote: [glibc search order] That possibly means that we should be removing -rpath from other platforms rather than adding it on Linux. No, please don't do that. On NetBSD you

Re: -rpath not used under Linux

2004-01-24 Thread Sven Luther
On Sat, Jan 24, 2004 at 10:31:21AM -0500, David Dawes wrote: So long as ld.so.conf overrides the rpath (does it?) then this won't matter. LD_LIBRARY_PATH and LD_PRELOAD won't work for setuid apps. I'd be happy to make the change for 4.4 if there is some concensus that it isn't a bad

Re: -rpath not used under Linux

2004-01-24 Thread Matthieu Herrb
David Dawes wrote (in a message from Saturday 24) Does NetBSD have an ld.so cache/hints mechanism like Linux and FreeBSD? NetBSD has /etc/ld.so.conf. But it's default setup doesn't include /usr/X11R6/lib. Or is the search order different on NetBSD? What about OpenBSD? OpenBSD adds

Re: -rpath not used under Linux

2004-01-24 Thread David Dawes
On Sat, Jan 24, 2004 at 06:09:46PM +0100, Matthieu Herrb wrote: David Dawes wrote (in a message from Saturday 24) If there is no general consensus, I will at least add a build option to make it easy to turn -rpath on or off for a host.def setting, and leave the defaults as they are now.

Re: -rpath not used under Linux

2004-01-23 Thread David Dawes
On Wed, Jan 21, 2004 at 12:34:17PM +0100, Gian Filippo Pinzari wrote: David Dawes wrote: I don't have any objections to doing this on Linux. As I said, we already do it on a range of other platforms and I'm not sure why Linux is something of an exception in this regard. Does anyone have a

Re: -rpath not used under Linux

2004-01-23 Thread Jakub Jelinek
On Fri, Jan 23, 2004 at 05:43:02PM -0500, David Dawes wrote: So long as ld.so.conf overrides the rpath (does it?) then this won't matter. LD_LIBRARY_PATH and LD_PRELOAD won't work for setuid apps. It doesn't. Searching for libraries is done in glibc the following order: DT_RPATH directories

Re: -rpath not used under Linux

2004-01-23 Thread David Dawes
On Fri, Jan 23, 2004 at 10:16:08PM +0100, Jakub Jelinek wrote: On Fri, Jan 23, 2004 at 05:43:02PM -0500, David Dawes wrote: So long as ld.so.conf overrides the rpath (does it?) then this won't matter. LD_LIBRARY_PATH and LD_PRELOAD won't work for setuid apps. It doesn't. Searching for

Re: -rpath not used under Linux

2004-01-23 Thread Bernd Ernesti
On Fri, Jan 23, 2004 at 08:23:38PM -0500, David Dawes wrote: [glibc search order] That possibly means that we should be removing -rpath from other platforms rather than adding it on Linux. No, please don't do that. On NetBSD you can't use LD_LIBRARY_PATH for setuid or setgid programs and

Re: -rpath not used under Linux

2004-01-21 Thread Gian Filippo Pinzari
David Dawes wrote: I don't have any objections to doing this on Linux. As I said, we already do it on a range of other platforms and I'm not sure why Linux is something of an exception in this regard. Does anyone have a good reason to not do this? In NX we use alternate versions of libX11,

Re: -rpath not used under Linux

2004-01-21 Thread Craig Groeschel
Does anyone have a good reason to not do this? I seem to remember an rpath considered harmful message from around the time the libraries changed from R5 to R6. The author said to use rpath-link instead of rpath. I don't know if that would do what you want (sorry, it's been so long I don't even

Re: -rpath not used under Linux

2004-01-20 Thread Martin MOKREJ
On Thu, 8 Jan 2004, David Dawes wrote: Hi, so I downloaded latest cvs version of xc and compiled with defaults on Linux. Running ldd ./programs/xdm/xdm show xlibs are resolved from /usr/X11R6/lib. OK, I edited /etc/ld.so.conf and commented out line /usr/X11R6/lib and rerun ldconfig. Ran ldd

Re: -rpath not used under Linux

2004-01-20 Thread David Dawes
On Tue, Jan 20, 2004 at 10:54:05PM +0100, Martin MOKREJS wrote: On Thu, 8 Jan 2004, David Dawes wrote: Hi, so I downloaded latest cvs version of xc and compiled with defaults on Linux. Running ldd ./programs/xdm/xdm show xlibs are resolved from /usr/X11R6/lib. OK, I edited /etc/ld.so.conf and

-rpath not used under Linux

2004-01-07 Thread Martin MOKREJ
Hi, I've reported the following bug: http://bugs.xfree86.org/show_bug.cgi?id=1062 I believe -Wl,-rpath,$(SHLIBDIRPATH) should be used on Linux and possibly all Unix platforms. Running ldconfig did not help on my system but LD_LIBRARY_PATH did. But, that's not a solution, because

Re: -rpath not used under Linux

2004-01-07 Thread Mario Klebsch
Hi! Am Mittwoch, 07.01.04 um 14:00 Uhr schrieb Martin MOKREJ: I believe -Wl,-rpath,$(SHLIBDIRPATH) should be used on Linux and possibly all Unix platforms. Me too, in fact, I am convinced, this should be done. But this probably is a religious issue. Running ldconfig did not help on my

Re: -rpath not used under Linux

2004-01-07 Thread David Dawes
On Wed, Jan 07, 2004 at 08:00:27PM +0100, Mario Klebsch wrote: Hi! Am Mittwoch, 07.01.04 um 14:00 Uhr schrieb Martin MOKREJĀŠ: I believe -Wl,-rpath,$(SHLIBDIRPATH) should be used on Linux and possibly all Unix platforms. Me too, in fact, I am convinced, this should be done. But this

Re: -rpath not used under Linux

2004-01-07 Thread Alan Coopersmith
Martin MOKREJ wrote: I believe -Wl,-rpath,$(SHLIBDIRPATH) should be used on Linux and possibly all Unix platforms. It should be restricted to just those platforms using the GNU ld or similar flags. For Solaris, for instance, it should be -R $(SHLIBDIRPATH) instead. -- -Alan Coopersmith-