[distcc] Re: distcc control methods

Wayne Davison wayned at users.sourceforge.net
Mon Jul 7 17:00:03 GMT 2003


On Mon, Jul 07, 2003 at 11:05:32AM +0200, Markus Werle wrote:
> make CC="distcc --verbose --hosts=\"mach:9999 sylvie:9999\" --disable-fallback --compiler=icpc"

This has a potential problem of when to stop parsing distcc options and
when to start parsing compiler options (since the build's command-line
is just appended to this).  You'd have to either add an end-of-distcc-
options marker (like a trailing "--"), or perhaps require that the
--compiler option always be specified as the last option to distcc.

Another problem is that a space-containing $CC value does not always
work with all projects, and any $CC value at all may not be honored by
some build setups.  Thus, for me, I never set CC and just add a distcc
masquerade dir to my PATH (along with ccache):

    PATH="/usr/lib/ccache/bin:/usr/lib/distcc/bin:$PATH" make

In such a setup, there's no way to specify those command-line options to
distcc.  An alternative would be to have a control program that the user
could run to setup how distcc will run.  For instance:

distcc_control --verbose --hosts="mach:9999 sylvie:9999" --disable-fallback --default-compiler=icpc

Then, if the user runs distcc_control without any options, they'd get
a summary of how distcc was setup to run.  The control program could
either set environment variables or manipulate config-file settings in
a config dir, depending on how Martin wants to make it controlled.  If
there is a change from the environment to files, it would have to be
flexible enough to not assume that ~/.distcc was the dir to manipulate
because the gentoo setup would not work well with this when HOME
changes during an emerge compile.  E.g. I'd want root to manipulate the
config in /etc/distcc, and the portage user to fallback to this config
when there was no per-user config present in ~/.distcc.  I current use
this method of choosing where the distcc hosts file should be stored
(in my distcc_probe perl script that scans available hosts and
manipulates the current host setup).

..wayne..



More information about the distcc mailing list