libntlm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libntlm test case doesn't honor correct library path


From: dam
Subject: Re: libntlm test case doesn't honor correct library path
Date: Thu, 24 Sep 2009 11:23:51 +0200 (CEST)
User-agent: SquirrelMail/1.4.17

Hi Simon,

> address@hidden writes:
>> Sorry I have to reply to myself: The error is different:
>>
>> /bin/bash ./libtool --tag=CC   --mode=link
>> /opt/studio/SOS11/SUNWspro/bin/cc  -xO3 -xarch=v8 -I/opt/csw/include
>> -no-install -xarch=v8 -L/opt/csw/lib -o test_ntlm test_ntlm.o libntlm.la
>> lib/libgnu.la
>> libtool: link: /opt/studio/SOS11/SUNWspro/bin/cc -xO3 -xarch=v8
>> -I/opt/csw/include -xarch=v8 -o test_ntlm test_ntlm.o  -L/opt/csw/lib
>> ./.libs/libntlm.so lib/.libs/libgnu.a
>> -R/home/dam/mgar/pkg/libntlm/trunk/work/build-isa-sparcv8/libntlm-1.2/.libs
>> -R/opt/csw/lib
>
> All above looks fine to me.  The linker should use the library in the
> first -R directory, which should be the newly built version.
>
>> gmake[4]: Leaving directory
>> `/home/dam/mgar/pkg/libntlm/trunk/work/build-isa-sparcv8/libntlm-1.2'
>> gmake  check-TESTS
>> gmake[4]: Entering directory
>> `/home/dam/mgar/pkg/libntlm/trunk/work/build-isa-sparcv8/libntlm-1.2'
>> ntlm.h 1.2 libntlm 1.0
>>
>> It binds erranously to the installed libntlm version instead of the
>> newly
>> build one.
>
> Yes.
>
>> I vaguely recall there is something in libtool which temporarily sets
>> LD_LIBRARY_PATH
>> during execution to avoid this.
>
> No, test_ntlm is a real binary and no script.  However, libtool should
> set the right -R flags during building, so that the binary will use the
> newly built library rather than the system library.  During 'make
> install' the binary is re-linked to use the system library only.

You are right:

build8s% dump -Lv test_ntlm

test_ntlm:

  **** DYNAMIC SECTION INFORMATION ****
.dynamic:
[INDEX] Tag         Value
[1]     NEEDED          libntlm.so.0
[2]     NEEDED          libc.so.1
[3]     INIT            0x12118
[4]     FINI            0x12128
[5]     RUNPATH        
/opt/csw/lib/$ISALIST:/opt/csw/lib:/home/dam/mgar/pkg/libntlm/trunk/work/build-isa-sparcv8/libntlm-1.2/.libs:/opt/csw/lib
[6]     RPATH          
/opt/csw/lib/$ISALIST:/opt/csw/lib:/home/dam/mgar/pkg/libntlm/trunk/work/build-isa-sparcv8/libntlm-1.2/.libs:/opt/csw/lib
...

$ISALIST expands to the list of architectures on Solaris, (in this case
  sparcv9+vis2 sparcv9+vis sparcv9 sparcv8plus+vis2 sparcv8plus+vis
sparcv8plus sparcv8 sparcv8-fsmuld sparcv7 sparc

The /opt/csw/lib in front comes from me setting LD_OPTIONS :-/
Sorry for the noise, I guess I need to adjust the build recipe.


Best regards

  -- Dago




reply via email to

[Prev in Thread] Current Thread [Next in Thread]