My problem is whenever I try to compile using Makefile I get the following :
make: Warning: File `Board.c' has modification time 1.3e+03 s in the future
gcc -Wall -c -Wvla -lm Board.c -o Board.o
gcc -Wall -c -Wvla -lm PlayBoard.c -o PlayBoard.o
gcc -lm ErrorHandle.o Board.o PlayBoard.o -g -o PlayBoard
make: warning: Clock skew detected. Your build may be incomplete.
My Makefile is :
CC = gcc
FLAGS = -Wall -c -Wvla
PlayBoard: ErrorHandle.o Board.o PlayBoard.o
$(CC) -lm ErrorHandle.o Board.o PlayBoard.o -g -o $@
PlayBoard.o: PlayBoard.c Board.o
$(CC) $(FLAGS) -lm PlayBoard.c -o $@
Board.o : ErrorHandle.o Board.c Board.h
$(CC) $(FLAGS) -lm Board.c -o $@
.PHONY : clean
clean:
rm -f Board.o PlayBoard.o PlayBoard
all : PlayBoard
Thank you for your help.
A possible solution is to touch
every file in the source tree in order to update time-stamps:
Go to the root of the sub-tree an do:
find . -exec touch {} \;
Then make clean
and retry compilation.
As denoted in a comment by stijn the message "Clock skew detected" is most commonly given if compiling sources located on an NFS mount and the NFS server's clock runs ahead the client's clock doing the compilation.
I saw this in Eclipse a couple of times as well when doing some work on one of the University computers here. My data drive was a network drive and the clock difference between the network drive and the local machine was off.
Switching my workspace to a location on the local machine (C drive) fixed the problem
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With