Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-50921

independent handling of LIBS and LIBS_PRIVATE blows up



    • 5b3dfa470ed7ea40103daa785286ab71fb7aa230 (qt/qtbase/5.12)


      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.


        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.



              jbornema Joerg Bornemann
              sobukus sobukus
              3 Vote for this issue
              7 Start watching this issue



                Gerrit Reviews

                  There are no open Gerrit changes