Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
5.2.0 Beta1
-
None
Description
When I try to build qtdeclarative-5.2.0-beta1 in a temporary location with an older version installed the build fails because of undefined references:
g++ -m64 -Wl,--no-undefined -Wl,-rpath-link,/usr/lib64 -shared -Wl,-Bsymbolic-functions -Wl,-soname,libQt5QuickTest.so.5 -o libQt5QuickTest.so.5.2.0 .obj/release-shared/quicktest.o .obj/release-shared/quicktestevent.o .obj/release-shared/quicktestresult.o .obj/release-shared/moc_quicktestevent_p.o .obj/release-shared/moc_quicktestresult_p.o -L/usr/lib64/mysql/ -lQt5Widgets -L/usr/lib64 -lQt5Gui -lQt5Core -lpthread -L/var/tmp/paludis/build/x11-libs-qtdeclarative-5.2.0-beta1/work/qtdeclarative-opensource-src-5.2.0-beta1/lib -lQt5Quick -L/usr/lib64/mysql/ -L/usr/lib64 -lQt5Qml -ldl -lQt5Network -lQt5Gui -lQt5Test -lQt5Core -lpthread -lGLESv2 make[2]: Leaving directory `/var/tmp/paludis/build/x11-libs-qtdeclarative-5.2.0-beta1/work/qtdeclarative-opensource-src-5.2.0-beta1/src/qmltest' make[1]: Leaving directory `/var/tmp/paludis/build/x11-libs-qtdeclarative-5.2.0-beta1/work/qtdeclarative-opensource-src-5.2.0-beta1/src' .obj/release-shared/quicktestresult.o:quicktestresult.cpp:function QuickTestResult::stringify(QQmlV4Function*): error: undefined reference to 'QV4::Value::toQStringNoThrow() const' .obj/release-shared/quicktestresult.o:quicktestresult.cpp:function QuickTestResult::stringify(QQmlV4Function*): error: undefined reference to 'QV8Engine::toString(QString const&)' .obj/release-shared/quicktestresult.o:quicktestresult.cpp:function QuickTestResult::stringify(QQmlV4Function*): error: undefined reference to 'QV8Engine::toVariant(QV4::ValueRef, int)' collect2: error: ld returned 1 exit status make[2]: *** [../../lib/libQt5QuickTest.so.5.2.0] Error 1 make[1]: *** [sub-qmltest-make_first-ordered] Error 2 make: *** [sub-src-make_first] Error 2
It appears it tries to link to installed libraries rather than the newly built ones because it seems qmake doesn't get the order of linker options right.
Uninstalling the system qt-declarative or manually editing the Makefile like below makes the build succeed. Is there any way to fix this with qmake?
I remember having a similar problem when updation from qtwebkit-5.0.x to 5.1.x
I'm happy to provide any additional information.
--- /var/tmp/paludis/build/x11-libs-qtdeclarative-5.2.0-beta1/work/qtdeclarative-opensource-src-5.2.0-beta1/src/qmltest/Makefile 2013-10-24 10:26:29.164040142 +0200 +++ Makefile 2013-10-23 17:47:07.086254508 +0200 @@ -18,7 +18,7 @@ INCPATH = -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I../../include -I../../include/QtQuickTest -I../../include/QtQuickTest/5.2.0 -I../../include/QtQuickTest/5.2.0/QtQuickTest -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I../../include/QtQuick -I../../include/QtQml -I../../include/QtQml/5.2.0 -I../../include/QtQml/5.2.0/QtQml -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtTest -I/usr/include/qt5/QtTest/5.2.0 -I/usr/include/qt5/QtTest/5.2.0/QtTest -I/usr/include/qt5/QtCore/5.2.0 -I/usr/include/qt5/QtCore/5.2.0/QtCore -I.moc/release-shared LINK = g++ LFLAGS = -m64 -Wl,--no-undefined -Wl,-rpath-link,/usr/lib64 -shared -Wl,-Bsymbolic-functions -Wl,-soname,libQt5QuickTest.so.5 -LIBS = $(SUBLIBS) -L/usr/lib64/mysql/ -lQt5Widgets -L/usr/lib64 -lQt5Gui -lQt5Core -lpthread -L/var/tmp/paludis/build/x11-libs-qtdeclarative-5.2.0-beta1/work/qtdeclarative-opensource-src-5.2.0-beta1/lib -lQt5Quick -L/usr/lib64/mysql/ -L/usr/lib64 -lQt5Qml -ldl -lQt5Network -lQt5Gui -lQt5Test -lQt5Core -lpthread -lGLESv2 +LIBS = $(SUBLIBS) -L/var/tmp/paludis/build/x11-libs-qtdeclarative-5.2.0-beta1/work/qtdeclarative-opensource-src-5.2.0-beta1/lib -lQt5Quick -lQt5Qml -L/usr/lib64/mysql/ -lQt5Widgets -L/usr/lib64 -lQt5Gui -lQt5Core -lpthread -L/usr/lib64/mysql/ -L/usr/lib64 -ldl -lQt5Network -lQt5Gui -lQt5Test -lQt5Core -lpthread -lGLESv2 AR = ar cqs RANLIB = x86_64-pc-linux-gnu-ranlib QMAKE = /usr/lib64/qt5/bin/qmake