/[gentoo]/xml/htdocs/doc/en/distcc.xml
Gentoo

Diff of /xml/htdocs/doc/en/distcc.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.11 Revision 1.12
1<?xml version='1.0' encoding="UTF-8"?> 1<?xml version='1.0' encoding="UTF-8"?>
2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/distcc.xml,v 1.11 2003/11/29 09:45:07 swift Exp $ --> 3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/distcc.xml,v 1.12 2004/01/09 20:48:14 swift Exp $ -->
4 4
5<guide link="/doc/en/distcc.xml"> 5<guide link="/doc/en/distcc.xml">
6 6
7<title>Gentoo Distcc Documentation</title> 7<title>Gentoo Distcc Documentation</title>
8 8
9<author title="Author"> 9<author title="Author">
10 <mail link="lisa@gentoo.org">Lisa Seelye</mail> 10 <mail link="lisa@gentoo.org">Lisa Seelye</mail>
11</author> 11</author>
12<author title="Editor"> 12<author title="Editor">
13 <mail link="vapier@gentoo.org">Mike Frysinger</mail> 13 <mail link="vapier@gentoo.org">Mike Frysinger</mail>
14</author> 14</author>
15<author title="Editor"> 15<author title="Editor">
16 <mail link="erwin@gentoo.org">Erwin</mail> 16 <mail link="erwin@gentoo.org">Erwin</mail>
17</author> 17</author>
18<author title="Reviewer"> 18<author title="Reviewer">
19 <mail link="swift@gentoo.org">Sven Vermeulen</mail> 19 <mail link="swift@gentoo.org">Sven Vermeulen</mail>
20</author> 20</author>
21<author title="Reviewer"> 21<author title="Reviewer">
22 <mail link="blubber@gentoo.org">Tiemo Kieft</mail> 22 <mail link="blubber@gentoo.org">Tiemo Kieft</mail>
23</author> 23</author>
24 24
25<license/> 25<license/>
26 26
27<version>1.2.5</version> 27<version>1.3</version>
28<date>November 29, 2003</date> 28<date>January 9, 2004</date>
29 29
30<abstract> 30<abstract>
31This document serves as a HOWTO for using distcc with Gentoo. 31This document serves as a HOWTO for using distcc with Gentoo.
32</abstract> 32</abstract>
33 33
34<chapter> 34<chapter>
35<title>Introduction</title> 35<title>Introduction</title>
36<section> 36<section>
37<title>What is distcc?</title> 37<title>What is distcc?</title>
38<body> 38<body>
39 39
40<p> 40<p>
41Distcc is a program designed to distribute compiling tasks across a network to 41Distcc is a program designed to distribute compiling tasks across a network to
42participating hosts. It is comprised of a server, <c>distccd</c> and a client 42participating hosts. It is comprised of a server, <c>distccd</c> and a client
43program, <c>distcc</c>. Distcc can work transparently with <uri 43program, <c>distcc</c>. Distcc can work transparently with <uri
113# <i>emerge distcc</i> 113# <i>emerge distcc</i>
114# <i>nano -w /etc/make.conf</i> 114# <i>nano -w /etc/make.conf</i>
115</pre> 115</pre>
116 116
117<impo> 117<impo>
118If you use distcc-2.11.1 or greater with &gt;=portage-2.0.49-r6, then all you 118If you use distcc-2.11.1 or greater with &gt;=portage-2.0.49-r6, then all you
119need to do as far as setup is to set your hosts (see next code block), modify 119need to do as far as setup is to set your hosts (see next code block), modify
120MAKEOPTS in <path>/etc/make.conf</path>, and add 'distcc' to FEATURES in 120MAKEOPTS in <path>/etc/make.conf</path>, and add 'distcc' to FEATURES in
121<path>/etc/make.conf</path>. 121<path>/etc/make.conf</path>.
122</impo> 122</impo>
123 123
124<note> 124<note>
125Edit your FEATURES flags to include &quot;distcc&quot; 125Edit your FEATURES flags to include &quot;distcc&quot;
126</note> 126</note>
127 127
128<note>
129You should also uncomment the PORTAGE_TMPDIR line in
130<path>/etc/make.conf</path>.
131</note>
132
133<note>
134Set <c>DISTCC_DIR=${PORTAGE_TMPDIR}/portage/.distcc</c> near the end of the file
135(last line is okay).
136</note>
137
138<p> 128<p>
139Next you have to specify what hosts you want to use. To do this you can use 129Next you have to specify what hosts you want to use. To do this you can use
140the <c>distcc-config</c> command to set the list of hosts. Here is an example 130the <c>distcc-config</c> command to set the list of hosts. Here is an example
141of some hosts that might be in your list: 131of some hosts that might be in your list:
142</p> 132</p>
143 133
144<pre caption="Examples of host definitions"> 134<pre caption="Examples of host definitions">
145192.168.0.1 192.168.0.2 192.168.0.3 135192.168.0.1 192.168.0.2 192.168.0.3
146192.168.0.1/2 192.168.0.2 192.168.0.3/10 136192.168.0.1/2 192.168.0.2 192.168.0.3/10
147192.168.0.1:4000/2 192.168.0.2/1 192.168.0.3:3632/4 137192.168.0.1:4000/2 192.168.0.2/1 192.168.0.3:3632/4
148@192.168.0.1 @192.168.0.2:/usr/bin/distccd 192.168.0.3 138@192.168.0.1 @192.168.0.2:/usr/bin/distccd 192.168.0.3
139<codenote>There are also several other methods of setting up hosts. </codenote>
140<codenote>See the distcc manpage for more details.</codenote>
149</pre> 141</pre>
150 142
151<p> 143<p>
152It may all look complicated, but in most cases a variant of line 1 or 2 will 144It may all look complicated, but in most cases a variant of line 1 or 2 will
153work. An explanation of each line is: Line 1 is just a space-delimited list 145work. An explanation of each line is: Line 1 is just a space-delimited list
154of hosts that will use default everything. Line 2 is a list of hosts that 146of hosts that will use default everything. Line 2 is a list of hosts that
155specifies the maximum number of jobs (by use of the /N) to send that host at 147specifies the maximum number of jobs (by use of the /N) to send that host at
156any given time (specified with the <c>/n</c>). Since most people won't be 148any given time (specified with the <c>/n</c>). Since most people won't be
157using lines 3 or 4, I'll <uri link="http://distcc.samba.org/man/distcc_1.html"> 149using lines 3 or 4, I'll <uri link="http://distcc.samba.org/man/distcc_1.html">
158point you to</uri> the distcc docs for more information. 150point you to</uri> the distcc docs for more information.
159</p> 151</p>
160 152
161<p> 153<p>
162A sample command to set the hosts (for line 1) is: 154A sample command to set the hosts (for line 1) is:
163</p> 155</p>
170The final step to integrating distcc into Portage is to re-open your 162The final step to integrating distcc into Portage is to re-open your
171<path>/etc/make.conf</path> and edit <c>MAKEOPTS</c> to include <c>-jN</c> 163<path>/etc/make.conf</path> and edit <c>MAKEOPTS</c> to include <c>-jN</c>
172(where N is an integer). Typically you will want to set this to the total 164(where N is an integer). Typically you will want to set this to the total
173number of processors in your network plus one. 165number of processors in your network plus one.
174</p> 166</p>
175 167
176<pre caption="Final steps in make.conf"> 168<pre caption="Final steps in make.conf">
177# <i>nano -w /etc/make.conf</i> 169# <i>nano -w /etc/make.conf</i>
178MAKEOPTS=-jN 170MAKEOPTS=-jN
179</pre> 171</pre>
180 172
181<impo> 173<impo>
182Don't forget to start the distcc daemon! <c>/etc/init.d/distccd start</c> 174Don't forget to start the distcc daemon! <c>/etc/init.d/distccd start</c>
183</impo> 175</impo>
184 176
177<note>
178You will likely have to find a suitable 'N' for your particular setup. Another
179strategy is 2 x #number of CPUs + 1.
180</note>
181
185</body> 182</body>
186</section> 183</section>
187<section> 184<section>
188<title>Setting up Distcc to Work With Automake</title> 185<title>Setting up Distcc to Work With Automake</title>
189<body> 186<body>
190 187
191<p> 188<p>
192This is in some cases easier than the Portage setup. What you have to do is 189This is in some cases easier than the Portage setup. What you have to do is
193update your <c>PATH</c> environmental variable to include 190update your <c>PATH</c> environmental variable to include
194<path>/usr/lib/distcc/bin</path> before where gcc (<path>/usr/bin</path>). 191<path>/usr/lib/distcc/bin</path> before where gcc (<path>/usr/bin</path>).
195However, there is a caveat. If you use ccache you have to put distcc after 192However, there is a caveat. If you use ccache you have to put distcc after
196the ccache part. Like so: 193the ccache part. Like so:
197</p> 194</p>
198 195
199<pre caption="Setting your path"> 196<pre caption="Setting your path">
304 301
305<p> 302<p>
306Now set up distcc itself... 303Now set up distcc itself...
307</p> 304</p>
308 305
309<pre caption="Final distcc setup"> 306<pre caption="Final distcc setup">
310# <i>/usr/bin/distcc-config --install</i> 307# <i>/usr/bin/distcc-config --install</i>
311# <i>/usr/bin/distcc-config --set-hosts "localhost host1 host2 host3 ..."</i> 308# <i>/usr/bin/distcc-config --set-hosts "localhost host1 host2 host3 ..."</i>
312</pre> 309</pre>
313 310
314<p> 311<p>
315distcc should be set up now to bootstrap! Continue the official install guide, 312distcc should be set up now to bootstrap! Continue the official install guide,
316and don't forget to re-emerge distcc after <c>emerge system</c>. 313and don't forget to re-emerge distcc after <c>emerge system</c>.
317</p> 314</p>
318 315
316<note>
317It is important to note that during bootstrap and <c>emerge system</c> distcc
318may not appear to be being used. This is not to be unexpected. Some ebuilds or
319packages do not work well with distcc, so they intentionally disable distcc.
320</note>
321
319</body> 322</body>
320</section> 323</section>
321</chapter> 324</chapter>
322 325
323<chapter> 326<chapter>
324<title>Troubleshooting</title> 327<title>Troubleshooting</title>
325<section> 328<section>
326<title>Mozilla and Xfree</title> 329<title>Mozilla and Xfree</title>
327<body> 330<body>
328 331
329<p> 332<p>
330As you emerge various packages, you'll notice that they aren't being distributed 333As you emerge various packages, you'll notice that they aren't being distributed
331(and indeed aren't being built in parallel). This is because the developers of 334(and indeed aren't being built in parallel). This is because the developers of
332Mozilla and Xfree .ebuilds disabled parallel building because it is known to 335Mozilla and Xfree .ebuilds disabled parallel building because it is known to
333cause problems. This isn't necessarily a distcc problem. 336cause problems. This isn't necessarily a distcc problem.

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.20