My favorites | Sign in
Project Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 13: -MF"apps/bcl_apps.d" -MT"apps/bcl_apps.d" fails to distribute
1 person starred this issue and may be notified of changes. Back to list
Status:  Verified
Owner:  fergus.henderson
Closed:  Jul 2008
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by nilswoetzel, Jul 12, 2008
Using version:
2.18.3
3.0rc2

Platform:
redhat linux x86_64
building from source using gcc4.3.0

trying to:
build own project using eclipse 3.4 (ganymede) with cdt

what went wrong:
it fails to distribute the job, since eclipse cdt does not add a space
between options "-MF", "-MT" but the comments in arg.c states that those
options are ok for distributing - but it does not check if flag and
argument are indeed separated by a space

Example:
distcc g++ -I../include -I../example
-I../extern/noarch/mysql/5.0.51a/include
-I../extern/noarch/mysqlpp/3.0.0/include -O0 -g3 -Wall -c
-fmessage-length=0 -Wno-deprecated -MMD -MP -MF"apps/apps.d"
-MT"apps/apps.d" -o"apps/apps.o" "../apps/apps.cpp"

all clients are connected by ssh and have varieing numbers of processors,
all with the lzo option

Solution:
We fixed that by replacing the strcmp function with a strncmp function,
that only compares the first n characters.
Our project compiles just fine with that - but we might have overlooked
something.

Patch: in the attachment
MD_MMD_MG_MP_MF_MT_MQ_distcc-3.0rc2.patch
569 bytes Download
Comment 1 by fergus.henderson, Jul 29, 2008
When submitting patches, please use at least the "-u" option, or preferably "-Naur",
and list the old version first on the command line, then the new version, rather than
the other way around.  So "diff -Naur old-directory new-directory", not "diff
new-file old-file".

Nevertheless, with some difficulty I was able to apply your patch and take a look at
it.  Your patch looks wrong to me - it will do the wrong thing for e.g. "gcc -MF
foo.m -c foo.c".  However, you're right that there is a bug.  I have made a different
patch to fix it.  Please test out this alternative patch.

patch2
806 bytes Download
Status: Started
Comment 2 by fergus.henderson, Jul 29, 2008
(No comment was entered for this change.)
Owner: fergus.henderson
Comment 3 by fergus.henderson, Jul 29, 2008
I've submitted that patch to the mainline, so this should be fixed now, as of
revision 568.
Status: Fixed
Comment 4 by fergus.henderson, Jul 30, 2008
The previous patch wasn't sufficient to fix the problem.
I'm working on another patch.
Status: Started
Comment 5 by fergus.henderson, Jul 30, 2008
Fixed in revision 574.
Comment 6 by fergus.henderson, Jul 30, 2008
(No comment was entered for this change.)
Status: Fixed
Comment 7 by nilswoetzel, Sep 08, 2008
works without problmes in eclipse ganymede with CDT 5

Thanks
Comment 8 by fergus.henderson, Sep 08, 2008
(No comment was entered for this change.)
Status: Verified
Sign in to add a comment

Hosted by Google Code