Debian Codegraph @

doc/web/index.html

raw
1 <html>
2 <head><title>distcc: a fast, free distributed C/C++ compiler</title>
3 <link rel="SHORTCUT ICON" href="favicon.ico">
4 <link type="text/css" rel="stylesheet" href="distcc-green.css">
5 <link type="text/html" rel="top" href="index.html">
6 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
7 </head>
8 <body vlink="#003300" text="#000000" link="#003300" bgcolor="#ffffff" alink="#336633"><p><table width="100%"><tr><td valign="top"><div class="navbar"><ul>
9 <li><a href="index.html"><b>distcc</b></a></li>
10 <li><a href="http://code.google.com/p/distcc/source/browse/trunk">source</a>
11 <li><a href="http://code.google.com/p/distcc/downloads/list">binaries</a></li>
12 <li><a href="http://distcc.googlecode.com/svn/trunk/NEWS">news</a></li>
13 <li><a href="scenarios.html">scenarios</a></li>
14 <li><a href="results.html">testimonials</a></li>
15 <li><a href="benchmark.html">benchmarks</a></li>
16 <li><a href="security.html">security</a></li>
17 <li><a href="distcc-lca-2004.html">whitepaper</a></li>
18 <li><a href="http://distcc.googlecode.com/svn/trunk/doc/web/man/">Man pages</a></li>
19 <li><a href="faq.html">FAQ</a></li>
20
21 <p>
22 <li><a href="http://code.google.com/p/distcc/issues/list">report a bug</a></li>
23 <li><a href="https://lists.samba.org/mailman/listinfo/distcc">mailing list</a>
24 <ul><li><a href="mailto:[email protected]">post</a></li>
25 <li><a href="http://lists.samba.org/archive/distcc/">archive</a></li>
26 <li><a href="news://news.gmane.org/gmane.comp.compilers.distcc">newsgroup</a></li></ul>
27 </li>
28 <li><a href="http://freshmeat.net/projects/distcc">Freshmeat</a>
29 <ul><li><a href="http://freshmeat.net/subscribe/28140">be notified</a></li></ul>
30 </li>
31
32 <p>
33 <li>related:</li>
34 <ul>
35 <li><a title="How to use distcc and Gentoo" href="http://www.gentoo.org/doc/en/distcc.xml">Gentoo</a></li>
36 <li><a title="Script to ease building cross-compilers and toolchains" href="http://kegel.com/crosstool/">crosstool</a></li>
37 <li><a title="Cache compiler results" href="https://ccache.dev/">ccache</a></li>
38 <li><a title="Centralized control over distcc and ccache" href="http://ccontrol.ozlabs.org/">ccontrol</a></li>
39 <li><a title="Smart job scheduler" href="http://dmucs.sourceforge.net/">dmucs</a></li>
40 </ul>
41 <p><p></td>
42 <td valign="top">
43 <div class="body">
44 <h1 class="title">distcc: a fast, free distributed C/C++ compiler</h1>
45
46 <p align="right"><em>Speed, it seems to me, provides the one genuinely modern pleasure.</em><br> &mdash; Aldous Huxley
47 <p>
48 distcc is a program to distribute builds of C, C++,
49 Objective C or Objective C++ code across several machines on a
50 network. distcc should always generate the same results as a
51 local build, is simple to install and use, and is usually
52 much faster than a local compile.
53
54 <p>
55 distcc does not require all machines to share a filesystem, have
56 synchronized clocks, or to have the same libraries or header
57 files installed. They can even have different processors or
58 operating systems, if cross-compilers are installed.
59
60
61 <blockquote class="quoted"><p>
62 Just wanted to drop you a line to say that we are now using distcc at work and
63 it is excellent. We have a rack of opteron machines that we use for
64 computational tasks and we are now using them as a compile farm to compile
65 our ~1MLOC C++ tree (which can take an hour on a single CPU to recompile if
66 we change certain header files). We tried using Sun's grid engine to do this
67 (we already use it to schedule our computational jobs), but the combination
68 of its polled operation and the overhead of NFS led to little improvement
69 (and greatly stressed our network). With distcc compile times are way down
70 and my productivity has greatly improved; the two best features for me are
71 its low impact on the network and its simplicity.
72
73 <p>
74 Thanks a lot for a great tool! &mdash; Jeremy Barnes
75 </blockquote>
76
77
78 <p><b>60-second instructions:</b></p>
79
80 <ol>
81 <li> For each machine, <a href="http://code.google.com/p/distcc/downloads/list">download distcc</a>
82 unpack, and do
83 <br><tt>./configure &amp;&amp; make &amp;&amp; sudo make install</tt>
84 <li> On each of the servers, run <tt>distccd --daemon</tt>, with
85 <tt>--allow</tt> options to restrict access.
86 <li> Put the names of the servers in your environment:<br>
87 <tt>export DISTCC_POTENTIAL_HOSTS='localhost red green blue'</tt><br>
88 <li> Build! <br>
89 Wrap your build command in the "pump" script
90 and use "distcc" as your C compiler:
91 <br><tt>cd ~/work/myproject; pump make -j8 CC=distcc</tt>
92 </ol>
93
94 <p>
95 For more detailed installation instructions, see the
96 <a href="http://code.google.com/p/distcc/source/browse/trunk/INSTALL">INSTALL</a> file.
97
98 <p align="center">
99 <img alt="Picture of distcc monitor window"
100 src="distccmon-gnome-2003-09-23-01.png"
101 align="center">
102
103 <p>
104
105 distcc is developed on GNU/Linux, but has been reported to work
106 on other systems including FreeBSD, NetBSD, Darwin, Solaris,
107 HP-UX, IRIX, Cygwin and BSD/OS.
108
109 <p>
110 distcc sends the complete preprocessed source code across the
111 network for each job, so all it requires of the volunteer
112 machines is that they be running the <tt>distccd</tt> daemon,
113 and that they have an appropriate compiler installed.
114
115 <p>
116 distcc is not itself a compiler, but rather a front-end to the
117 <a href="http://gcc.gnu.org/">GNU C/C++ compiler (gcc)</a> and <a href="https://clang.llvm.org/">LLVM compiler (clang)</a>. (There
118 is preliminary support for some other compilers but the main focus is
119 gcc.) Almost all gcc options and features work as normal.
120
121 <p>
122 distcc is designed to be used with the <tt>-j</tt> parallel-build
123 feature in <a href="http://www.gnu.org/software/make/make.html">GNU Make</a>
124 or <a href="http://www.scons.org/">SCons</a>,
125 or other build tools.
126 Shipping files across the network takes
127 time, but few cycles on the client machine. Any files that can
128 be built remotely are essentially "for free" in terms of client
129 CPU.
130
131 <p>
132 distcc has been under development since early 2002. It reliably
133 and successfully compiles large, complex free and proprietary
134 software systems. Programs known to build correctly with distcc
135 include
136 the <a href="http://kernel.org/">Linux kernel</a>,
137 <a href="http://rsync.samba.org/">rsync</a>,
138 <a href="http://www.kde.org/">KDE</a>,
139 <a href="http://www.gnome.org">GNOME</a> (via
140 <a href="http://www.gnome.org/~jdub/garnome/">GARNOME</a>),
141 <a href="http://www.samba.org/">Samba</a> and
142 <a href="http://www.ethereal.com/">Ethereal</a>.
143
144 <p>
145 distcc is nearly linearly scalable for small numbers of
146 machines: Building Linux 2.4.19 on a single 1700MHz Pentium IV
147 machine with distcc 0.15 takes 6 minutes, 45 seconds. Using
148 distcc across three such machines on a 100Mbps switch takes only
149 2 minutes, 30 seconds: <b>2.6x faster</b>. The (unreachable)
150 theoretical maximum speedup is 3.0x, so in this case distcc
151 scales with 89% efficiency.
152
153 <p>
154 You don't need a lot of machines to benefit: <a href="scenarios.html">a laptop and a single desktop is much faster than a laptop alone</a>.
155
156 <p>
157 There are several tools available separately that
158 enhance or complement distcc:
159
160 <ul>
161 <li>
162 <a href="https://ccache.dev/">ccache</a>
163 caches compiler output to accelerate builds.
164 <li>
165 <a href="http://dmucs.sourceforge.net/">dmucs</a> helps distcc select
166 appropriate servers.
167
168 <li>
169 <a href="http://ccontrol.ozlabs.org/">ccontrol</a>
170 gives centralized control of parallelism, caching and distribution
171 even while the build is running.
172
173
174 <li>
175 <a href="http://kegel.com/crosstool/">crosstool</a>
176 automates building cross-compilation toolchains.
177
178 <li><a href="http://research.edm.uhasselt.be/tvanlaerhoven/#distccWebView">distccWebView</a> is a CGI to show which of your
179 servers are up and running.
180
181 <li>
182 <a href="http://www.snookles.com/erlang/tcpbalance/">tcpbalance</a>
183 is a load-balancing TCP proxy written in Erlang that works well with
184 distcc.
185
186 </ul>
187
188 </tr></table>
189 <div class="thanks">Copyright &copy; 2002&ndash;2004, 2006 Martin Pool.
190 <p>Send comments to <tt>distcc(at)lists.samba.org</tt>
191 </html>