The current approach to setting timestamps can cause confusing errors building the vendored memcached in situations where the clock has drifted a bit from real time. The failed sanity check produces the error:
checking whether build environment is sane... configure: error: newly created file is older than distributed files!
Check your system clock
This kind of clock drift is very common when using Docker for Mac or Windows. Ruby's Time.now appears to use a different clock from the one used by the timestamps for the file created as a part of the sanity check. As a result, a clock drift of as little as six seconds can cause the timestamps set on the source tree to be newer than the file created during the sanity check.
This sets the timestamps a half hour in the past instead of at the present time, allowing for a bit of leeway in clock drift.
The current approach to setting timestamps can cause confusing errors building the vendored memcached in situations where the clock has drifted a bit from real time. The failed sanity check produces the error:
This kind of clock drift is very common when using Docker for Mac or Windows. Ruby's Time.now appears to use a different clock from the one used by the timestamps for the file created as a part of the sanity check. As a result, a clock drift of as little as six seconds can cause the timestamps set on the source tree to be newer than the file created during the sanity check.
This sets the timestamps a half hour in the past instead of at the present time, allowing for a bit of leeway in clock drift.