/[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.28 Revision 1.40
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.28 2005/07/01 22:42:42 smithj Exp $ --> 3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/distcc.xml,v 1.40 2007/06/21 23:46:16 rane 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
13<author title="Editor"> 12<author title="Editor">
14 <mail link="vapier@gentoo.org">Mike Frysinger</mail> 13 <mail link="vapier@gentoo.org">Mike Frysinger</mail>
15</author> 14</author>
16
17<author title="Editor"> 15<author title="Editor">
18 <mail link="erwin@gentoo.org">Erwin</mail> 16 <mail link="erwin@gentoo.org">Erwin</mail>
19</author> 17</author>
20
21<author title="Editor"> 18<author title="Editor">
22 <mail link="swift@gentoo.org">Sven Vermeulen</mail> 19 <mail link="swift@gentoo.org">Sven Vermeulen</mail>
23</author> 20</author>
24
25<author title="Editor"> 21<author title="Editor">
26 <mail link="pylon@gentoo.org">Lars Weiler</mail> 22 <mail link="pylon@gentoo.org">Lars Weiler</mail>
27</author> 23</author>
28
29<author title="Reviewer"> 24<author title="Reviewer">
30 <mail link="blubber@gentoo.org">Tiemo Kieft</mail> 25 <mail link="blubber@gentoo.org">Tiemo Kieft</mail>
31</author> 26</author>
32 27
33<abstract> 28<abstract>
34This document serves as a HOWTO for using distcc with Gentoo. 29This document serves as a HOWTO for using distcc with Gentoo.
35</abstract> 30</abstract>
36 31
37<!-- The content of this document is licensed under the CC-BY-SA license --> 32<!-- The content of this document is licensed under the CC-BY-SA license -->
38<!-- See http://creativecommons.org/licenses/by-sa/1.0 --> 33<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
39<license/> 34<license/>
40 35
41<version>1.13</version> 36<version>1.19</version>
42<date>2005-07-01</date> 37<date>2007-06-22</date>
43 38
44<chapter> 39<chapter>
45<title>Introduction</title> 40<title>Introduction</title>
46<section> 41<section>
47<title>What is distcc?</title> 42<title>What is distcc?</title>
104 99
105<pre caption="Installing distcc"> 100<pre caption="Installing distcc">
106# <i>emerge distcc</i> 101# <i>emerge distcc</i>
107</pre> 102</pre>
108 103
104<impo>
105Remember, you must be sure to install distcc on all of your participating
106machines.
107</impo>
108
109</body> 109</body>
110</section> 110</section>
111<section> 111<section>
112<title>Setting up Portage to use Distcc</title> 112<title>Setting up Portage to use Distcc</title>
113<body> 113<body>
116Setting up Portage to use distcc is easy. Execute the following steps on 116Setting up Portage to use distcc is easy. Execute the following steps on
117each system that should participate in the distributed compiling: 117each system that should participate in the distributed compiling:
118</p> 118</p>
119 119
120<pre caption="Integrating Distcc and Portage"> 120<pre caption="Integrating Distcc and Portage">
121# <i>emerge distcc</i> 121# <i>emerge distcc distcc-config</i>
122# <i>nano -w /etc/make.conf</i> 122# <i>nano -w /etc/make.conf</i>
123<comment>(Set N to a suitable number for your particular setup)</comment> 123<comment>(Set N to a suitable number for your particular setup)</comment>
124<comment>(A common strategy is setting N as twice the number of total CPUs + 1 124<comment>(A common strategy is setting N as twice the number of total CPUs + 1 available)</comment>
125available)</comment>
126MAKEOPTS="-jN" 125MAKEOPTS="-jN"
127<comment>(Add distcc to your FEATURES)</comment> 126<comment>(Add distcc to your FEATURES)</comment>
128FEATURES="distcc" 127FEATURES="distcc"
129</pre> 128</pre>
130 129
181link="http://distcc.samba.org/security.html">Distcc Security Design</uri>. 180link="http://distcc.samba.org/security.html">Distcc Security Design</uri>.
182</p> 181</p>
183 182
184<impo> 183<impo>
185It is important to use --allow and --listen. Please read the distccd manpage 184It is important to use --allow and --listen. Please read the distccd manpage
186or the above seurity document for more information. 185or the above security document for more information.
187</impo> 186</impo>
188 187
189 188
190<p> 189<p>
191Now start the distcc daemon on all the participating computers: 190Now start the distcc daemon on all the participating computers:
212the ccache part: 211the ccache part:
213</p> 212</p>
214 213
215<pre caption="Setting your path"> 214<pre caption="Setting your path">
216# <i>export PATH="/usr/lib/ccache/bin:/usr/lib/distcc/bin:${PATH}"</i> 215# <i>export PATH="/usr/lib/ccache/bin:/usr/lib/distcc/bin:${PATH}"</i>
217<comment>You can put this in your .bashrc or equivelant file to have the PATH 216<comment>(You can put this in your ~/.bashrc or equivalent file to have the PATH
218set every time you log in</comment> 217set every time you log in)</comment>
219</pre> 218</pre>
220 219
221<p> 220<p>
222Then, as you would normally type <c>make</c>, you would type <c>make -jN</c> 221Then, as you would normally type <c>make</c>, you would type <c>make -jN</c>
223(where N is an integer). The value of N depends on your network and the types 222(where N is an integer). The value of N depends on your network and the types
230</chapter> 229</chapter>
231 230
232<chapter> 231<chapter>
233<title>Cross-Compiling</title> 232<title>Cross-Compiling</title>
234<section> 233<section>
235<title>A Note on Cross-Compiling</title>
236<body> 234<body>
237 235
238<p> 236<p>
239Cross-compiling is using one architecture to build programs for another 237Cross-compiling is using one architecture to build programs for another
240architecture. This can be as simple as using an Athlon (i686) to build a 238architecture. This can be as simple as using an Athlon (i686) to build a
241program for a K6-2 (i586), or using a Sparc to build a program for a ppc. 239program for a K6-2 (i586), or using a Sparc to build a program for a ppc. This
242</p> 240is documented in our <uri link="/doc/en/cross-compiling-distcc.xml">DistCC
243 241Cross-compiling Guide</uri>.
244</body>
245</section>
246<section>
247<title>An Introduction to Cross-Compiling</title>
248<body>
249
250<p>
251If you want to give cross-compiling a try you can to follow <uri
252link="http://dev.gentoo.org/~vapier/CROSS-COMPILE-HOWTO">The Cross Compile
253HOWTO</uri>; Crossdev is deprecated.
254</p> 242</p>
255 243
256</body> 244</body>
257</section> 245</section>
258</chapter> 246</chapter>
260<chapter id="bootstrapping"> 248<chapter id="bootstrapping">
261<title>Using Distcc to Bootstrap</title> 249<title>Using Distcc to Bootstrap</title>
262<section> 250<section>
263<title>Step 1: Configure Portage</title> 251<title>Step 1: Configure Portage</title>
264<body> 252<body>
265 253<!--
254Note that this will need to become a link to the old 2005.1 networked handbooks
255once the 2006.0 handbooks are released. Until then, the link can stay.
256-->
266<p> 257<p>
267Boot your new box with a Gentoo Linux LiveCD and follow the <uri 258Boot your new box with a Gentoo Linux LiveCD and follow the <uri
268link="/doc/en/handbook/handbook-x86.xml?part=1">installation instructions</uri> 259link="/doc/en/handbook/handbook-x86.xml?part=1">installation instructions</uri>
260up until the bootstrapping part. (See the <uri
261link="/doc/en/faq.xml#stage12">Gentoo FAQ</uri> for more information about
269up until the bootstrapping part. Then configure Portage to use distcc: 262bootstrapping.) Then configure Portage to use distcc:
270</p> 263</p>
271 264
272<pre caption="Preliminary Setup"> 265<pre caption="Preliminary Setup">
273# <i>nano -w /etc/make.conf</i> 266# <i>nano -w /etc/make.conf</i>
274<comment>(Add distcc to the FEATURES</comment> 267<comment>(Add distcc to the FEATURES</comment>
287<section> 280<section>
288<title>Step 2: Getting Distcc</title> 281<title>Step 2: Getting Distcc</title>
289<body> 282<body>
290 283
291<p> 284<p>
292Before the installation of distcc, a user called distcc must be added to the
293<path>/etc/passwd</path>:
294</p>
295
296<pre caption="Create user distcc">
297# <i>echo "distcc:x:240:2:distccd:/dev/null:/bin/false" &gt;&gt;/etc/passwd</i>
298</pre>
299
300<impo>
301It is important to note that adding users like this is very bad. We only do
302it here because there is no <c>useradd</c> utility (which you normally use for
303adding users) yet at this stage of installation.
304</impo>
305
306<p>
307Install distcc: 285Install distcc:
308</p> 286</p>
309 287
310<pre caption="Getting Distcc on the new box"> 288<pre caption="Getting Distcc on the new box">
311# <i>USE='-*' emerge --nodeps sys-devel/distcc</i> 289# <i>USE='-*' emerge --nodeps sys-devel/distcc sys-devel/distcc-config</i>
312</pre> 290</pre>
313 291
314</body> 292</body>
315</section> 293</section>
316<section> 294<section>
325<comment>(Substitute host1, host2, ... with the IP number(s) of the 303<comment>(Substitute host1, host2, ... with the IP number(s) of the
326participating hosts)</comment> 304participating hosts)</comment>
327# <i>/usr/bin/distcc-config --set-hosts "localhost host1 host2 host3 ..."</i> 305# <i>/usr/bin/distcc-config --set-hosts "localhost host1 host2 host3 ..."</i>
328<comment>An example: <i>/usr/bin/distcc-config --set-hosts "localhost 306<comment>An example: <i>/usr/bin/distcc-config --set-hosts "localhost
329192.168.0.4 192.168.0.6"</i></comment> 307192.168.0.4 192.168.0.6"</i></comment>
330</pre> 308</pre>
331 309
332<p> 310<p>
333Distcc is now set up to bootstrap! Continue with the official installation 311Distcc is now set up to bootstrap! Continue with the official installation
334instructions and <e>do not forget</e> to re-emerge distcc after <c>emerge 312instructions and <e>do not forget</e> to re-emerge distcc after <c>emerge
335system</c>. This is to make sure that all of the dependencies you want are 313system</c>. This is to make sure that all of the dependencies you want are
347</chapter> 325</chapter>
348 326
349<chapter> 327<chapter>
350<title>Troubleshooting</title> 328<title>Troubleshooting</title>
351<section> 329<section>
352<title>Mozilla and Xfree</title> 330<title>Some Packages Don't Use Distcc</title>
353<body> 331<body>
354 332
355<p> 333<p>
356As you emerge various packages, you'll notice that some of them aren't being 334As you emerge various packages, you'll notice that some of them aren't being
357distributed (and aren't being built in parallel). This is because the 335distributed (and aren't being built in parallel). This may happen because the
358developers of the Mozilla and Xfree ebuilds intentionally disable parallel 336package's Makefile doesn't support parallel operations or the maintainer of the
359building because it is known to cause problems. 337ebuild has explicitly disabled parallel operations due to a known problem.
360</p> 338</p>
361 339
362<p> 340<p>
363Sometimes distcc might cause a package to fail to compile. If this happens 341Sometimes distcc might cause a package to fail to compile. If this happens
364for you, please <uri link="http://bugs.gentoo.org">report</uri> it to us. 342for you, please <uri link="http://bugs.gentoo.org">report</uri> it to us.
365</p>
366
367</body>
368</section>
369<section>
370<title>A Mixture of hardened-gcc and non-hardened-gcc Hosts Will Be Faulty</title>
371<body>
372
373<p>
374With such a long title any explanation here is almost irrelevent. However, if
375you plan to use distcc across hosts that have the <uri
376link="/proj/en/hardened/etdyn-ssp.xml">PaX/hardened-gcc</uri> and some that do
377not, you will run into problems.
378</p>
379
380<p>
381The solution requires a little foresight on your part; you have to run
382<c>hardened-gcc -R</c> on the host that has PaX/hardened-gcc, or you have to
383enable PaX protections in your kernel and <c>emerge hardened-gcc</c>. Both of
384which are a good thing to do since for the most part the protections offered
385by both packages is a good thing and is transparent to the user.
386</p> 343</p>
387 344
388</body> 345</body>
389</section> 346</section>
390<section> 347<section>

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.40

  ViewVC Help
Powered by ViewVC 1.1.20