[OpenIndiana-discuss] Setting LD_PRELOAD

McBofh james.c.mcpherson at gmail.com
Sat Nov 6 23:34:58 UTC 2010


On  7/11/10 08:57 AM, Paul Johnston wrote:
> Under my thread about couchdb I was advised to set LD_PRELOAD.
> I thought this had not worked but is seems bigger than that :-)
>
>> Then it appears that the LD_PRELOAD environment setting is not
>> being passed onto the child. You need to try recompiling the
>> executable beam.smp with '-LCrun'.
>>
>> Regards,
>> Moinak.
>
> Err!
> paulj at openindiana:~$ echo $LD_PRELOAD
> /usr/lib/libCrun.so.1
> paulj at openindiana:~$ ps
> ld.so.1: ps: fatal: /usr/lib/libCrun.so.1: wrong ELF class: ELFCLASS32
> Killed
> paulj at openindiana:~$ prstat
> ld.so.1: prstat: fatal: /usr/lib/libCrun.so.1: wrong ELF class: ELFCLASS32
> Killed
>
> Well it sure is doing something if not fixing my couchdb problem :-)


if you tried

LD_PRELOAD=libCrun.so /path/to/utility

then the linker should have found the correct library
for the app that you invoked on the same command line.

By just setting an env var, subsequent program invocations
were forced to use the 32bit version, even if they are
64bit programs.

McB






More information about the OpenIndiana-discuss mailing list