Autogen: Qt6 reads our internal AutogenInfo.json, changed in 3.20
Encountered while trying to do a fresh build of Qt's qtbase repo with CMake 3.20.0-rc1 on Linux, using Ninja. Steps to reproduce:
git clone git://code.qt.io/qt/qtbase.git
git checkout cf08673836c7d26f8eab7054cfa8d46ef8e0121c
mkdir qtbase-build
cd qtbase-build
cmake -G Ninja -DCMAKE_BUILD_TYPE:STRING=Debug ../qtbase
ninja QEglFSIntegrationPlugin
The above eventually fails on trying to run moc
, which is a tool built by that project. Typical output of the failing command looks like this:
[239/863] Running automoc with --collect-json
FAILED: src/corelib/meta_types/qt6core_debug_metatypes.json.gen src/corelib/meta_types/qt6core_debug_metatypes.json
cd /home/craig/Projects/build/qtbase-debug/src/corelib && /home/craig/Projects/build/qtbase-debug/bin/moc -o /home/craig/Projects/build/qtbase-debug/src/corelib/meta_types/qt6core_debug_metatypes.json.gen --collect-json @/home/craig/Projects/build/qtbase-debug/src/corelib/meta_types/Core_json_file_list.txt && /snap/cmake/799/bin/cmake -E copy_if_different /home/craig/Projects/build/qtbase-debug/src/corelib/meta_types/qt6core_debug_metatypes.json.gen /home/craig/Projects/build/qtbase-debug/src/corelib/meta_types/qt6core_debug_metatypes.json
Error opening /home/craig/Projects/build/qtbase-debug/src/corelib/Core_autogen/include/../.json for reading
ninja: build stopped: subcommand failed.
The build does not fail in the above way with CMake 3.19.5, so this is a regression for 3.20.0-rc1. It may fail for a different problem (the one I'm trying to investigate), but so far I can't reproduce that failure so I don't think you're likely to see it with 3.19.5.