[distcc] Corrupted object files when using ccache + distcc

Martin Pool mbp at sourcefrog.net
Tue Aug 26 02:49:12 GMT 2003


On Thu, 21 Aug 2003 19:47:20 +0300
"Gavrie Philipson" <gavrie at disksites.com> wrote:

> I am using ccache (version 2.2) together with distcc (version 2.10) to
> compile, on a Red Hat 9 machine.
> The problem is that I get corrupted object files: a few of the object
> files are simply comprised of null bytes. They do have the correct
> size, and they are correctly cached, but somehow between distcc and
> ccache they are corrupted.
> 
> I am using the directory shadowing method, with the following path:
> /usr/lib/ccache/bin:/usr/lib/distcc/bin:/bin:/usr/bin:/usr/X11R6/bin:
> /us r/local/bin
> 
> The DISTCC_HOSTS variable points to one host only, which is a
> similarly configured machine as the host I'm compiling on.
> The steps are as follows:
> 
> 1. Clean the cache with 'ccache -C'
> 2. Run 'make clean'
> 3. Run the make
> 
> At the linking stage, the corrupted object files are detected and the
> make fails (main.o: File format not recognized). Looking at the object
> file shows it's all null bytes.
> Doing a 'make clean' and recompiling (this time the object files come
> from the cache) works fine.

That seems to imply that the correct object files were put into the
cache, but they somehow got filled with zeros when they were copied
from the cache to your build directory.  Otherwise how would they hits
the second time around be correct?

Can you try to reproduce the problem and then look in the ccache
directory to see if this is true?

Is your build directory also on NFS?

-- 
Martin 



More information about the distcc mailing list