broken FindQt4.cmake

Anne-Marie Mahfouf annemarie.mahfouf at free.fr
Wed Dec 2 13:02:33 CET 2009


On Wednesday 02 December 2009 11:59:18 Andreas Pakulat wrote:
> On 02.12.09 11:48:16, Anne-Marie Mahfouf wrote:
> > I still have problems building Rocs (linking) on Linux:
> >
> > ../../lib/liblibrocsui.a(MainWindow.o): In function
> > `MainWindow::executeScript()':
> > /usr/local/trunk-src/kdeedu/rocs/src/Interface/MainWindow.cpp:349:
> > undefined reference to
> > `QScriptEngineDebugger::QScriptEngineDebugger(QObject*)'
> > /usr/local/trunk-src/kdeedu/rocs/src/Interface/MainWindow.cpp:350:
> > undefined reference to `QScriptEngineDebugger::attachTo(QScriptEngine*)'
> > collect2: ld returned 1 exit status
> > make[2]: *** [rocs/src/rocs] Error 1
> 
> Please post the linker line that is above the error when you run make
> VERBOSE=1. Also a message("QtScriptTools: $(QT_QTSCRIPTTOOLS_LIBRARY}")
> would be useful. And your CMakeCache.txt.
> 
> The FindQt4.cmake file doesn't seem to have any error related to that
> variable, i.e. its set there properly. Maybe you need to delete your cache
> file?
> 
> Andreas
> 
I deleted all my build files to rebuild against new kde-qt master yesterday.

make VERBOSE=1    (clean)
--------------------------------------------

Linking CXX executable rocs
cd /home/annma/build/kdeedu/rocs/src && /usr/local/trunk/bin/cmake -EI don't 
know what the situation is for the beta 1 tag though. cmake_link_script 
CMakeFiles/rocs.dir/link.txt --verbose=1
/usr/bin/c++    -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -
Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -
DQT_NO_EXCEPTIONS -fno-check-new -fno-common -Woverloaded-virtual -fno-
threadsafe-statics -fvisibility=hidden -fvisibility-inlines-hidden -g3 -fno-
inline  -fPIC -Wl,--enable-new-dtags  CMakeFiles/rocs.dir/rocs_automoc.o 
CMakeFiles/rocs.dir/Main.o CMakeFiles/rocs.dir/settings.o  -o rocs -rdynamic -
L/home/annma/build/kdeedu/lib -L/usr/local/trunk/lib -L/usr/local/trunk-
src/kde-qt/lib ../../lib/liblibrocsui.a ../../lib/liblibrocsgraphics.a 
../../lib/liblibrocsmodel.a ../../lib/liblibrocsactions.a 
../../lib/liblibrocscore.a /usr/local/trunk/lib/libkdeui.so.5.4.0 
/usr/local/trunk/lib/libkrossui.so.4.4.0 /usr/local/trunk/lib/libkio.so.5.4.0 
/usr/local/trunk/lib/libktexteditor.so.4.4.0 /usr/local/trunk-src/kde-
qt/lib/libQtScript.so /usr/local/trunk-src/kde-qt/lib/libQtXmlPatterns.so 
/usr/local/trunk/lib/libkparts.so.4.4.0 /usr/local/trunk/lib/libkio.so.5.4.0 
/usr/local/trunk/lib/libkdeui.so.5.4.0 /usr/local/trunk-src/kde-
qt/lib/libQtSvg.so /usr/local/trunk-src/kde-qt/lib/libQtNetwork.so 
/usr/local/trunk-src/kde-qt/lib/libQtXml.so 
/usr/local/trunk/lib/libkdecore.so.5.4.0 /usr/local/trunk-src/kde-
qt/lib/libQtDBus.so /usr/local/trunk-src/kde-qt/lib/libQtGui.so 
/usr/local/trunk-src/kde-qt/lib/libQtCore.so -lpthread -Wl,-
rpath,/usr/local/trunk/lib:/usr/local/trunk-src/kde-
qt/lib::::::::::::::::::::: -Wl,-rpath-link,/usr/local/trunk/lib
../../lib/liblibrocsui.a(MainWindow.o): In function 
`MainWindow::executeScript()':
/usr/local/trunk-src/kdeedu/rocs/src/Interface/MainWindow.cpp:349: undefined 
reference to `QScriptEngineDebugger::QScriptEngineDebugger(QObject*)'
/usr/local/trunk-src/kdeedu/rocs/src/Interface/MainWindow.cpp:350: undefined 
reference to `QScriptEngineDebugger::attachTo(QScriptEngine*)'
collect2: ld returned 1 exit status
make[2]: *** [rocs/src/rocs] Error 1
make[2]: Leaving directory `/home/annma/build/kdeedu'
make[1]: *** [rocs/src/CMakeFiles/rocs.dir/all] Error 2
make[1]: Leaving directory `/home/annma/build/kdeedu'
make: *** [all] Error 2

Anne-Marie

PRECISIONS please read

PS: Andreas, I know what I do and if I say there is an error then I built 
clean and you should take my word ( as I am a fellow KDE developer and I take 
my responsabilies and I usually know what I am doing). This goes for Patrick 
as well. I am the kdeedu coordinator and as such I need to ensure it builds on 
all platforms, Linux included and when I say it does not build, then it does 
not for me (I test!), clean (here it does not link properly). It was also 
reported to me by other KDE people, pointing to my responsability of this 
module maintainer. I reversed Patrick's commit in trunk so trunk is OK but I 
don't know about beta 1 tag.

This is when   ${QT_QTSCRIPTTOOLS_LIBRARY} is in the CMakeLists.txt and when I 
build with
QtScriptTools instead 
it's all OK (in trunk) (again, I did not check the beta 1 release tag and I 
just wondered if it was OK or not).

Andreas, have a go with ${QT_QTSCRIPTTOOLS_LIBRARY} and tell me what you get, 
thanks




More information about the Kde-buildsystem mailing list