LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   when this warnning happenes " Clock Skew Detected" ? (https://www.linuxquestions.org/questions/programming-9/when-this-warnning-happenes-clock-skew-detected-214141/)

phoenix7 08-06-2004 03:43 AM

when this warnning happenes " Clock Skew Detected" ?
 
when this warnning happenes " Clock Skew Detected" ?

jlliagre 08-06-2004 04:05 AM

That means files you are compiling are more "recent" than the current system time, so make can't do its job properly.
Correct your machine time, or just "touch" the files to have a consistent time.

Hko 08-06-2004 04:12 AM

Re: when this warnning happenes " Clock Skew Detected" ?
 
Quote:

Originally posted by phoenix7
when this warnning happenes " Clock Skew Detected" ?
The "make" program compares the modification times of source files (e.g. "example.c") and the object file (e.g. "example.o", as resulting from compilation). The same happens when linking (e.g. comparing the mod times of "example.o" with "example_executable").

This way "make" can determine is a source file has changed since last compilation, and thus needs to be recompiled. The mod time of the resulting object file is then changed because of recompilation. Then "make" sees it needs to re-link executables that need that object file.

Now, if time system clock changes while make is running doing this thing, some files may get a wrong modification time, so compilation/linking commands may not be run by "make", while they possibly should have been done. So when "make" detects that the system clock changed while running, it issues this warning.

Maybe you changed the system time by hand (e.g. by running something like "date" or "ntpdate"), or "ntpdate" was run by cron while the internet time (NTP) was different from your system time.

cppkid 08-06-2004 04:14 AM

Is your kernel source located on an NFS mount? If the NFS server's clock is ahead of the local machine, files created due to make will have timestamps in the future, which confuses make. Hence, it reports clock skew.
NFS is the most obvious reason for this to occur; there could be others but I can't think of any, unless you changed the clock (either by hand or xntp/netdate etc) while running make menuconfig.

The Problem is that if you get this error you can be very sure that the time on the system where the files live and the time on the system where the build is being performed, are not in sync. They may be off by only half a second or so, which means half the time they will appear to have the same time and half the time they won't.


All times are GMT -5. The time now is 10:48 PM.