Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Oct 2008 19:13:35 +0100
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        "Daniel O'Connor" <doconnor@gsoft.com.au>
Cc:        pisymbol@gmail.com, olli@lurza.secnetix.de, freebsd-hackers@freebsd.org, wojtek@wojtek.tensor.gdynia.pl, freebsd-questions@freebsd.org, "M. Warner Losh" <imp@bsdimp.com>
Subject:   RTLD changes for non-native system (was:  Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit ?binaries?)
Message-ID:  <20081028191335.26152gicr4ni54ys@webmail.leidinger.net>
In-Reply-To: <200810281018.18786.doconnor@gsoft.com.au>
References:  <freebsd-hackers.79409.1224892331.200810250958.15130.doconnor@gsoft.com.au> <200810271411.m9REB6te015188@lurza.secnetix.de> <20081027.090116.-1827344390.imp@bsdimp.com> <200810281018.18786.doconnor@gsoft.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Daniel O'Connor <doconnor@gsoft.com.au> (from Tue, 28 Oct 2008 =20
10:18:10 +1030):

> On Tuesday 28 October 2008 01:31:16 M. Warner Losh wrote:
>> In message: <200810271411.m9REB6te015188@lurza.secnetix.de>
>>
>>             Oliver Fromme <olli@lurza.secnetix.de> writes:
>> : Daniel O'Connor wrote:
>> :  > On Friday 24 October 2008 23:20:59 Peter Jeremy wrote:
>> :  > > > this will make system trying to bind 32-bit libs to 64-bit
>> :  > > > program. it can't work
>> :  > >
>> :  > > rtld shouldn't attempt to bind 32-bit libs to 64-bit programs.
>> :  >
>> :  > The same problem happens with the Linux run time linker - it merrily
>> :  > tries to link FreeBSD libraries to Linux binaries with predictable
>> :  > results..
>> :
>> : You *can* link Linux libraries with FreeBSD binaries (and
>> : vice versa), if the library does not perform any syscalls,
>> : e.g. it is a pure computation library or similar.
>> :
>> :  > That said it would be really nice if it ignored incompatible librari=
es
>> :  > :)
>> :
>> : No.  Please don't put such pseudo-cleverness into rtld.
>> : It wouldn't be an improvement, in fact it might break some
>> : working configurations.
>>
>> Yes.  I have a bunch of printer drivers that I've used that link in
>> linux shared libraries...  They are in ports...
>
> Good point..
> The problem is really the Linux linker - it will find a FreeBSD library an=
d
> try and use it ahead of a Linux one later in the search path - this preven=
ts
> stuff working :)
>
> I have this exact problem with libfontconfig and Xilinx ISE.
>
> Perhaps instead of ignore, use last.. But then it doesn't really matter fo=
r
> the FreeBSD linker - I imagine I would have to convince Linux folks it's a
> good idea.

Please ignore for a moment that we are not talking about changing the =20
FreeBSD RTLD anymore:
Would it make sense (for us and/or for GNU) to first search for libs =20
for the current system and if none are found to try the others?

Bye,
Alexander.

--=20
There is hardly a thing in the world that some man can
not make a little worse and sell a little cheaper.

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID =3D B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID =3D 72077137



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081028191335.26152gicr4ni54ys>