Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Title: Qt Creator + Ninja: ninja: error: failed recompaction: Permission denied
Forum Updated to NodeBB v4.3 + New Features

Title: Qt Creator + Ninja: ninja: error: failed recompaction: Permission denied

Scheduled Pinned Locked Moved Unsolved Qt 6
5 Posts 2 Posters 180 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rohit Sinha
    wrote last edited by Rohit Sinha
    #1

    error.png

    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.

    jsulmJ 1 Reply Last reply
    0
    • R Rohit Sinha

      error.png

      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.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote last edited by
      #2

      @Rohit-Sinha Please scroll up to the very first error. Or, even better, post the whole build log as text.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      R 1 Reply Last reply
      0
      • R Offline
        R Offline
        Rohit Sinha
        wrote last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • jsulmJ jsulm

          @Rohit-Sinha Please scroll up to the very first error. Or, even better, post the whole build log as text.

          R Offline
          R Offline
          Rohit Sinha
          wrote last edited by
          #4

          @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!

          1 Reply Last reply
          0
          • R Offline
            R Offline
            Rohit Sinha
            wrote last edited by
            #5

            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!

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved