Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.8.2, 6.9
-
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 |
624071,4 | CMake: Temporary workaround for missing dependencies in qml_tool | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
624526,4 | CMake: Work around upstream AUTOGEN issue with discarded dependencies | dev | qt/qtbase | Status: MERGED | +2 | 0 |
624634,2 | CMake: Work around upstream AUTOGEN issue with discarded dependencies | 6.9 | qt/qtbase | Status: MERGED | +2 | 0 |
624886,2 | CMake: Work around upstream AUTOGEN issue with discarded dependencies | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
625347,2 | CMake: Temporary workaround for missing dependencies in qml_tool | 6.9 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
625521,3 | CMake: Work around upstream AUTOGEN issue with discarded dependencies | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
625639,1 | CMake: Temporary workaround for missing dependencies in qml_tool | 6.8 | qt/qtdeclarative | Status: ABANDONED | +2 | 0 |