[distcc] distccd paths

Martin Pool mbp at samba.org
Thu Oct 16 01:55:18 GMT 2003


On 15 Oct 2003, jason.davis at acterna.com wrote:

> Our build environment contains multiple compilers with the same name,
> installed in different directories.

I find that kind of thing leads often leads to confusion and incorrect
builds...

> Only one of these compilers is used by a particular developer at a
> time (so doing the client side of distcc would seem to work using
> masquerading), but how does distccd know which compiler to use?

The client simply passes the compiler name.  If you say 

  distcc /usr/local/gcc-3.1415-wibble/bin/gcc 

then it passes that absolute path; otherwise it is just the basename.

> Is the entire path to the compiler passed to the server, or does it
> use PATH and/or DISTCCD_PATH to look for the appropriate executable?

The second.

Your options are

 - Use fully-qualified compiler names, with an arch, version, and
   whatever other variables you need.  I don't know how hard this will
   be on your build system but it is often the best long-term outcome,
   not just for distcc but also in preventing bugs and confusion.

 - Don't use masquerading, and pass the compiler's full path to
   distcc as above.

 - Write a little shell script which does

   exec distcc /usr/local/gcc-3.1415-wibble/bin/gcc "$@"

   and use that as your compiler

 - Run different daemons on different ports with different
   DISTCCD_PATH settings.  Use a different hosts definition for each
   build.  Kind of kludgy but you wouldn't need to change anything in
   your build system.

Please let us know how it works out.
-- 
Martin 



More information about the distcc mailing list