gupascal / distcc

distcc: a fast, free distributed C/C++ compiler. Automatically exported from code.google.com/p/distcc
GNU General Public License v2.0
0 stars 0 forks source link

Hosts found by Zeroconf do not have ,cpp,lzo options when listing with distcc --show-hosts #59

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
My goal is to use distcc with pump while fetching the list of servers by
zeroconf.

What I did:
$ pump --startup
/usr/bin/pump: error: pump mode requested, but distcc hosts list does not
contain any hosts with ',cpp' option

The following output confirmed the problem:
$ distcc --show-hosts
192.168.0.71:3632/16
192.168.0.13:3632/8

distcc was configured to fetch the list of servers only from zeroconf
(which is what I need):
$ cat /etc/distcc/hosts
+zeroconf

When I changed the content of /etc/distcc/hosts to
192.168.0.71:3632/16,cpp,lzo
192.168.0.13:3632/8,cpp,lzo

pump managed to start and compilation went like a charm.
That was natural as those hosts have the same version of distccd and thus
support cpp and lzo.

I suppose that zeroconf host listing code should figure out somehow whether
remote host supports cpp and/or lzo features (maybe by means of extra
zeroconf TXT field?) and add those options to host description lines so
that distcc-pump can work with hosts found by means of zeroconf.

$ distcc --version
distcc 3.1 x86_64-pc-linux-gnu
  (protocols 1, 2 and 3) (default port 3632)
  built Jan 23 2010 16:47:55
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.

Installed from Ubuntu Karmic repository.

I'm running Ubuntu Karmic Koala.

$ gcc --version
gcc (Ubuntu 4.4.1-4ubuntu9) 4.4.1

$ uname -a
Linux cesar-laptop 2.6.31-17-generic #54-Ubuntu SMP Thu Dec 10 17:01:44 UTC
2009 x86_64 GNU/Linux

$ avahi-daemon --version
avahi-daemon 0.6.25

Original issue reported on code.google.com by madkinder on 23 Jan 2010 at 4:38

GoogleCodeExporter commented 9 years ago
Please take a look at the patch I've attached which fixes this problem.

It makes distccd broadcast supported options via new "options" TXT record. For 
now
the options are hardcoded to "cpp,lzo".

The patch also makes distcc aware of "options" record so that "distcc 
--show-hosts"
now takes it into consideration while creating hosts file. Also note that 
distcc will
handle absence of "options" record properly so that it will remain compatible 
with
older implementations of distccd.

Original comment by madkinder on 24 Jan 2010 at 9:20

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the patch!
I've sent some comments on the patch to the distcc-patches mailing list.

Original comment by fergus.h...@gmail.com on 16 Feb 2010 at 9:40

GoogleCodeExporter commented 9 years ago
I modified the patch provided by madkinder to work with distcc in Gentoo 
portage and created an ebuild. It compiles, but distcc does not find any hosts 
with "cpp,lzo" - what is the status on this issue? Has a new solution been 
worked out since the last post from 7 months ago?

Original comment by cat.mole...@gmail.com on 25 Sep 2010 at 9:52

Attachments:

GoogleCodeExporter commented 9 years ago
Running 'avahi-browse _distcc._tcp -rtkv' doesn't show any mention of lzo or 
cpp. Should it? Output follows:

matt@thelonious ~ $ avahi-browse _distcc._tcp -rtkv
Server version: avahi 0.6.25; Host name: thelonious.local
E Ifce Prot Name                                          Type                 
Domain
+ eth0 IPv4 distcc@mingus                                 _distcc._tcp         
local
+ eth0 IPv4 distcc@thelonious                             _distcc._tcp         
local
= eth0 IPv4 distcc@mingus                                 _distcc._tcp         
local
   hostname = [mingus.local]
   address = [192.168.69.2]
   port = [3632]
   txt = ["cc_machine=x86_64-pc-linux-gnu" "cc_version=4.3.4" "gnuhost=x86_64-pc-linux-gnu" "distcc=3.1" "cpus=2" "txtvers=1"]
= eth0 IPv4 distcc@thelonious                             _distcc._tcp         
local
   hostname = [thelonious.local]
   address = [192.168.69.8]
   port = [3632]
   txt = ["cc_machine=x86_64-pc-linux-gnu" "cc_version=4.3.4" "gnuhost=x86_64-pc-linux-gnu" "distcc=3.1" "cpus=2" "txtvers=1"]
: All for now
: Cache exhausted
matt@thelonious ~ $

Original comment by cat.mole...@gmail.com on 25 Sep 2010 at 9:57

GoogleCodeExporter commented 9 years ago
With the patch from madkinder I got the options from avahi (avahi-browse 
_distcc._tcp -rtkv):

=   eth1 IPv4 distcc@polly.vanutsteen.nl                    _distcc._tcp        
 local
   hostname = [polly.local]
   address = [192.168.1.105]
   port = [3632]
   txt = ["cc_machine=x86_64-linux-gnu" "cc_version=4.4.5" "options=cpp,lzo" "gnuhost=x86_64-unknown-linux-gnu" "distcc=3.1" "cpus=2" "txtvers=1"]

But when running: make CC=pump I got the following error:

distcc[30286] (dcc_show_hosts) CRITICAL! Failed to get host list
/usr/bin/pump: error: pump mode requested, but distcc hosts list does not 
contain any hosts with ',cpp' option
/usr/bin/pump: 547: -DHAVE_CONFIG_H: not found

Original comment by leonboga...@gmail.com on 27 Oct 2010 at 8:17

GoogleCodeExporter commented 9 years ago
Running "make CC=pump" won't work.  You would need to use "pump make CC=distcc".

Original comment by fergus.h...@gmail.com on 27 Oct 2010 at 8:24

GoogleCodeExporter commented 9 years ago
Is there any chance to add this patch to sources? so it will appear in distros 
;)

Original comment by Kice...@gmail.com on 20 Jun 2011 at 6:23

GoogleCodeExporter commented 9 years ago
Revised patch with most of Fergus' comments handled. Now hosts file supports 
turning off discovery of cpp and/or lzo options announced by distccd.

Original comment by madkinder on 27 Jun 2011 at 10:09

Attachments:

GoogleCodeExporter commented 9 years ago
If distcc is still being developed, I'd like to see this added.

Though no comments since 2011 isn't a good sign :(

Original comment by stevenho...@gmail.com on 17 Aug 2014 at 2:25