Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
Qt Creator 12.0.0
-
None
-
Windows
-
32c389a55 (12.0)
Description
To reproduce do the following with a CMake project and on Windows:
- open a CMake project configured to use the Ninja generator
- edit CMakeLists.txt
- save CMakeLists.txt
- wait for reconfigure step starting
- start a proper build
With a high probability the build will also try to reconfigure the project. During the concurrent CMake runs both processes might try to modify the same files, resulting in errors like this:
[cmake] CMake Error: [cmake] Running [cmake] [cmake] 'C:/Qt/Tools/Ninja/ninja.exe' '-C' 'C:/Users/Mathias/Builds/qtcsg-Desktop_Qt_6_5_2_MinGW_64_bit_mingw64-Debug' '-t' 'recompact' [cmake] [cmake] failed with: [cmake] [cmake] ninja: error: failed recompaction: Permission denied [cmake] [cmake] [cmake] [cmake] CMake Error: [cmake] Running [cmake] [cmake] 'C:/Qt/Tools/Ninja/ninja.exe' '-C' 'C:/Users/Mathias/Builds/qtcsg-Desktop_Qt_6_5_2_MinGW_64_bit_mingw64-Debug' '-t' 'restat' 'build.ninja' [cmake] [cmake] failed with: [cmake] [cmake] ninja: error: failed recompaction: Permission denied [cmake] [cmake] [cmake] [cmake] CMake Generate step failed. Build files cannot be regenerated correctly.
As a result the configuration is broken, and it's not possible anymore to build the project or to get automatic reconfigures while saving the CMakeLists.txt.
Do repair the situation one has to wait until both the automatic reconfiguration and the build have finished. After that the project can be restored by running CMake from project explorer.
While the situation is easy to restore and avoid, it gets into the way way too often. Maybe QtCreator can be fixed to wait with the reconfigure or build step, until the other has finished. This should fix the problem.