tags 596253 - patch
--

[Rejecting patch to hardcode 'cc --version' in distcc.]

The distcc user does have a non-sensible home.  This will be
fixed.  I include below some tips for users experiencing the
ccache + distcc + zeroconf issue.

> The reason for the failure is that 'ccache' installation
> recommends a symbolic link from 'cc' to 'ccache'…

Yes it does, in a *private* bin directory which should not
interfere with the system started distccd.  It also suggests
to prepend /usr/lib/ccache to PATH as an alternative.  Neither
of these alternatives gives specific consideration to using
ccache and distcc together.  In particular, distccd does
expect that it is communicating directly with cc which is not
the case if a ccache symlink appears before cc in distccd's
PATH.

distcc/README.Debian gives the recommended setup for using
ccache and distcc together:

 conf 3) export DISTCC_HOSTS="localhost server1 server2 server3"
         export PATH=/usr/lib/ccache:$PATH
         export CCACHE_PREFIX=distcc
         make -j 8

which does not cause the described problem.  The call stack is
then:

 make: ccache: distcc: remote distccd: remote cc

It may still be useful however for an admin to install ccache
symlinks in a public directory, effectively setting ccache as
the default compiler (this is the situation reported in OP).
The call stack in that case is:

 …: distcc: remote distccd: remote ccache: remote cc

The admin should decide whether the remote ccache call is
desired.  In some situations it will be more efficient to
only use ccache locally and not on remote hosts.

Either way, this can be resolved by configuring certain
environment variables for ccache in /etc/default/distcc.

If the remote ccache call is *not* desired, add this:

 export CCACHE_DISABLE=1

otherwise, the admin should be sure to create a system-wide
ccache directory on each remote host and add:

 export CCACHE_DIR=/var/cache/ccache

This only applies to distccd started by the system, such as
with 'invoke-rc.d distcc start'.  A user who manually starts
distccd on each host will have to take care of such variables.

However, I strongly recommend the setup mentioned first (from
distcc/README.Debian) which will work without trouble, rather
than either approach where distcc calls ccache.

Regards



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to