LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Timestamps (https://www.linuxquestions.org/questions/programming-9/timestamps-19072/)

Config 04-21-2002 01:59 PM

Timestamps
 
I just downloaded the source rpm of Fluxbox. I used correct instructions to build it... it gave me the error: error date is in the future (or something similar).
So, why shouldn't you be able to compile something, if the timestamp isn't correct?

kibble 04-21-2002 04:22 PM

The program that generated that error message would have been the 'make' utility. Make is a very smart program most of the time. What it tries to do is determain source files need to be recompiled based on their timestamps. Say you had 2 .c source files and 1 .h header file, file1.c file2.c file1.h which you compiled and linked together to make program1. If you edited file1.h which is included in file1.c and file2.c you would have to compiled file1.c and file2.c into their .o object files again. So rather then manually typing out gcc commands you make a Makefile which contains those commands, then type make and it will look at timestamps and try to judge what should be recompiled based on those.

Ok so long winded but as you can see if you had a project with tens of hundereds of source files any number of which would be depended on each other it would take a long time to recompile something if you changed just one file, hence the make util.

Now to your problem. The author's machine where the source code was tar'd up may have incorrect date/time settings, which tar does preserve when you untar something. But it's more likely your date is incorrectly set. So when make looks at the date and timestamps to deside if something should be recompiled it notes the problem with the dates off it can't be sure which files need to be recompiled. But since this is a fresh untar'd source it's unlikey there is a problem because it compiled everything to start with.

So how do we fix this? Well obviously repair the date problem what ever it may be and untar the file again. And/Or type find -exec touch {} \; from the shell which will change all the timestamps to the currect date/time.

Config 04-22-2002 02:07 AM

Thank you!
You were correct, my time settings were wrong, actually, I was back one month.... :confused:
And then Windows told me to change to summer-time...:p
But the program compiled just fine now.


All times are GMT -5. The time now is 09:12 PM.