Bug #186
QtScript module not linked
0%
Description
When compiling from latest Git (SHA 546e609b7e2fa683e8b7b90d6079dd3a80ed4c6b), I get the following error:
Linking CXX executable quassel
/home/strager/projects/quassel/tmpbuild/src/core/libmod_core.a(coresession.o): In function `CoreSession::scriptRequest(QString)':
coresession.cpp:(.text+0x1135): undefined reference to `QScriptEngine::evaluate(QString const&, QString const&, int)'
coresession.cpp:(.text+0x1142): undefined reference to `QScriptValue::toString() const'
coresession.cpp:(.text+0x117a): undefined reference to `QScriptValue::~QScriptValue()'
coresession.cpp:(.text+0x118d): undefined reference to `QScriptValue::~QScriptValue()'
/home/strager/projects/quassel/tmpbuild/src/core/libmod_core.a(coresession.o): In function `CoreSession::CoreSession(UserId, bool, QObject*)':
coresession.cpp:(.text+0x4119): undefined reference to `QScriptEngine::QScriptEngine(QObject*)'
/home/strager/projects/quassel/tmpbuild/src/core/libmod_core.a(coresession.o): In function `CoreSession::CoreSession(UserId, bool, QObject*)':
coresession.cpp:(.text+0x4c89): undefined reference to `QScriptEngine::QScriptEngine(QObject*)'
collect2: ld returned 1 exit status
make2: * [quassel] Error 1
make1: [CMakeFiles/quassel.dir/all] Error 2
make: ** [all] Error 2
Upon inspection, the QtScript module is not being linked (no -lQtScript): <builddir>/CMakeFiles/quassel.dir/build.make
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --red --bold "Linking CXX executable quassel"
$(CMAKE_COMMAND) -P CMakeFiles/quassel.dir/cmake_clean_target.cmake
/usr/bin/c++ -Wall -Wextra -ansi -fPIC $(quassel_OBJECTS) $(quassel_EXTERNAL_OBJECTS) -o quassel -rdynamic -L/home/strager/projects/quassel/tmpbuild/src/qtui -L/home/strager/projects/quassel/tmpbuild/src/uisupport -L/home/strager/projects/quassel/tmpbuild/src/client -L/home/strager/projects/quassel/tmpbuild/src/core -L/home/strager/projects/quassel/tmpbuild/src/common -L/usr/lib64/qt4 -L/lib64 -Wl,-Bstatic -lmod_qtui -lmod_uisupport -lmod_client -lmod_core -lmod_common -Wl,-Bdynamic -lQtCore -lz -lpthread -ldl -lQtGui -lpng -lSM -lICE -lXrender -lXrandr -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lm -lQtNetwork -lQtSql -lQtCore -lz -lpthread -ldl -lssl -Wl,-rpath,/home/strager/projects/quassel/tmpbuild/src/qtui:/home/strager/projects/quassel/tmpbuild/src/uisupport:/home/strager/projects/quassel/tmpbuild/src/client:/home/strager/projects/quassel/tmpbuild/src/core:/home/strager/projects/quassel/tmpbuild/src/common:/usr/lib64/qt4:/lib64
Adding the -lQtScript manually makes it compilable (but fails on the next link; adding yet again makes that link as well).
Additional information:
Installed Qt version: x11-libs/qt-4.3.3
Installed cmake version: dev-util/cmake-2.4.7-r1
History
#1 Updated by Sputnick over 16 years ago
FindQt4.cmake of cmake-2.4.7 does not know the QtScript module. Fixed by importing and slightly patching KDE's cmake modules.