1

DistCC 显然无法连接到主机。

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

distcc[32060] (dcc_show_hosts) CRITICAL! Failed to get host list

我的默认配置是

$ cat /etc/default/distcc | grep -v "\#\|^$"
STARTDISTCC="true"
ALLOWEDNETS="127.0.0.1"
LISTENER="127.0.0.1"
NICE="10"
JOBS=""
ZEROCONF="true"

我以为 ZeroConf 不需要我配置主机,但它抱怨我没有。如果我尝试将主机名写入/home/amacdonald/.distcc/zeroconf/hostsdistcc 实际上最终会删除这些行。

另外,我使用的系统是,

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.4 LTS
Release:    14.04
Codename:   trusty
$ dpkg -l | grep distcc
ii  distcc                                                3.1-6                                               amd64        simple distributed compiler client and server
$ distcc --version
distcc 3.1 x86_64-pc-linux-gnu
  (protocols 1, 2 and 3) (default port 3632)
  built May  9 2013 23:15:01
Copyright (C) 2002, 2003, 2004 by Martin Pool.
Includes miniLZO (C) 1996-2002 by Markus Franz Xaver Johannes Oberhumer.
Portions Copyright (C) 2007-2008 Google.

distcc comes with ABSOLUTELY NO WARRANTY.  distcc is free software, and
you may use, modify and redistribute it under the terms of the GNU 
General Public License version 2 or later.

Built with Zeroconf support.

Please report bugs to distcc@lists.samba.org
4

1 回答 1

0

这可能有点晚了,但我只是想做同样的事情,什么对我有用,我在你的 distcc 文件中发现好奇的是以下几行。

ALLOWEDNETS="127.0.0.1"

我认为这必须是子网掩码,例如192.168.0.0/16。环回地址 (127.0.0.1) 将数据包路由回主机 AFAIK。

LISTENER="127.0.0.1"

我想,这必须是这台 PC 本身的 IP 地址(有助于编译过程的那个),例如192.168.13.13。(至少对我来说,现在是错误。我一更改它,这台“帮助”PC 就开始接受来自主机的编译作业。)

JOBS=""

这个可能无关紧要,但是一个非零整数不会有任何机会(而不是必须查看文档,即JOBS的默认值是什么)。但可能还可以。

我以为 ZeroConf 不需要我配置主机,但它抱怨我没有。如果我尝试将主机名写入 /home/amacdonald/.distcc/zeroconf/hosts distcc 实际上最终会删除这些行。

所以恕我直言,无论ZeroConf如何,都需要进行上述更改。(但我可能错了。)

于 2017-03-08T15:18:19.490 回答