# error when i try to compile the kernel

## franziale

why when i try to re-compile the kernel i've this error message:

make[2]:Warning:Clock skew detected. Your buold may be incomplete!

----------

## erikm

This means your system clock isn't running at correct speed, so that mtimes of files appear to be ordered incorrectly, which can be a very serious problem on a system compiled from source.

The simplest way to verify the problem is to do a 

```
# sleep 60
```

whilst measuring time with your watch, for instance. The difference will most likely be significant (as in a sleep 60 taking 30 seconds). Post back when you've verified the problem, we'll try to solve it.

----------

## franziale

I've solved the problem using "hwclock --systohc"

----------

## erikm

If you indeed have clock skew, syncing the hardware clock to the system clock will not solve the problem. Check your system clock speed using my suggestion above.

----------

## XenoTerraCide

I had this problem. there was a bios flash from my manufacturer that fixed it. you may want to check and see if there is one from the manufacture of your computer or if you built it. the motherboard. (note: you may have to install windows to run this flash. I did)

----------

## obsrv

I have the same problem now. But I had no problems last 3 years. I checked system clocks speed with "sleep 60" and it's ok. What should I do? I can't change the date also with date tool. After /etc/init.d/clock restart, the date is wrong again. Help  :Smile: 

----------

## erikm

 *obsrv wrote:*   

> I have the same problem now. But I had no problems last 3 years. I checked system clocks speed with "sleep 60" and it's ok. What should I do? I can't change the date also with date tool. After /etc/init.d/clock restart, the date is wrong again. Help 

 

Did you set up NTP? What about the timezone symlink? Do you use the hardware clock for reference, and if so, does it run on local or UTC time?

----------

## Jimi...

I'm getting this problem also. I've just timed it using the method previously suggested and it seems to be in sync. 

What gives?

----------

## XenoTerraCide

most clocks aren't... perfect and have very very minor creep. but if they have more than normal creep which shouldn't be more than probably a second (if not less) a day, then ntp is an imperfect solution. check to make sure you have 

```
CLOCK_SYSTOHC="yes"

```

in /etc/conf.d/clock that will have your hardware clock set to the displayed time on shutdown. if your clock is still off when you do restarts check the CMOS battery it may be failing.

----------

## Jimi...

 *XenoTerraCide wrote:*   

> most clocks aren't... perfect and have very very minor creep. but if they have more than normal creep which shouldn't be more than probably a second (if not less) a day, then ntp is an imperfect solution. check to make sure you have 
> 
> ```
> CLOCK_SYSTOHC="yes"
> 
> ...

 

It was set to no in /etc/conf.d/clock so I set it to yes and rebooted but I'm still getting clock skew.

----------

## XenoTerraCide

are you using any kind of  cpu throttling? PC or Laptop?

----------

## Jimi...

No, but I am running Gentoo through VMWare if that makes any difference.

----------

## XenoTerraCide

I'm not sure if it would... and systhoc doesn't help creep that much.

----------

