Infinite “make” loop when modification time is in the future
The Problem:
I’m sure that this problem is pretty common, since it already happened to me a few times:
When I tried to compile some source package under Linux (like the GDC compiler for the D language), the whole make process started to go into an infinite loop at a certain point. It ran ./configure for a subdirectory and then the make tool said something like:
make[1]: Warning: File `...' has modification time
9.4e+02 s in the future
and then started with the ./configure right back again. I didn’t understand, I had done this a few hours earlier on an identical operating system (Ubuntu 7 Feisty) at work, now I go home and it doesn’t work!
The Solution:
Of course this is not the proverbial, universal solution. It is just what is most commonly happening, or just another solution (amongst maybe others).
The issue here is that your system time is probably wrong, so first thing, check your time settings (you could just run…
> date
…at the command line and see what it says). If it is wrong (probably it’s set to sometime into the future), correct it (using your system’s tool like “gksu time-admin” under Ubuntu 7). It is a good idea to synchronize your system to an NTP server (Network Time Protocol) since that will ensure you always have the right time in your system (this is easy to do with the os’es provided tools).
Now, after this, reboot your computer! This is important, and many other solutions did not explain this at all, which frustrated me for a while! The filesystem was probably mounted with your old time (the wrong one). So regardless if you now changed the time to the correct value, the filesystem is still on the old one. A simple reboot will reload the right stuff without problems.
After that give it a try and see if it works! Still doesn’t? Well that might be because perhaps yo’ve tried a few things to make it work before arriving to this post right? The fact is that, even though the system should be correct now, there might still be a problem with the source code you are trying to compile: probably you’ve unpacked the source package before the time correction thing above and maybe changed something (maybe used “touch” or modified some file). Because of this, the modification time for those files is now still in the future.
The solution to this is simple: either (the easy way) delete the unpacked source code and repeat the whole unpacking process and then start compiling, or (the hard way) run “touch” on the “problem” files again at this time (after the time correction) and then start compiling.
Hope this helps,
Bye!
Enjoyed this post?, why not subscribe to the RSS feed!