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

Failing to deploy examples that link to dynamic lib qml modules, but don't explicitly import them

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7.3, 6.8.0 Beta3
    • None
    • 4fc0afc2b (dev), 840ceeb2c (6.8), 51bdf2dcc (6.7)

    Description

      Originally filed at QTBUG-127835

      There is an example in qtdocs called lightningviewer that does not launch after installation and deployment.

      The issue is that:

      • there is an executable that is not a qml module
      • the executable loads Main.qml from another shared library LitghtningViewer qml module.
      • none of the qml files explicitly import the custom qml modules LightningViewer and LightningViewerStyle
      • the executable does link against the qml module backing libraries, but that is not considered for deployment or qml tooling
      • the automatic build-time qmlimportscanner run, doesn't include those qml modules for deployment because they are not referenced by any qml code, and the deployed app fails to launch.

      This can be worked around by either adding a dummy qml file that imports those qml modules, or by switching the shared libraries to be static ones and link to them, thus avoiding deployment, or changing the executable to be a qml module with a qml file that explicitly one of the other qml modules, so that qmlimportscanner sees that.

      Ideally though, the backing library linking relationship should be seen by the deployment implementation, and it include in the consideration of which qml modules are to be deployed.

      In case if there is a project where the executable is not a qml module on purpose and doesn't link to the other qml modules at all, fully relying on runtime imports, then there is a lack of intent on what needs to be deployed, which would need to be handled by one of the above work arounds, or introducing some new explicit api to handle that.

      Attachments

        Issue Links

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

          Activity

            People

              qtbuildsystem Qt Build System Team
              alexandru.croitor Alexandru Croitor
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews