Nokia Networks Home

Nokia nmake Product Builder

Quick Links

Related Products

What does the time lead/lag warning mean?

A warning is issued when running nmake in a remote file system, such as NFS, and the clock on the local machine is not in sync with the clock on the file server. The time stamp of files touched in a remote file system is controlled by the file server, not the local machine. If the file server's clock is ahead of the local machine then the time stamp of the file will appear to be in the future. Likewise, if the file server's clock is behind the local machine then the time stamp will be in the past.

Since nmake is sensitive to time stamps it attempts to detect this situation. After generating a target nmake reads the file's modification time to store in the nmake state file. If the file time appears to be out of sync with the local system then a warning is issued and nmake updates the modification time of the file to bring it in sync with the local time.

The following warning message indicates the clock on the file server is about 40 seconds ahead of the local machine.

make: warning: hello.o file system time leads local time by at least 40.00s

This warning indicates the clock on the file server is about 40 seconds behind the local machine.

make: warning: hello.o file system time lags local time by at least 40.00s

Diagnosing

Because nmake adjusts the modification time of the file, running ls on the file after a build won't show a problem. A simple test is to touch another file and check the file time compared to the local clock. Use the GNU ls command with the --full-time option to get the file time stamp with seconds. Make sure to do this in the remote file system, running it in a local file system will not show the problem. The following example shows the file server clock is several seconds ahead of the local clock.

$ date ; touch myfile ; ls --full-time myfile ; date
Fri May 25 14:35:09 EDT 2012
-rw-r--r-- 1 richb richb 0 2012-05-25 14:35:53.000762000 -0400 myfile
Fri May 25 14:35:10 EDT 2012

Depending on the system you may be able to use rdate or ntpdate to compare clocks. The following example shows the clock on myfileserver ahead of the local clock.

$ date ; rdate myfileserver.lucent.com ; date
Fri May 25 14:29:09 EDT 2012
rdate: [myfileserver.lucent.com]  Fri May 25 14:29:53 2012
Fri May 25 14:29:10 EDT 2012

Solution

The warning messages cannot be disabled. To eliminate the warning keep the clocks synchronized. This is typically done using ntpd on all file servers and build machines to synchronize the clocks to a common time server. See your system administrator for help with ntpd or for an alternate method to synchronize the clocks.

Last Update: Friday,12-Aug-2016 10:44:42 EDT