Watch at EaseStories. Answers. Perspective.

Technology · PRACTICAL GUIDE

make reports clock skew? Prove the future timestamp before touching the tree

Preserve the exact target, prerequisite and nanosecond mtime; then identify the host, VM, container or filesystem clock that wrote it before cleaning or touching files.

Original technical diagram comparing the build clock, source time and a target 86,399 seconds in the future.
Original illustration: preserve the future timestamp before changing the tree. Watch at Ease

GNU make's clock-skew warning is a dependency-order warning, not cosmetic noise. A target or prerequisite appears ahead of the build clock, so make can skip work that should run or rebuild work unnecessarily. Preserve the path and timestamp first; correct the time boundary before rewriting evidence.

Freeze the warning and dependency edge

Save the complete make command, version, working directory and every line naming a future file. Record that path with second and nanosecond precision, its filesystem and mount, owner, inode and symlink target. Use make debug output for the affected goal to identify whether it is a target, prerequisite or generated makefile. Do not touch, clean or copy the tree yet.

Find every timestamp ahead of the build clock

Capture the build host's UTC time and synchronization state, then list files whose modification times are later than that reference. Compare the named target with each prerequisite rather than assuming only source files matter. Keep sub-second differences: GNU make's maintainer notes that even a small fileserver/build-server offset can trigger the warning.

Identify the writer time domain

For each future file, name the process and machine that created or restored it. Check host and guest clocks, container runtime context, CI runner, network-filesystem server, dual-boot or restored archive. Time-zone display alone does not change epoch mtimes; compare UTC instants and synchronization evidence. On remote filesystems, remember that cached metadata can differ from server-fresh attributes.

Repair the clock boundary before the file

Correct the responsible host, guest or server clock with its supported time service and confirm synchronization. Stop the writer while testing if it can recreate future files. Only after the boundary is correct should you remove generated outputs or reset timestamps for files whose origin and intended time are known. Never blanket-touch vendor sources or an entire repository merely to silence make.

Rebuild from a known boundary

Preserve the original evidence, then use the project's documented clean target or a new build directory. Run the exact goal without hiding warnings and verify the produced binary or artifact. If only one generated output had a proven bad timestamp, removing that output can be safer than rewriting every source timestamp, but the underlying clock must already be fixed.

Prove incremental builds are trustworthy again

After the clean build, run the same goal again without source changes; it should perform no unexpected work and emit no skew warning. Then change one controlled source or prerequisite and verify only the expected dependency path rebuilds. Stop if future files return, clocks are unsynchronized, the writer domain is unknown or the output cannot be verified.

Original diagram mapping build host, VM or container, network mount and restored artifact to the evidence each requires.
Original illustration: one tree can contain timestamps from several writer clocks. Watch at Ease