レナート   PANIKRAUM mit PUMPGUN   ﻟﻴﻨﺎﺭﺕ

Sun, 30 Dec 2007

Avahi/Zeroconf patch for distcc updated

I finally found them time to sit down and update my venerable Avahi/Zeroconf patch for distcc. A patched distcc automatically discovers suitable compiler servers on the local network, without the need to manually configure them. (Announcement).

Here's a quick HOWTO for using a patched distcc like this:

If this doesn't work for you than it is a good idea to run distcc --show-hosts to get a list of discovered distcc servers. If this list isn't complete then this is most likely due to mismatching GCC versions or architectures. To check if that's the case use avahi-browse -r _distcc._tcp and compare the values of the cc_machine and cc_version fields. Please note that different Linux distributions use different GCC machine strings. Which is expected since GCC is usually patched quite a bit on the different distributions. This means that a Fedora distcc (the client) will not find a Debian distccd (the server) and vice versa. But again: that's a feature, not a bug.

The new -j and --show-hosts options for distcc are useful for non-zeroconf setups, too.

The patch will automatically discover the number of CPUs on remote machines and make use of that information to better distribute jobs.

In short: Zeroconf support in distcc is totally hot, everyone should have it!

For more information have a look on the announcement of my original patch from 2004 (at that time for the historic HOWL Zeroconf daemon), or read the new announcement linked above.

Distribution packagers! Please merge this new patch into your packages! It would be a pity to withhold Zeroconf support in distcc from your users any longer!

Unfortunately, Fedora doesn't include any distcc packages. Someone should be changing that (who's not me ;-)).

You like this patch? Then give me a kudo on ohloh.net. Now that I earned a golden 10 (after kicking Larry Ewing from position 64. Ha, take that Mr. Ewing!), I need to make sure I don't fall into silver oblivion again. ;-)

posted at: 17:51 | path: /projects | permanent link to this entry | 11 comments


Posted by Matt Domsch at Sun Dec 30 20:52:55 2007
The Fedora package is still under review:
https://bugzilla.redhat.com/show_bug.cgi?id=174883

You might add to that bug your patch request.

Posted by Lennart at Sun Dec 30 21:39:04 2007
Matt: Done

Posted by Denis at Mon Dec 31 09:53:17 2007
> Unfortunately, Fedora doesn't include any distcc
> packages. Someone should be changing that
> (who's not me ;-)).

And why is that ? :-)

distcc is stuck in a review deadlock, essentially the submitted ticket is unreviewable because of the low quality of the submitted package, and submitter unwilling to do anything about it. It might be worth submitting a competing review, taking it to Fesco if need be.

Posted by Michael Brown at Mon Dec 31 20:42:41 2007
Why isnt this patch in upstream distcc?

Posted by Mark at Fri Jan 4 11:29:11 2008
How does this patch handle multiple clients compiling on multiple servers? Does it load balance?

Posted by Gilles Dartiguelongue at Sun Jan 6 00:41:49 2008
Patch has been applied in gentoo afaics. It seems there is a problem with IPv6 address parsing though.

Posted by Lennart at Fri Jan 11 18:49:37 2008
Mark: this patch doesn't do load balance. distcc does that anyway, hence there is no need for my patch to do this.

Posted by Lennart at Fri Jan 11 18:50:19 2008
Michael: Because distcc upstream is kind of dead. I've posted it on the mailing however.

Posted by Christoph Brill at Fri Jan 18 11:32:59 2008
Is it possible that a distcc server announces several supported compilers? I got a server up and running that supports x86_64-pc-linux-gnu and i686-pc-linux-gnu as compile targest.

Posted by Lennart at Fri Jan 18 14:52:47 2008
Christoph: No, that's not supported with the current code. But you're of course welcome to hack new code up for this.

Posted by denis at Fri Feb 22 12:22:04 2008
Lennart, I gave your patch a try on the new distcc review ticket (433228).

Leave a Comment:

Your Name:


Your E-mail (optional):


Comment:


As a protection against comment spam, please type the following number into the field on the right:
Secret Number Image

Please note that this is neither a support forum nor a bug tracker! Support questions or bug reports posted here will be ignored and not responded to!


It should be obvious but in case it isn't: the opinions reflected here are my own. They are not the views of my employer, or Ronald McDonald, or anyone else.

Please note that I take the liberty to delete any comments posted here that I deem inappropriate, off-topic, or insulting. And I excercise this liberty quite agressively. So yes, if you comment here, I might censor you. If you don't want to be censored your are welcome to comment on your own blog instead.


Lennart Poettering <mzoybt (at) 0pointer (dot) net>
Syndicated on Planet GNOME, Planet Fedora, planet.freedesktop.org, Planet Debian Upstream. feed RSS 0.91, RSS 2.0
Archives: 2005, 2006, 2007, 2008, 2009, 2010, 2011

Valid XHTML 1.0 Strict!   Valid CSS!