-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Re-running CMake" loop after removing build/CMakeCache.txt #1595
Comments
Saw this today, and realized it was the result of the CMakeLists.txt having a modified date several hours into the future. Perhaps that's something ninja can warn about? It knows the current time, so if any of the inputs are > than that, then something is likely off? |
CMake is re-running because generate.stamp is out-of-date. |
+1 to @mohammad-nazari's comment. For some reason, Windows had set my system clock 1 hour in the past after restarting. For those on Windows, go to settings, turn off 'Set time automatically' and turn it back on. |
This comment was marked as abuse.
This comment was marked as abuse.
Kudos @mohammad-nazari for your feedback! and thank you @Aleksbgbg for your suggested fix! Worked for me! |
@torarnv Thank you for this, it put me on the right track. I was building docker images in WSL2 and getting this error with an identical Dockerfile which had previously built fine. The problem is that WSL2 suffers from clock drift and this comment made me realise it was also the cause of the problem here. |
For me, the modification timestamps of my files were ahead of my system clock! The reason is that my clock wasn't correct when I cloned the repo. My clock sometimes gets out of sync because of my Windows/Linux dual boot. I suggest using git-warp-time to fix the timestamps. |
I just hit the issue. In my case it looks like cmake/ninja jumps into an infinite loop because my
Saw similar issue filed on cmake https://gitlab.kitware.com/cmake/cmake/-/issues/21819 |
Removing
build/CMakeCache.txt
manually will cause a loop withninja -C build
afterwards:touch build/build.ninja
fixes it.cmake version 3.14.5
ninja version 1.9.0
Arch Linux
The text was updated successfully, but these errors were encountered: