Distcc .distcc / zeroconf / hosts不包含任何主机

时间:2017-03-06 20:07:23

标签: networking compilation distributed distcc

我从distcc收到错误。我正在使用repos的包裹。这是我的配置

$ cat /etc/default/distcc | grep -v \#
STARTDISTCC="true"
ALLOWEDNETS="127.0.0.0/16 10.0.0.0/8"
LISTENER="0.0.0.0"
NICE="10"
JOBS="3"
ZEROCONF="true"

$ cat /etc/distcc/hosts | grep -v \#
+zeroconf

$ dpkg -l | grep distcc
ii  distcc       3.1-6  amd64  simple distributed compiler client and server
ii  distcc-pump  3.1-6  amd64  pump mode for distcc a distributed compiler client and server

$ cat ~/.distcc/zeroconf/hosts
10.16.114.52:3632/16
$ ifconfig 
    ...
          inet addr:10.16.114.52  Bcast:10.16.115.255  Mask:255.255.252.0
    ...

当我运行一堆编译(我生成的1000个C文件)时,

distcc gcc -o 41.o -c 41.c

我收到了错误,

distcc[26927] (dcc_parse_hosts) Warning: /home/amacdonald/.distcc/zeroconf/hosts contained no hosts; can't distribute work
distcc[26927] (dcc_zeroconf_add_hosts) CRITICAL! failed to parse host file.

distcc[26927] (dcc_build_somewhere) Warning: failed to distribute, running locally instead
distcc[26929] (dcc_parse_hosts) Warning: /home/amacdonald/.distcc/zeroconf/hosts contained no hosts; can't distribute work
distcc[26929] (dcc_zeroconf_add_hosts) CRITICAL! failed to parse host file.

2 个答案:

答案 0 :(得分:0)

您需要一个主机文件,其中包含运行distcc的计算机列表。使用此路径:

~/.distcc/hosts

例如:

10.0.0.1 10.0.0.2 10.0.0.42

答案 1 :(得分:0)

即使有 hosts 环境变量和 hosts 文件,在 /etc 和 /usr/local/etc 中,我 distcc 仍然找不到任何主机。

查看日志后:

DISTCCD_OPTS="${DISTCCD_OPTS} --log-file /var/log/distccd.log"  

说:

(dcc_warn_masquerade_whitelist) CRITICAL! /usr/local/lib/distcc not found. You must see up masquerade (see distcc(1)) to list whitelisted compilers or pass --enable-tcp-insecure. To set up masquerade automatically run update-distcc-symlinks.

我不得不跑:

sudo update-distcc-symlinks
sudo ln -s /usr/lib/distcc /usr/local/lib/distcc

让它发挥作用。