[Mono-dev] ELF runtime path and P/Invoke

Andreas Färber andreas.faerber at web.de
Fri Jan 18 04:20:57 EST 2008


Hi Avery,

Thanks for your comment.

Am 18.01.2008 um 06:40 schrieb Avery Pennarun:

> On 17/01/2008, Andreas Färber <andreas.faerber at web.de> wrote:
>> Is there a reason not to add $libdir (i.e. $prefix/lib) to the ELF
>> runtime path for Mono?
>>
>> On Solaris the use of their -R option is being favored over the use  
>> of
>> LD_LIBRARY_PATH in several articles. I thus filed this patch:
>> https://bugzilla.novell.com/show_bug.cgi?id=354323
>
> If I remember the ancient Linux lore, -rpath caused horrendous
> problems with things like the libc5 to libc6 transition.  Basically,
> programs that were hardcoded to look in /usr/lib couldn't be easily
> repointed at /usr/i386-libc5/lib, and nobody wanted to have a
> /usr/i386-libc6/lib forever.

I see your point. This probably causes the most trouble when  
installing to a standard location like /usr/local or /usr; I was  
rather assuming custom locations, which do not conflict with system  
libraries.

> I believe the typical clean way to do this sort of thing in Linux is
> to simply list all directories where you find .so files in
> /etc/ld.so.conf.  Then if there's another thing like the libc5->libc6
> transition (probably the next one is a 32-bit to 64-bit transition),
> you can simply have two different ld.so.conf-type files, and each one
> would point at different directories, but the "new best one" would
> take over the clean /usr/lib-style paths.

Solaris doesn't have the same mechanisms, there is no ld.so.conf or  
ldconfig and 64-bit libraries are inside a symlinked subdir 64 (amd64  
or sparc64).
That would narrow the decision down to Solaris-only or not-at-all.

Regards,

Andreas


More information about the Mono-devel-list mailing list