trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: March 2012

Re: [trinity-devel] tdegraphics build failure 2 : libkscan.so (linker error?)

From: "David C. Rankin" <drankinatty@...>
Date: Wed, 07 Mar 2012 10:55:51 -0600
On 03/07/2012 07:38 AM, David C. Rankin wrote:
> On 03/07/2012 07:30 AM, David C. Rankin wrote:
>> On 03/07/2012 02:06 AM, Serghei Amelian wrote:
>>> On Wednesday 07 March 2012 07:13:39 David C. Rankin wrote:
>>> [...]
>>>
>>>> -Wl,-rpath,/opt/trinity/lib:/opt/tqt3/lib:
>>>> /usr/bin/ld: cannot find
>>>> -lsane-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu-L/usr/lib
>>>
>>> Actually the error is pretty clear. You have no blank betweer "-lsane" 
>>> and "-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu-L/usr/lib"
>>>
>>
>> Where does that come from? Is that somewhere in the Cmake files or is that a
>> problem with 'sane-config'?
>>
> 
> I just checked again and it isn't sane-config:
> 
> sane-config --libs
> -lsane  -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -L/usr/lib
> -lnetsnmp -lcrypto -lm -ldl -lv4l1   -lm -ltiff -ljpeg  -lgphoto2 -lgphoto2_port
> -lm -lexif -lusb     -lavahi-common -lavahi-client    -lusb
> 
> The only other place I can see where the problem could be created is:
> 
> tdegraphics/libkscan/configure.in.in
> 
> LIBSANE_LDFLAGS="`$SANE_CONFIG --ldflags`"
> 
> 
> I'll try patching with:
> 
> LIBSANE_LDFLAGS=" `$SANE_CONFIG --ldflags` "
> 

No Joy,

  Still bombs at:

/usr/bin/ld: cannot find -lsane-Wl,-O1,--sort-common,--as-
                         ^^^^^^^^^^
needed,-z,relro,--hash-style=gnu-L/usr/lib
collect2: ld returned 1 exit status
make[2]: *** [libkscan/libkscan.so.1.0.0] Error 1
make[2]: Leaving directory `/build/src/build'
make[1]: *** [libkscan/CMakeFiles/kscan-shared.dir/all] Error 2
make[1]: Leaving directory `/build/src/build'
make: *** [all] Error 2

  I have tested the way arch is returning the 'sane-config' information from
libkscan/configure.in.in and it all looks good on my end:

Testing libkscan libsane configuration

LIBSANE_LIBS='-lsane
-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -L/usr/lib -lnetsnmp
-lcrypto -lm -ldl -lv4l1   -lm -ltiff -ljpeg  -lgphoto2 -lgphoto2_port -lm
-lexif -lusb     -lavahi-common -lavahi-client    -lusb  '

LIBSANE_LDFLAGS='-L/usr/lib
-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -Wl,-rpath,/usr/lib'

LIBSANE_INCLUDES=''

  I have no idea how '-lsane-Wl' is ending up crammed together. Any thoughts
from the gurus?


-- 
David C. Rankin, J.D.,P.E.