[CMake] "Cannot restore timestamp" error on Windows

Paul Smith paul at mad-scientist.net
Tue Apr 23 17:43:41 EDT 2013


On Sun, 2013-04-21 at 00:32 -0400, Paul Smith wrote:
> Hi all; I'm getting this error most, but not every, time I run cmake on
> my main Windows build system:
> 
> 28>CUSTOMBUILD : CMake error : Cannot restore timestamp D:\build-dir\MASTER-BRANCHES30-WINDOWS\BaseTest\CMakeFiles\generate.stamp
> 
> It happens for different targets as well, not always the same one.

> commit 2dc17f88dd2de900154f153f521b803ec9b7c377
> Author: Brad King <brad.king at kitware.com>
> Date:   2013-02-12 10:46:22 -0500

We're still seeing this, pretty often.  This is a very serious problem
for us as it's causing spurious build failures.

I've looked into the code and added debugging.  For example if the
RenameFile() fails, I've printed the system error.  The error always
appears to be "No such file or directory".

I've also added a check on the open of the temp file so that if it
fails, I print the reason: previously there was no check for that.
However, that code never executes so it seems that's not the problem.

Currently my suspicion is that the name of the temp file is not unique
enough: somehow multiple concurrent runs of this function are using the
same temp file name.  I've added output to print the temp file name
always, not just when a failure happens, but it will take a bit of time
to get into our build system.

Anyone have any other ideas?



More information about the CMake mailing list