trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: November 2011

Re: [trinity-devel] [kdebase 3.5.13] hardcoded /usr/lib/libnspr4.so in startkde

From: Calvin Morrison <mutantturkey@...>
Date: Wed, 2 Nov 2011 09:08:38 -0400
On 2 November 2011 05:50, Mario Fetka <mario.fetka@...> wrote:
> Am Dienstag, den 01.11.2011, 22:19 +0100 schrieb François ANDRIOT:
>> Hello,
>> under some circonstances, the startkde script goes through the following
>> code.
>>
>> 417 if [ -n $KGTK_PRELOAD ]; then
>> 418   if [ -e /usr/lib/libnspr4.so ]; then
>> 419     KGTK_NSPR_PRELOAD="/usr/lib/libnspr4.so:"
>> 420   fi
>> 421   export LD_PRELOAD=$KGTK_PRELOAD:$KGTK_NSPR_PRELOAD$LD_PRELOAD
>> 422 fi
>>
>> The problem is that, under RHEL/Fedora, the library
>> "/usr/lib/libnspr4.so" (if present) is compiled for x86, not x86_64.
>> So every command I use in the konsole gives the following warning:
>> ERROR: ld.so: object '/usr/lib/libnspr4.so' from LD_PRELOAD cannot be
>> preloaded: ignored.
>>
>> The correct path for x86_64 should be "/usr/lib64/libnspr4.so".
>>
>> As a quick fix, I suggest the following change:
>>
>> if [ -n $KGTK_PRELOAD ]; then
>>     if [ -e /usr/lib64/libnspr4.so ]; then
>>       KGTK_NSPR_PRELOAD="/usr/lib64/libnspr4.so:"
>>     elif [ -e /usr/lib/libnspr4.so ]; then
>>       KGTK_NSPR_PRELOAD="/usr/lib/libnspr4.so:"
>>     fi
>>     export LD_PRELOAD=$KGTK_PRELOAD:$KGTK_NSPR_PRELOAD$LD_PRELOAD
>> fi
>>
>>
>> Any better solution is welcome :)
>>
>> Thanks
>> Francois Andriot
>
> my suggestion is to use cmake variables and let cmake generate the
> script at buildtime for the system this could also include a chack for
> the lib in cmake config.
>
> thx
> Mario
>
>

Okay,

so basically I am looking at this same problem.

libkgtk2 is also preloaded, which breaks all gtk3 applications. We
need to figure out some better method of loading kgtk libraries so
that the kgtk2 wrapper isn't always loaded.

Calvin Morrison