Skip to main content

"has modification time x in the future" and Virtualization

If you are running Linux as a guest virtual machine on a Windows host (or some other OS) using VirtualBox, you might have encountered the following error when you try to compile something on the Linux guest:

make[2]: Warning: File `/media/sf_GitHub/misc/script_build/../../stack/lkm/ipstack.o' has modification time 0.51 s in the future

This happens when you try to build inside a folder shared from Windows using the VirtualBox Guest Extensions. There is a minute but detectable delay between the moment when gcc tries to write the intermediate .o file from inside the Linux guest and when it is actually written to the hard disk outside on the Windows host.

To get rid of the problem, just set the Linux guest's time 1 minute or so ahead of the time on Windows host.

Comments