[distcc] Incorrect time stamp of generated object file when using
distcc with makepp
Chris van Engelen
cvengelen at aimsys.nl
Fri Aug 27 12:10:28 GMT 2004
All,
Care must be taken with the memory mapped file IO mechanism
employed by distcc when using distcc together with tools which
store the modification time of generated object files!
In stead of make, we use makepp for building our programs.
This utility stores all kind of info about generated files,
e.g., object files which result from a compilation, in
a small hidden file. This file info includes a time stamp of
the generated file, which is taken from the mtime attribute
of the file. The time stamp is used as a signature of
the generated object file.
We experienced a problem when makepp was combined with
using distcc on Linux machines. In this case, for larger
object files (typically larger than 100 kB), the time stamp
as stored by makepp could be a few seconds less than
the actual time stamp of the generated object file
(typically the difference was in the region of 1-5 seconds).
This then generates a rebuild of the object file the next
time the program was built, because makepp checks this
time stamp, and concludes that the object file must have
been modified since its mtime does not match the mtime
stored as a signature by makepp.
The problem was immediately solved when disabling the memory
mapped file IO mechanism employed by distcc, by setting
environment variable DISTCC_MMAP to 0:
export DISTCC_MMAP=0
I guess this is not so much a bug, but a rather annoying side
effect of using memory mapped file IO in distcc together with
a make tool which stored the mtime of the generated file.
It took us some months before we found that it was the memory
mapped file IO in distcc which caused the problem. So maybe
this should be mentioned in the distcc manual page.
Please let me know if you need more detail.
--
Chris van Engelen
AimSys bv
Hilversum, The Netherlands
Phone: +31 35 689 1935
mailto:cvengelen at aimsys.nl
More information about the distcc
mailing list