Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1346

Unable to startup QML Quick2 application compiled against static Qt

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: 1.11.0
    • Fix Version/s: 1.13.0
    • Labels:
      None
    • Environment:
      * Qt 5.9.3 static x86_64 (self compiled)
       * Ubuntu 16.10 64 bit

      Description

      If try to compile a QML application with QBS against the static Qt (from QtC Kit), the an application fails on startup with this message:

      This application failed to start because it could not find or load the Qt platform plugin "xcb"
      in "".
      

      But, if to compile same QML application with qmake against same static Qt (from same QtC Kit), then an application starts.

      An application is simple:

      import QtQuick 2.9
      import QtQuick.Window 2.2
      
      Window {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
      }
      

      == qmake project file ==

      QT += quick
      CONFIG += c++11
      TARGET = untitled-qmake
      SOURCES += main.cpp
      RESOURCES += qml.qrc
      

      == qbs project file ==

      import qbs
      
      QtApplication {
          name: "untitled-qbs"
          Depends { name: "Qt.quick" }
          cpp.rpaths: [" "]
          files: ["main.cpp", "qml.qrc"]
      }
      

      I have found that QBS produced less runtime dependencies than the qmake:

      == QBS ldd ==

      builder@builder-vm:~/Documents/build-untitled-x86-qbs-release/qtc_x86_Release/untitled-qbs.af7ebed0$ ldd untitled-qbs
          linux-vdso.so.1 =>  (0x00007ffe343ca000)
          libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7338853000)
          libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f733864f000)
          libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f73382f9000)
          librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f73380f1000)
      

      == qmake ldd ==

      builder@builder-vm:~/Documents/build-untitled-x86-qmake-release$ ldd untitled-qmake
          linux-vdso.so.1 =>  (0x00007ffc4c693000)
          libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007fbabee39000)
          libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007fbabec37000)
          libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fbabe8fe000)
          libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fbabe6d7000)
          libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fbabe4d3000)
          libGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 (0x00007fbabe261000)
          libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fbabe042000)
          libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fbabdcbc000)
          libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fbabd966000)
          libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fbabd74f000)
          libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbabd36f000)
          /lib64/ld-linux-x86-64.so.2 (0x00007fbac0787000)
          libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fbabd16b000)
          libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fbabcf65000)
          libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fbabcd3a000)
          libxcb-dri3.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0 (0x00007fbabcb37000)
          libxcb-present.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-present.so.0 (0x00007fbabc934000)
          libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007fbabc72d000)
          libxshmfence.so.1 => /usr/lib/x86_64-linux-gnu/libxshmfence.so.1 (0x00007fbabc52a000)
          libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007fbabc2fa000)
          libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007fbabc0e8000)
          libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007fbabbee5000)
          libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007fbabbcdf000)
          libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007fbabbada000)
          libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007fbabb8d4000)
          libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007fbabb6c3000)
          libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fbabb4ae000)
          librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fbabb2a6000)
      

      == qbs build log ==

      /opt/qt-static/bin/rcc /home/builder/Documents/untitled/qml.qrc -name qml -o /home/builder/Documents/build-untitled-x86-qbs-release/qtc_x86_Release/untitled-qbs.af7ebed0/qrc_qml.cpp
      /usr/bin/g++ -O2 -Wall -Wextra -m64 -pipe -fexceptions -fvisibility=default -fPIC -DNDEBUG -DQT_CORE_LIB -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_QML_LIB -DQT_NO_QML_DEBUGGER -DQT_QUICK_LIB -DQT_QML_DEBUG -I/opt/qt-static/include -I/opt/qt-static/include/QtCore -I/opt/qt-static/mkspecs/linux-g++ -I/home/builder/Documents/build-untitled-x86-qbs-release/qtc_x86_Release/untitled-qbs.af7ebed0/qt.headers -I/opt/qt-static/include/QtCore/5.9.3 -I/opt/qt-static/include/QtCore/5.9.3/QtCore -I/opt/qt-static/include/QtGui -I/opt/qt-static/include/QtNetwork -I/opt/qt-static/include/QtQml -I/opt/qt-static/include/QtQml/5.9.3 -I/opt/qt-static/include/QtQml/5.9.3/QtQml -I/opt/qt-static/include/QtQuick -std=c++11 -o /home/builder/Documents/build-untitled-x86-qbs-release/qtc_x86_Release/untitled-qbs.af7ebed0/3a52ce780950d4d9/qrc_qml.cpp.o -c /home/builder/Documents/build-untitled-x86-qbs-release/qtc_x86_Release/untitled-qbs.af7ebed0/qrc_qml.cpp
      /usr/bin/g++ -O2 -Wall -Wextra -m64 -pipe -fexceptions -fvisibility=default -fPIC -DNDEBUG -DQT_CORE_LIB -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_QML_LIB -DQT_NO_QML_DEBUGGER -DQT_QUICK_LIB -DQT_QML_DEBUG -I/opt/qt-static/include -I/opt/qt-static/include/QtCore -I/opt/qt-static/mkspecs/linux-g++ -I/home/builder/Documents/build-untitled-x86-qbs-release/qtc_x86_Release/untitled-qbs.af7ebed0/qt.headers -I/opt/qt-static/include/QtCore/5.9.3 -I/opt/qt-static/include/QtCore/5.9.3/QtCore -I/opt/qt-static/include/QtGui -I/opt/qt-static/include/QtNetwork -I/opt/qt-static/include/QtQml -I/opt/qt-static/include/QtQml/5.9.3 -I/opt/qt-static/include/QtQml/5.9.3/QtQml -I/opt/qt-static/include/QtQuick -std=c++11 -o /home/builder/Documents/build-untitled-x86-qbs-release/qtc_x86_Release/untitled-qbs.af7ebed0/3a52ce780950d4d9/main.cpp.o -c /home/builder/Documents/untitled/main.cpp
      /usr/bin/g++ '-Wl,-m,elf_x86_64,-rpath, ,-rpath,/opt/qt-static/lib' -L/opt/qt-static/lib -L/opt/qt-static/plugins/platforms -m64 -o /home/builder/Documents/build-untitled-x86-qbs-release/qtc_x86_Release/untitled-qbs.af7ebed0/untitled-qbs /home/builder/Documents/build-untitled-x86-qbs-release/qtc_x86_Release/untitled-qbs.af7ebed0/3a52ce780950d4d9/main.cpp.o /home/builder/Documents/build-untitled-x86-qbs-release/qtc_x86_Release/untitled-qbs.af7ebed0/3a52ce780950d4d9/qrc_qml.cpp.o /opt/qt-static/lib/libQt5Core.a -lpthread -lm -lqtpcre2 -ldl /opt/qt-static/lib/libQt5Gui.a /opt/qt-static/lib/libQt5Core.a -lm -lqtpcre2 -ldl -lpthread -lGL -lqtlibpng /opt/qt-static/lib/libQt5Core.a -lpthread -lm -lqtpcre2 -ldl /opt/qt-static/lib/libQt5Network.a /opt/qt-static/lib/libQt5Core.a -lm -lqtpcre2 -ldl -lpthread /opt/qt-static/lib/libQt5Core.a -lpthread -lm -lqtpcre2 -ldl /opt/qt-static/lib/libQt5Qml.a @/home/builder/Documents/build-untitled-x86-qbs-release/qtc_x86_Release/untitled-qbs.af7ebed0/plugins.list /opt/qt-static/lib/libQt5Network.a /opt/qt-static/lib/libQt5Core.a -lm -lqtpcre2 -ldl -lpthread -lrt /opt/qt-static/lib/libQt5Quick.a /opt/qt-static/lib/libQt5Gui.a -lGL -lqtlibpng /opt/qt-static/lib/libQt5Qml.a -lrt /opt/qt-static/lib/libQt5Network.a /opt/qt-static/lib/libQt5Core.a -lm -lqtpcre2 -ldl -lpthread /opt/qt-static/lib/libQt5Network.a /opt/qt-static/lib/libQt5Core.a -lpthread -lm -lqtpcre2 -ldl -lGL
      

      == qmake build log ==

      18:56:28: Starting: "/usr/bin/make"
      g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NO_QML_DEBUGGER -DQT_NETWORK_LIB -DQT_CORE_LIB -I../untitled -I. -I/opt/qt-static/include -I/opt/qt-static/include/QtQuick -I/opt/qt-static/include/QtGui -I/opt/qt-static/include/QtQml -I/opt/qt-static/include/QtNetwork -I/opt/qt-static/include/QtCore -I. -isystem /usr/include/libdrm -I/opt/qt-static/mkspecs/linux-g++ -o main.o ../untitled/main.cpp
      g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NO_QML_DEBUGGER -DQT_NETWORK_LIB -DQT_CORE_LIB -I../untitled -I. -I/opt/qt-static/include -I/opt/qt-static/include/QtQuick -I/opt/qt-static/include/QtGui -I/opt/qt-static/include/QtQml -I/opt/qt-static/include/QtNetwork -I/opt/qt-static/include/QtCore -I. -isystem /usr/include/libdrm -I/opt/qt-static/mkspecs/linux-g++ -o untitled-qmake_plugin_import.o /home/builder/Documents/build-untitled-x86-qmake-release/untitled-qmake_plugin_import.cpp
      g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NO_QML_DEBUGGER -DQT_NETWORK_LIB -DQT_CORE_LIB -I../untitled -I. -I/opt/qt-static/include -I/opt/qt-static/include/QtQuick -I/opt/qt-static/include/QtGui -I/opt/qt-static/include/QtQml -I/opt/qt-static/include/QtNetwork -I/opt/qt-static/include/QtCore -I. -isystem /usr/include/libdrm -I/opt/qt-static/mkspecs/linux-g++ -o untitled-qmake_qml_plugin_import.o /home/builder/Documents/build-untitled-x86-qmake-release/untitled-qmake_qml_plugin_import.cpp
      /opt/qt-static/bin/rcc -name qml ../untitled/qml.qrc -o qrc_qml.cpp
      g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NO_QML_DEBUGGER -DQT_NETWORK_LIB -DQT_CORE_LIB -I../untitled -I. -I/opt/qt-static/include -I/opt/qt-static/include/QtQuick -I/opt/qt-static/include/QtGui -I/opt/qt-static/include/QtQml -I/opt/qt-static/include/QtNetwork -I/opt/qt-static/include/QtCore -I. -isystem /usr/include/libdrm -I/opt/qt-static/mkspecs/linux-g++ -o qrc_qml.o qrc_qml.cpp
      g++ -Wl,-O1 -o untitled-qmake main.o untitled-qmake_plugin_import.o untitled-qmake_qml_plugin_import.o qrc_qml.o   -L/opt/qt-static/plugins/platforms -lqxcb -L/opt/qt-static/lib -L/opt/qt-static/plugins/xcbglintegrations -lqxcb-glx-integration -lQt5XcbQpa -lQt5ServiceSupport -lQt5ThemeSupport -lQt5EventDispatcherSupport -lQt5FontDatabaseSupport -lqtfreetype -lQt5GlxSupport -lXext -lxcb-glx -lX11-xcb -lX11 -lxcb-static -lxcb -L/opt/qt-static/plugins/imageformats -lqgif -lqicns -lqico -lqjpeg -lqtga -lqtiff -lqwbmp -lqwebp -L/opt/qt-static/plugins/bearer -lqconnmanbearer -lqgenericbearer -lqnmbearer -lQt5DBus -L/opt/qt-static/qml/QtQuick.2 -lqtquick2plugin -L/opt/qt-static/qml/QtQuick/Window.2 -lwindowplugin -lQt5Quick -lQt5Gui -lqtlibpng -lQt5Qml -lrt -lQt5Network -lQt5Core -lm -lqtpcre2 -ldl -lGL -lpthread
      

       

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              kandeler Christian Kandeler
              Reporter:
              kuzulis Denis Shienkov
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes