trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: March 2012

Re: [trinity-devel] libkscan improper concatenation by CMake [was Re: [SOLVED] Re: tdegraphics build failure 2 : libkscan.so (linker error?)]

From: Serghei Amelian <serghei@...>
Date: Wed, 7 Mar 2012 23:55:11 +0200
On Wednesday 07 March 2012 23:51:01 David C. Rankin wrote:
[...]

> Serghei, All,
>
>   Looking at the concatenation, even if net-snmp-config included linker
> flags in the linker --libs string, the build should not have failed.
>
> Linking CXX shared library libkscan.so
> /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
>
>   The error above shows that the link would have succeeded if '-lsane' and
> '-Wl' were not concatenated together. The final part of the error was:
>
> collect2: ld returned 1 exit status
> make[2]: *** [libkscan/libkscan.so.1.0.0] Error 1
> make[1]: *** [libkscan/CMakeFiles/kscan-shared.dir/all] Error 2
> make: *** [all] Error 2
>
>   I don't know where the actual concatenation takes place after the
> CMakeLists.txt is read, but it looks like whatever takes place after:
>
>   LINK kio-shared ${SANE_LIBRARIES}
>
> is where the concatenation problem arises. Where can I look at this logic?

kdegraphics/libkscan/ConfigureChecks.cmake

Check these lines:

string( REGEX REPLACE "(^| )-l" ";" SANE_LIBRARIES "${SANE_LIBRARIES}" )
string( REPLACE " " "" SANE_LIBRARIES "${SANE_LIBRARIES}" )

-- 
Serghei