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

qt5_import_qml_plugins(myApp): no such file or directory '/qtbase/qml' folder

    XMLWordPrintable

Details

    • Linux/X11
    • 2e98ccde7b89bdb45c87c154d27566215533ac76

    Description

      I built Qt 5.14.0 from sources using "configure/make/make install" commands (I set a prefix so that Qt is built in the folder I wanted):

      ./configure
      -prefix path/to/install/qt
      -opensource
      -confirm-license
      -static
      -release
      -static-runtime
      -c+std c+14
      -no-reduce-relocations
      -gui
      -widgets
      -openssl-linked
      -qt-doubleconversion
      -qt-pcre
      -qt-zlib
      -qt-freetype
      -qt-harfbuzz
      -qt-xcb
      -qt-libpng
      -qt-libjpeg
      -skip qt3d
      -skip qtactiveqt
      -skip qtandroidextras
      -skip qtcanvas3d
      -skip qtconnectivity
      -skip qtdatavis3d
      -skip qtdoc
      -skip qtdocgallery
      -skip qtfeedback
      -skip qtgamepad
      -skip qtlottie
      -skip qtmacextras
      -skip qtmultimedia
      -skip qtnetworkauth
      -skip qtpim
      -skip qtpurchasing
      -skip qtqa
      -skip qtquick3d
      -skip qtquicktimeline
      -skip qtremoteobjects
      -skip qtrepotools
      -skip qtscxml
      -skip qtsensors
      -skip qtserialbus
      -skip qtserialport
      -skip qtspeech
      -skip qtsystems
      -skip qttools
      -skip qtvirtualkeyboard
      -skip qtwayland
      -skip qtwebchannel
      -skip qtwebengine
      -skip qtwebglplugin
      -skip qtwebsockets
      -skip qtwebview
      -skip qtwinextras
      -skip qtx11extras
      -no-compile-examples
      -make libs
      -make tools
      -silent

      Building of Qt was successful.

       

      Then, I tried to link my application to static Qt in a CMake project, using qt5_import_qml_plugins function as described in the doc: https://doc.qt.io/qt-5/qtqml-cmake-qt5-import-qml-plugins.html.

      When running cmake, I got the following output:

      – Running qmlimportscanner to find used QML plugins.
      qmlimportscanner: No such file or directory: "....../qtbase/qml/"

       

      Then, compilation obviously failed because of undefined references to QtQuickControls2Plugin, QtQuick2WindowPlugin, ...

       In my opinion, the root cause is:

      either "make install" does not copy "qml" folder where it should OR qt5_import_qml_plugins() does not take into account the installation prefix.

       

      To solve my problem, I had to manually copy the "qml" folder (located in "path/to/install/qt" which is the prefix I used in configure command) into "qtbase" folder.

       

      Update: I made a test where I removed the "prefix" option from configure call and I replaced with "developer-build" option. In this case, everything worked as expected.

       

      Attachments

        Issue Links

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

          Activity

            People

              alexandru.croitor Alexandru Croitor
              tje T J
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes