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

Avery Pennarun apenwarr at gmail.com
Fri Jan 18 00:40:56 EST 2008


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 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.

Have fun,

Avery



More information about the Mono-devel-list mailing list