Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.5.1, 5.12.2
-
GNU/Linux x86-64, gcc-4.9.3, glibc-2.22
-
5b3dfa470ed7ea40103daa785286ab71fb7aa230 (qt/qtbase/5.12)
Description
Trying to build qtdeclarative-5.5.1 with 5.4.1 installed in /opt/qt5 fails because it finds libQt5Quick from /opt/qt5/lib, not the freshly built one.
g++ -Wl,--no-undefined -Wl,-O1 -Wl,--enable-new-dtags -shared -Wl,-Bsymbolic-functions -Wl,-soname,libQt5QuickTest.so.5 -o libQt5QuickTest.so.5.5.1 .obj/quicktest.o .obj/quicktestevent.o .obj/quicktestresult.o .obj/moc_quicktestevent_p.o .obj/moc_quicktestresult_p.o -L/opt/qt5/lib -lQt5Widgets -lQt5Gui -lQt5Core -lpthread -L/usr/src/qtdeclarative-opensource-src-5.5.1/lib -lQt5Quick -L/opt/qt5/lib -lQt5Qml -lQt5Test -lQt5Gui -lQt5Network -lQt5Core -lpthread -lGL .obj/quicktestresult.o: In function `QuickTestResult::stringify(QQmlV4Function*)': quicktestresult.cpp:(.text+0x14da): undefined reference to `QV4::ExecutionEngine::toVariant(QV4::Value const&, int, bool)'
This affected some sub-components/modules of qtdeclarative and not others. The point is that -L/opt/t5/lib is placed in LIBS for some libs from qtbase before -lQt5Quick is invoked, with the correct -L$SOURCE_DIRECTORY/lib to get the new one. The first -L rules and hence the old lib is picked. FAIL.
I was told on IRC #qt-labs that the build system indeed is supposed to ensure that the fresh libs are found first. There seems to be a gap in that feature for qtdeclarative components.
My solution is this hack now for qt5 builds:
sed -i "1s:^:LIBS+= -L$SOURCE_DIRECTORY/lib\n:" \ $(find . -name '*.pro') &&
This seems to work so far and settles the issue for me. Please be aware of me not having a larger interest in Qt than to get software depending on it installed, nor knowledge of how Qt/qmake builds are supposed to work in any detail.
I hope the issue is reasonably obvious for the initiated and I can remove my hack for a future release. I am not sure if other packages are also still affected, as I am building things now with the above hack.
PS: I chose "5.5.1" as affected version and Jira tells me that doesn't exist. Should I choose 5.5.0? I am talking about qtdeclarative-opensource-src-5.5.1.tar.xz with the sha512 sum e8c25eeaca66cfb8b8bd014487ad81b8b9780e2f3e898b967d0923dbb40b54cd32c35859b7419e964319401995c27a229ed0ec9d1ec6d2aba84002b59abefddf, if there's any doubt.
Attachments
Issue Links
- is duplicated by
-
QTBUG-57652 qtdeclarative does not build with sysroots already having a system Qt in usr/lib
- Closed
-
QTBUG-72373 Linker error in Angle, libEGL.dll
- Closed
-
QTBUG-73299 qtquickcontrols2 fails to build for nonnative arch if system has older version of library
- Closed
-
QTBUG-54587 incorrect library linked in Incremental prefix build of qqc2
- Closed
-
QTBUG-58547 QtWebengine fails to build when a previous version is already installed
- Closed
- is required for
-
QTBUG-72601 qtwebengine-5.12.0 does not build except as part of full qt
- Closed
- relates to
-
QTBUG-40825 QT_LIBDIR gets added before MODULE_LIBS
- Closed