[distcc] Re: gcc: installation problem, cannot exec `as'

Dimitri PAPADOPOULOS-ORFANOS papadopo at shfj.DECOY.cea.NOSPAM.fr
Tue May 13 17:35:35 GMT 2003


> The "daemon" setup is described below:
> * The PATH of root when distccd is started is:
>       /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
>   so unless the daemon command modifies the PATH distcc cannot see
>   ccache, the symlinks to ccache, or the distcc client which all live
>   in /usr/local/bin.

The daemon function used by Red Hat in all its init scripts doesn't seem 
to be modifying PATH. I've tried running an init script that contains:
	daemon --user nobody 'set > /tmp/daemon.log'
and file /tmp/daemon.log doesn't contain a modified PATH. But somehow 
the PATH passed to distccd seems to contain /usr/local/bin, although I 
can't explain why. I'll continue investigating this.

In any case the reason why I'm having problems with distcc 2.1 and not 
distcc 2.0.1 seems to be this patch:

I'm not saying the patch is wrong, but I don't think it's a good idea to 
modify the PATH. I agree distccd should avoid running /usr/local/bin/gcc 
when it is a symlink to ccache, but I believe it's wrong to achieve this 
by modifying the PATH. Anyway, that doesn't seem to be the problem here, 
I'm only mentioning this.

Note also that on my Red Hat 7.3 machine the "real" compiler 'cc' is a link:

$ ls -l /usr/bin/gcc /usr/bin/cc /usr/bin/g++ /usr/bin/c++
-rwxr-xr-x    4 root     root        81832 Sep 12  2002 /usr/bin/c++
lrwxrwxrwx    1 root     root            3 Jan 28 13:10 /usr/bin/cc -> gcc
-rwxr-xr-x    4 root     root        81832 Sep 12  2002 /usr/bin/g++
-rwxr-xr-x    2 root     root        81832 Sep 12  2002 /usr/bin/gcc

That said the patch only seems to be discarding only directories that 
contain a 'cc' that is a link to 'distcc' or 'ccache'.

I think I'll have to debug this further by first identifying precisely 
the PATH environment variable that is passed to distccd at startup, and 
if it's wrong, why it's wrong.


More information about the distcc mailing list