[Kde-bindings] Can't build qtruby4 passing the -DBUILD_smoke=OFF option to cmake

Arno Rehn arno at arnorehn.de
Sun Apr 19 16:59:08 UTC 2009



On Sunday 19 April 2009 18:40:52 Stefano Crocco wrote:
> I'm still attempting to create a package for kdebindings for Gentoo, and
> I'm facing a new problem. My objective is to be able to build qtruby4 and
> smoke separately. I have been able to build smoke by itself (that was the
> easy part, of course) and to modify the main CMakeList.txt so that the
> directory were smoke is installed is used by the linker (this is using the
> latest svn revision).
>
> The next step was to have the Gentoo to build qtruby after having installed
> smoke. I was confident it would have been easy, since I had already
> successfully done that by hand. However, when I attempted that, I got
> linking errors related to Qt. Here's some of the linker output:
>
> [snip]
>
> To me, this seems to indicate that in the working configuration, the
> libqtruby4shared.so.2.0.0 file will be linked against a number of qt
> libraries, while in the non working version, it will be only linked against
> libQtCore and libQtNetwork. What I can't understand, and which I hope
> someone can explain me, is why this happens. I know little of cmake, but
> I've always thought that passing an option using the -D flag or setting the
> option using ccmake produced the same results. This issue, however, seems
> to mean that it's not so. Am I missing something? If not, is there a way to
> avoid building smoke without having to resort to ccmake which produces a
> valid configuration?
cmake seems to auto-link qtruby4shared against all libraries that smokeqt is 
linked against. The line in CMakeLists.txt only says

target_link_libraries(qtruby4shared ${QT_QTCORE_LIBRARY} ${RUBY_LIBRARY} 
${QT_QTNETWORK_LIBRARY} smokeqt)

There's no mention of QtGui or whatever. So this is actually a bug in our 
build system. Thanks for finding that :)

-- 
Arno Rehn
arno at arnorehn.de



More information about the Kde-bindings mailing list