The NFS server and NFS client's system times are out of sync. The NFS server is probably drifting ahead.
Running make
on an NFS mount is sensitive to the millisecond level so client/server system times must be tight as a drum. This can be done by having your NFS client(s) sync their time off of the NFS server's time using NTP at the highest rate allowed (usually 8 seconds). On a LAN this should get you sub-millisecond accuracy.
- Install NTP on both the NFS client(s) and the NFS server.
- On the NTP config file of the clients (ntp.conf in linux), comment out the entries starting with 'pool' or 'server' and add the line:
server [put address of the nfs server here] minpoll 3 maxpoll 3
... The '3' is a power-of-two in seconds for the polling interval, hence 8 seconds. The NFS server's NTP config file can probably be left alone.
- Restart the ntpd service on your client.
- Test that your client is syncing by using the linux command within the client:
ntpq -p
... the important part is that your 'reach' column is not zero for long as that means it cannot contact the server's NTP.
If they don't sync, you may have to reboot the client and server. This may be the case with Synology NAS as the NTP server.
Perform a full clean of your build (even nuke the directory and re-clone if convenient) and try again.
Similar answers are throughout the internet, but they suggest simply installing NTP to the machines. This wasn't good enough to solve the issue for me - they weren't synced tightly enough. A better way is to sync the clients' clocks to the server's clock on the local network at very frequent intervals. This is frowned upon with the internet but cheap on a LAN.
If this isn't possible, at least try to ensure NTP on the clients and server uses the same time servers in its pool/server entries.