Hi Tim,

On Thu, Aug 23, 2012 at 9:55 PM, Tim Hoke <th...@northpeak.org> wrote:
> Well, I think I've solved it!
>
> Due to compatibility issues with the application I'm writing, it happens to
> be 32-bit.  On FreeBSD, there are TWO forms for setting LD* related ENV
> VARS.  In particular, the one I need is LD_LIBRARY_PATH versus
> LD_32_LIBRARY_PATH!

That's insane.

> It looks to me like adding LD_32_LIBRARY_PATH to the ld_path_keys in
> myldr/mktmpdir.c might just fix this up for me ;-)

Noted.

> Now, in the simplest form, here's what I've discovered and what I'm going to
> explicitly control regarding library search orders:
> 1. ld.so looks for embedded paths in the SO and searches those paths first
> 2. Next, LD_LIBRARY_PATH (or equivalent) is searched
> 3. Finally, default OS Level paths are examined

That may be correct on FreeBSD, but on Linux the order is 2 1 3 -
assuming 1 is done by setting the ELF header RUNPATH.
The older behaviour using RPATH was indeed 1 2 3.

Cheers, Roderich

Reply via email to