Title: Qt Creator + Ninja: ninja: error: failed recompaction: Permission denied
-
Hi,
I’m building a Qt 6.9.2 project with MSVC2022 64-bit using CMake and Ninja in Qt Creator on Windows 10. During the configure step (inside a superbuild), the build fails with this error:ninja: error: failed recompaction: Permission denied
It happens when CMake runs:
C:/GratiView/tools/ninja/ninja.exe -C C:/GratiView/GratiViewBuild/src/GratiView-build -t recompact
Then also fails with:
-t restat build.ninja
Things I’ve tried:
- Gave full folder permissions using
icacls
- Set
CMAKE_MAKE_PROGRAM
to my local ninja.exe - Ninja works fine outside this superbuild
- Running Qt Creator as admin
- Added Defender/AV exclusions
Still getting the same error during
configure
.
Any idea what’s causing it or how to work around this?Thanks.
- Gave full folder permissions using
-
Hi,
I’m building a Qt 6.9.2 project with MSVC2022 64-bit using CMake and Ninja in Qt Creator on Windows 10. During the configure step (inside a superbuild), the build fails with this error:ninja: error: failed recompaction: Permission denied
It happens when CMake runs:
C:/GratiView/tools/ninja/ninja.exe -C C:/GratiView/GratiViewBuild/src/GratiView-build -t recompact
Then also fails with:
-t restat build.ninja
Things I’ve tried:
- Gave full folder permissions using
icacls
- Set
CMAKE_MAKE_PROGRAM
to my local ninja.exe - Ninja works fine outside this superbuild
- Running Qt Creator as admin
- Added Defender/AV exclusions
Still getting the same error during
configure
.
Any idea what’s causing it or how to work around this?Thanks.
@Rohit-Sinha Please scroll up to the very first error. Or, even better, post the whole build log as text.
- Gave full folder permissions using
-
This post is deleted!
-
@Rohit-Sinha Please scroll up to the very first error. Or, even better, post the whole build log as text.
@jsulm Hey, thanks for the suggestion! I'm pretty new to both Qt and SuperBuild, so I decided to share the entire build log on Pastebin to make it easier for you to look through. I hope this helps you spot the issue.
Here’s the link->
https://pastebin.com/KDRk4TzB
If you could take a look and point out what might be causing the problem, I’d really appreciate it! -
Hey, I figured out the issue! The problem was caused by building the main project inside the SuperBuild using ExternalProject_Add while also opening it in the IDE. This caused conflicts with CMake trying to reconfigure the same source twice.
The fix is to build the SuperBuild separately to install dependencies, then open and build the main project separately in the IDE with SuperBuild disabled.Thanks!