Skip to content
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

Open
blueyed opened this issue Jul 3, 2019 · 6 comments
Open

"Re-running CMake" loop after removing build/CMakeCache.txt #1595

blueyed opened this issue Jul 3, 2019 · 6 comments

Comments

@blueyed
Copy link

blueyed commented Jul 3, 2019

Removing build/CMakeCache.txt manually will cause a loop with ninja -C build afterwards:

% ninja -d explain -C build
ninja: Entering directory `build'
ninja explain: output CMakeCache.txt of phony edge with no inputs doesn't exist
…
[0/1] Re-running CMake...
-- The C compiler identification is GNU 9.1.0
…
-- Configuring done
-- Generating done
-- Build files have been written to: /home/daniel/Vcs/neovim/build
ninja explain: output build.ninja older than most recent input CMakeCache.txt (1562188465425698113 vs 1562188969455556191)
[0/1] Re-running CMake...
…
ninja explain: output build.ninja older than most recent input CMakeCache.txt (1562188465425698113 vs 1562188704052391884)
[0/1] Re-running CMake...

touch build/build.ninja fixes it.

cmake version 3.14.5
ninja version 1.9.0
Arch Linux

@torarnv
Copy link

torarnv commented May 23, 2021

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?

@mohammad-nazari
Copy link

CMake is re-running because generate.stamp is out-of-date.
Check your System time ...

@Aleksbgbg
Copy link

Aleksbgbg commented Jul 8, 2022

+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.

@jonesmz

This comment was marked as abuse.

@NawalElBoghdady
Copy link

Kudos @mohammad-nazari for your feedback! and thank you @Aleksbgbg for your suggested fix! Worked for me!

@iain-ilearner
Copy link

Saw this today, and realized it was the result of the CMakeLists.txt having a modified date several hours into the future.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants