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

qml_tool_autogen target loses almost all dependencies on other autogen and sync_headers targets

    XMLWordPrintable

Details

    • fcb205863 (dev), 71130a16f (6.9), 61c73922b (dev), da3068fbf (6.8), 95784bcfa (6.9), 085ed83bb (tqtc/lts-6.5)

    Description

      Due to unknown reasons, if the qml_tool target links twice to Qt6::Qml target, the qml_tool_autogen targets loses almost all dependencies on other autogen and sync_headers targets, but most importantly on Qml_sync_headers.

      A smaller reproducer can be seen here https://codereview.qt-project.org/c/qt/qtdeclarative/+/624068 and looking at the dependencies of qml_tool_autogen via ninja -t browse, and seeing that all the sync_headers and autogen dependencies are missing.

      We have suspicions it was also happening in qtwayland, and perhaps silently for other targets as well.

      This appears to be the case on all platforms, regardless of cmake versions tested.

      This can cause bad race conditions during the build.

      Most recently observed on macOS framework builds, where moc is ran on the qml_tool target, before the Qml headers are present, and thus the moc.json files are incomplete, resulting in incomplete metatypes files, and various tests failing, like tst_qml.

      Again, unclear yet why it happens.
      But for the qml_tool case, the strange workaround of removing the duplicate linking to Qt6::qml appears to resolve the issue.

      More investigation needed.

      Attachments

        For Gerrit Dashboard: QTBUG-133725
        # 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:
              Resolved: