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

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



    • Linux/X11
    • 2e98ccde7b89bdb45c87c154d27566215533ac76


      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):

      -prefix path/to/install/qt
      -c+std c+14
      -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
      -make libs
      -make tools

      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.



        Issue Links

          For Gerrit Dashboard: QTBUG-80843
          # Subject Branch Project Status CR V



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



                Gerrit Reviews

                  There are no open Gerrit changes