[distcc] gcc -MD problem

Martin Pool mbp at samba.org
Tue Oct 29 09:43:02 GMT 2002


On 28 Oct 2002, tmwg-distcc at inxservices.com wrote:
>    I'm using 012, and having trouble with dependency file creation. The
> makefiles that are set up to use gcc's -MD option aren't working. I'm
> getting some of the .d files in their proper directory, and not others.
> I haven't actually investigated, but my bet is that any compilation that
> is shipped off to another computer doesn't get the .d file created.

That's probably correct.  You can probably find the .d files in the
client's tmp directory.

It seems that the way gcc's -E, -MD, and -o options interact has
incompatibly changed in various gcc versions.

I have a plan to fix it, but it is not in yet.  It might be in 0.14.
That is basically to not use -o when running the preprocessor, but
rather just capture stdout.

In the meantime you need to work around it by either using a more
recent gcc, or running gcc locally to generate .d files.  Many
projects have a "make depend" target that updates this, and you might
be able to do that only occasionally when dependencies have changed.

-- 
Martin



More information about the distcc mailing list