[distcc] Can't get distcc working properly, help!

Wayne Davison wayned at users.sourceforge.net
Wed Jul 9 06:05:58 GMT 2003

On Thu, Jul 03, 2003 at 10:48:06AM +0100, Luke Guest wrote:
> 2) I can build for Linux our project over the two machines, if  I take the
> dependency generation (ripped from the make manual).

Did you mean to say "if I take _out_ the dependency generation"?  I.e.,
is this a problem with -MD compatibility?

> 3) I cannot build for PS2, error 110, distcc can never find the compilers.

How distcc finds a compiler depends on how it is called.  It sounds like
you're calling it without an absolute path for the compiler name, i.e.
you're using the command "distcc some-compiler -c foo.c" as opposed to
using "distcc /some/path/some-compiler -c foo.c", right?  If so, then
you do indeed need to ensure that the PATH is setup right for distccd.
If you use an absolute pathname to the compiler, then you don't need to
get PATH setup, but you do need to have the compiler in the same place
on all the systems.

I don't like using xinetd, since it's harder to setup and it's not as
efficient as the pre-forked daemon mode.  I recommend putting an init
file in /etc/init.d (and perhaps symlinking it into a runlevel for
automatic startup on boot).  You can then set PATH or DISTCCD_PATH
inside the init file and have it affect the PATH that distccd will use
when it runs.

> Another question, how does that masquerading work?

It's pretty simple -- you'd set it up like this:

    mkdir -p /usr/lib/distcc/bin
    cd /usr/lib/distcc/bin
    ln -s /usr/bin/distcc cc
    ln -s /usr/bin/distcc gcc
    ln -s /usr/bin/distcc c++
    ln -s /usr/bin/distcc g++
    export PATH="/usr/lib/distcc/bin:$PATH"

At that point, whenever someone tries to run "gcc" they get distcc, and
it runs gcc (because its symlink is named gcc).

> What does distcc spawn by default? gcc?

Running it as "distcc -c foo.c" would have it default to running "cc"
(note the lack of a compiler name).  The masquerade setup runs whatever
the symlink is named.


More information about the distcc mailing list