Open atsju opened 5 years ago
I reproduced on several windows 10 environments. I suspected mcafee on-scann access but this is not the case as one of the computer has no mcafee or other specific virus scan installed. Please let me know if I must give some more information
Also in the project, many static libs depend on the same static lib.
Hi Julien,
I think I have experienced the same problem but with precompiled headers on Window 10. Concurrent access to the same precompiled header resulted in permission denied error. Problem disappeared when running in serial instead of parallel.
Cheers, Nico
On Mon, Sep 9, 2019 at 2:58 PM Julien Staub notifications@github.com wrote:
I reproduced on several windows 10 environments. I suspected mcafee on-scann access but this is not the case as one of the computer has no mcafee or other specific virus scan installed. Please let me know if I must give some more information
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ninja-build/ninja/issues/1646?email_source=notifications&email_token=AAEWBZ6ACAJR5FN4WPH4HFDQIZB6DA5CNFSM4IUIGKN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6HO6HQ#issuecomment-529461022, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEWBZZFY65L4K32CPGOEEDQIZB6DANCNFSM4IUIGKNQ .
-- Nicolas Desprès
Thank you Nicolas. I used the same workaround but this should be fixed. I cannot share my example but do you have a shareable minimal code to reproduce the issue ? This could help to fix it.
Unfortunately not.
On Thu, Oct 31, 2019 at 9:16 AM Julien Staub notifications@github.com wrote:
I used the same workaround but this should be fixed. I cannot share my example but do you have a shareable minimal code to reproduce the issue ? This could help to fix it.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ninja-build/ninja/issues/1646?email_source=notifications&email_token=AAEWBZ5AQEON72HEYOOZBCDQRKH7VA5CNFSM4IUIGKN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECW4RCQ#issuecomment-548259978, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEWBZ52FFFIWJNQTUFDDELQRKH7VANCNFSM4IUIGKNQ .
-- Nicolas Desprès
A minimal project to reproduce the bug can be found in this repository. The project has mainly empty file but many diamond dependencies between static libraries. I build on windows 10 with arm-none-eabi-gcc 7-2018-q2 on VScode. The project may need to build several times to reproduce the issue. Please let me know if you can reproduce and if you need more information.
Maybe this is relevant, it might not be a ninja issue afterall: https://bugs.launchpad.net/gcc-arm-embedded/+bug/1848002
I have this same problem, Ninja 1.10.0. Any news on a fix? Working around it by disabling threading is painful...
Hi Vox-Ben,
I'm also facing the same problem. what is the workaround ?
@leoatinnovation If you pass -j 1
to Ninja it runs only on a single thread (I think the default is three, in normal operation you can set it to whatever you like - ideally probably the same number of (virtual) processor cores that your build machine has). This avoids the bug by not running multiple threads that can conflict, but it reduces the speed. I got about a 50% speed reduction over the three-thread default, if you were otherwise using more threads to start with it'd be worse.
Just to confirm that this bug is still present in 1.10.1. Any chance you guys could try rebuilding binuitils per @kromancer 's link before you do the next version, to see if that solves the problem?
Similar issue here
Error CMake Error:
Running
'C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe' '-C' 'C:/Users/admin/Desktop/REPOS/libuv.git/out/build/x64-Debug' '-t' 'restat' 'build.ninja'
failed with:
ninja: error: failed recompaction: Permission denied C:\Users\admin\Desktop\REPOS\libuv.git\ ninja
Similar issue here, using Ninja 1.10.2:
CMake Error: Running '.../ninja.exe' '-C' '... '-t' 'recompact'
failed with:
ninja: error: failed recompaction: Permission denied
No one is going to fix this, who isn't experiencing the problem themselves.
If someone who is having this issue has the skills to create a pull request to do whatever it is Ninja needs to do to work around this bug in Windows's filesystem layer, that would probably be the better strategy.
The maintainers for this project does prefer that people discuss the design of a pull request prior to opening one, and get the OK to open the pull request from them though, so try to discuss what a solution would look like here in this issue prior to making the PR. (See discussion here for the issue/pr plan https://github.com/ninja-build/ninja/pull/2154#issuecomment-1223233807)
Bit late to the party but in my case directory names with spaces caused the issue.
I've created a symlink
mklink /D "c:\ProgramFiles\NVIDIA_GPU_Computing_Toolkit" "c:\Program Files\NVIDIA GPU Computing Toolkit"
and the the environment variables CUDA_HOME
and CUDA_PATH
to the new directory
set CUDA_PATH="c:\ProgramFiles\NVIDIA_GPU_Computing_Toolkit\CUDA\v11.8"
set CUDA_HOME=%CUDA_PATH%
help C:\aseprite\build>C:\users\rgb_m\ninja-win\ninja.exe -f C:\aseprite ninja: error: loading 'C:\aseprite': Access is denied. if you're wondering why i kept the username in the path when making this comment, it's because it's not my actual name (obviously)
I had to delete my build
folder. No idea why, but fixed my issue.
Ninja 1.8.2 and 1.9.0 reproduced. In a project creating many static libraries with cmake,
The issue is spurious, not always on same file. When running serial instead parallel, the problem disappear. Also just continuing build when it fails seem to permit finishing the build. I found someone with the same problem (in german) here . I think this could come from parallel (or too fast) access to same files in windows.