You may get warning of this type when:
1) You try to build after moving your data from one machine to another.
2) You try to build after restarting any old machine.
This is due to the fact that sometimes when a machine is restarted its time and date settings get affected. Also when you transfer data from one machine to
another one may get such an error because of the time difference form machine to machine.
There are two ways to overcome this error:
A] Linux has a very handy 'the touch command'.
Explanation: The touch command changes the time stamp of the file with the 'file name' give as argument to the command. For every file the Linux OS
maitains some data like the files creation time, last modification time, etc. touch changes the last modification time of the command and sets it to the time the touch
command was executed. The very well known 'make' command works on a very similar principle.
This method is suitable only if yu haev transferred one or two files. But if there are many such files (and also if the machine time is not set to the present) then it would be better to use the following method.
[EDIT :] Okay here's an update: You can use the touch command for any number of files in the following manner:
1. Just 'cd' into the directory where the files need a time-stamp update.
2. Next use the following command which will update the time-stamps of all the files in the directory:
# find . -exec touch {} \;
B] the 'date' command:
Explanation: The date command changes the time and date of the Linux system to the time and date given as an argument. The argument is formed int he
following way -
-> First two digits are the current month like 02 for February and 12 for December.
-> Next two digits are the date from 01 to 30 or 31.
-> Next two digits are the time digits. This is to be strictly given in the 24 hour format. Nevertheless, while displaying the system time ( which happens when the date command is executed without any arguments ) the time is displayed in 12 hour format or whatever format is set.
-> next two digits are for minutes range is from 00 to 59
->Next four digits are for the current year like 2012.
This way the system time will be set to the current time and your build will be now successful.
1) You try to build after moving your data from one machine to another.
2) You try to build after restarting any old machine.
This is due to the fact that sometimes when a machine is restarted its time and date settings get affected. Also when you transfer data from one machine to
another one may get such an error because of the time difference form machine to machine.
There are two ways to overcome this error:
A] Linux has a very handy 'the touch command'.
How to Use: # touch <file name>
Explanation: The touch command changes the time stamp of the file with the 'file name' give as argument to the command. For every file the Linux OS
maitains some data like the files creation time, last modification time, etc. touch changes the last modification time of the command and sets it to the time the touch
command was executed. The very well known 'make' command works on a very similar principle.
This method is suitable only if yu haev transferred one or two files. But if there are many such files (and also if the machine time is not set to the present) then it would be better to use the following method.
[EDIT :] Okay here's an update: You can use the touch command for any number of files in the following manner:
1. Just 'cd' into the directory where the files need a time-stamp update.
2. Next use the following command which will update the time-stamps of all the files in the directory:
# find . -exec touch {} \;
B] the 'date' command:
How to use: # sudo date <mmddhrmnyyyy>
Explanation: The date command changes the time and date of the Linux system to the time and date given as an argument. The argument is formed int he
following way -
-> First two digits are the current month like 02 for February and 12 for December.
-> Next two digits are the date from 01 to 30 or 31.
-> Next two digits are the time digits. This is to be strictly given in the 24 hour format. Nevertheless, while displaying the system time ( which happens when the date command is executed without any arguments ) the time is displayed in 12 hour format or whatever format is set.
-> next two digits are for minutes range is from 00 to 59
->Next four digits are for the current year like 2012.
This way the system time will be set to the current time and your build will be now successful.
thank you...
ReplyDeleteIt helped me
I can't explain in few words how much this little, simple and very obvious thing helped to solve my incomprehensible problem with cpan and make command...
ReplyDeleteThank you very much!
Great man. Simple and worked for me. I was uploading files for many times without this problem, but today it happened. And now it's running.
ReplyDeletethanks a lot... even i was stuck here for half an hour... and when i googled, i got ur link at the top... its so simple...!!
ReplyDeletewe open files in our local desktop windows machines and modify this and then build it on the Ubuntu(Linux) server itself.
ReplyDeleteError:
#make[3]: warning: Clock skew detected. Your build may be incomplete.
make[3]: Warning: File `MAKEFILE.DEPEND' has modification time 36 s in the future
Can some one please tell me what need's to be done to avoid the above error.My local machine and server time are almost identical.
Almost identical but not same... seems there is an difference of 36s... So you can just touch the file once you copy it to the machine where you are finally going to build it to get the latest timestamp.
DeleteCool.
DeleteI am working with makefiles, GNU and Windows tools past few years. For the first time clock skew issue appeared in a virtual machine on my office lappy.
Googling for solution directed to this site. Good to know about an embedded systems engineer.
Thanks this helped when I was working on a mounted shared windows folder on rhel
ReplyDeletePerfect, thanks! Downloaded a batch of code from mbed.org (UK time to MST time) and had this happen.
ReplyDeleteIts great. Its very useful........... thanks
ReplyDeleteIT helps. thanks
ReplyDeleteIt helps thanks
ReplyDeleteАwеsome іssues here. I'm very happy to look your post. Thanks a lot and I am having a look forward to touch you. Will you please drop me a mail?
ReplyDeleteStop by my blog post: recipe for dog treats
Thanks it helped alot.
ReplyDeleteworks like a charm !
ReplyDeleteThanks!
Works like a charm!
ReplyDeleteThank u!
Thanks for the help. nicely explained and it worked :)
ReplyDeleteYour tip on changing time saved me a l-o-t of misery. God bless..
ReplyDeleteon some system it s working if i'm typing
ReplyDelete# touch makefile
but on different system it snot working still showing "clock skew detected"
Is 'touch' command present in the system and is it getting successfully executed? What OS is present on the system?
Delete