As for the first problem, Here is the error output:
distcc[10740] (dcc_spawn_child) ERROR: attempt to use unknown compiler aborted: /usr/bin/c++
distcc[10740] (dcc_build_somewhere) Warning: failed to distribute, running locally instead
distcc[10740] (dcc_spawn_child) ERROR: attempt to use unknown compiler aborted: /usr/bin/c++
Note that the compiler it is trying to use is "/usr/bin/c++". /usr/bin/c++ is just a symbolic link to "/usr/bin/g++-4.0" In fact if I try to run distcc from the command line I get the same error:
dthorup$ distcc /usr/bin/c++
distcc[11547] (dcc_spawn_child) ERROR: attempt to use unknown compiler aborted: c++
However if I run "distcc /usr/bin/g++-4.0" from the command line then it works fine. Why would one work and not the other?
My project is a Qt project whose project file is created using qmake and qmake is setting the compiler settings as follows:
CC = /usr/bin/cc
CPLUSPLUS = /usr/bin/c++
If I delete these settings so that Xcode reverts to its default compiler then I don't get the distcc error message. Also, inspection of the build command that Xcode uses shows that the compiler it is using is "/usr/bin/gcc-4.0". Why would I be getting this error message when I'm basically using the same compiler? I suppose I can modify my Qt project to specify the compiler, but I'm wondering why I get this behavior when doing distributed builds. Also, I'd rather not have to modify all of my Qt projects to set the compiler manually.
Now, for my second problem, when doing distributed builds only the remote machine is being sent files to compile, my local machine isn't compiling anything. This is verified by checking the DISTCC_HOSTS variable in the Xcode build log. If I turn off distributed builds on the remote machine then it will use the local machine to compile, but that seems to be the only way I can get compiles working on the local machine. The remote machine is a Core Duo iMac while the local Machine is a Quad Mac Pro, so naturally I'd like to be utilizing the local machine as well.
Another oddity is that 4 compiles are being done remotely on the iMac. My previous experience has been that each machine (remote or local) will only do as many compiles at once as it has CPUs, so I'd expect only 2 compiles to be done on the iMac. Perhaps this changed with the last Xcode update?
Anyway, if anyone can shed some light on these problems I'd be very happy. Thanks!
--
Dave Thorup
Software Engineer