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

qtdeclarative does not build with sysroots already having a system Qt in usr/lib

    XMLWordPrintable

Details

    Description

      qmltestrunner itself does not list 'quick' in QT. However, libQt5QuickTest does rely on Quick, while listing it only in QT_PRIVATE. The result is that -lQt5Quick is not explicitly specified. However, it apparently still tries to pull in libQt5Quick from the system Qt (likely since Qt5QuickTest needs this as it uses QQuickView etc.):

      agocs@alop9010:~/Data/tx1/qtdeclarative/tools/qmltestrunner$ make
      /tx1/gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-g++ -Wl,-rpath-link,/tx1/Linux_for_Tegra/rootfs/usr/lib -Wl,-rpath-link,/tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu -Wl,-rpath-link,/tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/tegra -Wl,-rpath-link,/tx1/Linux_for_Tegra/rootfs/lib/aarch64-linux-gnu --sysroot=/tx1/Linux_for_Tegra/rootfs -Wl,--gc-sections -Wl,--enable-new-dtags -Wl,-z,origin -Wl,-rpath,\$ORIGIN/../lib -Wl,-rpath-link,/tx1/qtdeclarative/lib -Wl,-rpath-link,/tx1/qt5/lib -o ../../bin/qmltestrunner .obj/main.o   -L/tx1/Linux_for_Tegra/rootfs/usr/lib -L/tx1/Linux_for_Tegra/rootfs/lib/aarch64-linux-gnu -L/tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu -L/tx1/qtdeclarative/lib -lQt5Qml -L/tx1/qt5/lib -lQt5QuickTest -lQt5Widgets -lQt5Gui -lQt5Network -lQt5Test -lQt5Core -lGLESv2 -lpthread 
      
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QV4::Object::advanceIterator(QV4::Managed*, QV4::ObjectIterator*, QV4::Heap::String**, unsigned int*, QV4::Property*, QV4::PropertyAttributes*)'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QQmlBinding::QQmlBinding(QQmlScriptString const&, QObject*, QQmlContext*)'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QQmlProfilerService::dataReady(QQmlAbstractProfilerAdapter*)'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QQmlEngineDebugService::instance()'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QQmlMemoryScope::QQmlMemoryScope(char const*)'
      /tx1/qtdeclarative/lib/libQt5QuickTest.so: undefined reference to `QQuickItem::y() const@Qt_5'
      /tx1/qtdeclarative/lib/libQt5QuickTest.so: undefined reference to `QQuickView::errors() const@Qt_5'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QQmlBinding::property() const'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QQmlBinding::Invalid'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QQmlBinding::QQmlBinding(QV4::Value const&, QObject*, QQmlContextData*)'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QQmlAbstractBinding::vTables'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QV4::Object::call(QV4::Managed*, QV4::CallData*)'
      /tx1/qtdeclarative/lib/libQt5QuickTest.so: undefined reference to `QQuickItem::height() const@Qt_5'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QOpenGLFunctions_3_2_Core::versionProfile()'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QV4::MemoryManager::engine() const'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QQmlProfilerService::addGlobalProfiler(QQmlAbstractProfilerAdapter*)'
      /tx1/qtdeclarative/lib/libQt5QuickTest.so: undefined reference to `QQuickView::QQuickView(QWindow*)@Qt_5'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QV4::QmlBindingWrapper::createQmlCallableForFunction(QQmlContextData*, QObject*, QV4::Function*, QList<QByteArray> const&, QString*)'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QQmlComponentPrivate::initializeObjectWithInitialProperties(QV4::Value const&, QV4::Value const&, QObject*)'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QQmlBinding::QQmlBinding(QString const&, QObject*, QQmlContext*)'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QShortcutMap::tryShortcutEvent(QObject*, QKeyEvent*)'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QQmlProfilerService::instance()'
      /tx1/qtdeclarative/lib/libQt5QuickTest.so: undefined reference to `QQuickView::engine() const@Qt_5'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QV4::Object::getLookup(QV4::Managed*, QV4::Lookup*)'
      /tx1/qtdeclarative/lib/libQt5QuickTest.so: undefined reference to `QQuickView::setSource(QUrl const&)@Qt_5'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QQmlInspectorService::addView(QObject*)'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QQmlBinding::QQmlBinding(QString const&, QObject*, QQmlContextData*, QString const&, unsigned short, unsigned short)'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QQmlPropertyPrivate::setBinding(QQmlProperty const&, QQmlAbstractBinding*, QFlags<QQmlPropertyPrivate::WriteFlag>)'
      /tx1/qtdeclarative/lib/libQt5QuickTest.so: undefined reference to `QQuickItem::staticMetaObject@Qt_5'
      /tx1/qtdeclarative/lib/libQt5QuickTest.so: undefined reference to `QQuickItem::x() const@Qt_5'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QQmlDebugStream::QQmlDebugStream(QByteArray*, QFlags<QIODevice::OpenModeFlag>)'
      /tx1/qtdeclarative/lib/libQt5QuickTest.so: undefined reference to `QQuickItem::window() const@Qt_5'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QQmlAccessorProperties::registerProperties(QMetaObject const*, int, QQmlAccessorProperties::Property*)'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QQmlMemoryScope::QQmlMemoryScope(QUrl const&)'
      /tx1/qtdeclarative/lib/libQt5QuickTest.so: undefined reference to `QQuickItem::mapToScene(QPointF const&) const@Qt_5'
      /tx1/qtdeclarative/lib/libQt5QuickTest.so: undefined reference to `QQuickView::rootContext() const@Qt_5'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QV4::Object::getIndexed(QV4::Managed*, unsigned int, bool*)'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QQmlDebugService::isDebuggingEnabled()'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QV4::Object::get(QV4::Managed*, QV4::String*, bool*)'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QQmlPropertyPrivate::write(QQmlProperty const&, QVariant const&, QFlags<QQmlPropertyPrivate::WriteFlag>)'
      /tx1/qtdeclarative/lib/libQt5QuickTest.so: undefined reference to `QQuickWindow::grabWindow()@Qt_5'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QQmlMemoryScope::~QQmlMemoryScope()'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QQmlAbstractBinding::weakPointer()'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QQmlEngineDebugService::setStatesDelegate(QQmlDebugStatesDelegate*)'
      /tx1/qtdeclarative/lib/libQt5QuickTest.so: undefined reference to `QQuickView::status() const@Qt_5'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QV4::Object::construct(QV4::Managed*, QV4::CallData*)'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QQmlInspectorService::instance()'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QOpenGLFunctions_1_0::versionProfile()'
      /tx1/qtdeclarative/lib/libQt5QuickTest.so: undefined reference to `QQuickItem::width() const@Qt_5'
      /tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libQt5Quick.so.5: undefined reference to `QQmlInspectorService::removeView(QObject*)'
      collect2: error: ld returned 1 exit status
      Makefile:103: recipe for target '../../bin/qmltestrunner' failed
      make: *** [../../bin/qmltestrunner] Error 1
      

      Moving 'quick' from QT_PRIVATE to QT in qmltest.pro and rebuilding both that and then qmltestrunner leads to the expected correct behavior:

      /tx1/gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-g++ -Wl,-rpath-link,/tx1/Linux_for_Tegra/rootfs/usr/lib -Wl,-rpath-link,/tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu -Wl,-rpath-link,/tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/tegra -Wl,-rpath-link,/tx1/Linux_for_Tegra/rootfs/lib/aarch64-linux-gnu --sysroot=/tx1/Linux_for_Tegra/rootfs -Wl,--gc-sections -Wl,--enable-new-dtags -Wl,-z,origin -Wl,-rpath,\$ORIGIN/../lib -Wl,-rpath-link,/tx1/qtdeclarative/lib -Wl,-rpath-link,/tx1/qt5/lib -o ../../bin/qmltestrunner .obj/main.o   -L/tx1/Linux_for_Tegra/rootfs/usr/lib -L/tx1/Linux_for_Tegra/rootfs/lib/aarch64-linux-gnu -L/tx1/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu -L/tx1/qtdeclarative/lib -lQt5QuickTest -L/tx1/qt5/lib -lQt5Quick -lQt5Qml -lQt5Widgets -lQt5Gui -lQt5Network -lQt5Test -lQt5Core -lGLESv2 -lpthread 
      

      Fix suggestion:

      diff --git a/src/qmltest/qmltest.pro b/src/qmltest/qmltest.pro
      index 9852861..2d7cccf 100644
      --- a/src/qmltest/qmltest.pro
      +++ b/src/qmltest/qmltest.pro
      @@ -1,8 +1,8 @@
       TARGET     = QtQuickTest
       
       DEFINES += QT_NO_URL_CAST_FROM_STRING QT_NO_FOREACH
      -QT = core testlib-private
      -QT_PRIVATE = quick qml-private  gui core-private
      +QT = core testlib-private quick
      +QT_PRIVATE = qml-private gui core-private
       
       # Testlib is only a private dependency, which results in our users not
       # inheriting testlibs's MODULE_CONFIG transitively. Make it explicit.
      

      Attachments

        Issue Links

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

          Activity

            People

              buddenha Oswald Buddenhagen
              lagocs Laszlo Agocs
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes