/[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.32 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.32 2006/01/25 09:16:29 neysx 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
28<abstract> 28<abstract>
29This document serves as a HOWTO for using distcc with Gentoo. 29This document serves as a HOWTO for using distcc with Gentoo.
30</abstract> 30</abstract>
31 31
32<!-- 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 -->
33<!-- See http://creativecommons.org/licenses/by-sa/1.0 --> 33<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
34<license/> 34<license/>
35 35
36<version>1.13</version> 36<version>1.19</version>
37<date>2006-01-25</date> 37<date>2007-06-22</date>
38 38
39<chapter> 39<chapter>
40<title>Introduction</title> 40<title>Introduction</title>
41<section> 41<section>
42<title>What is distcc?</title> 42<title>What is distcc?</title>
99 99
100<pre caption="Installing distcc"> 100<pre caption="Installing distcc">
101# <i>emerge distcc</i> 101# <i>emerge distcc</i>
102</pre> 102</pre>
103 103
104<impo>
105Remember, you must be sure to install distcc on all of your participating
106machines.
107</impo>
108
104</body> 109</body>
105</section> 110</section>
106<section> 111<section>
107<title>Setting up Portage to use Distcc</title> 112<title>Setting up Portage to use Distcc</title>
108<body> 113<body>
111Setting 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
112each system that should participate in the distributed compiling: 117each system that should participate in the distributed compiling:
113</p> 118</p>
114 119
115<pre caption="Integrating Distcc and Portage"> 120<pre caption="Integrating Distcc and Portage">
116# <i>emerge distcc</i> 121# <i>emerge distcc distcc-config</i>
117# <i>nano -w /etc/make.conf</i> 122# <i>nano -w /etc/make.conf</i>
118<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>
119<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>
120available)</comment>
121MAKEOPTS="-jN" 125MAKEOPTS="-jN"
122<comment>(Add distcc to your FEATURES)</comment> 126<comment>(Add distcc to your FEATURES)</comment>
123FEATURES="distcc" 127FEATURES="distcc"
124</pre> 128</pre>
125 129
207the ccache part: 211the ccache part:
208</p> 212</p>
209 213
210<pre caption="Setting your path"> 214<pre caption="Setting your path">
211# <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>
212<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
213set every time you log in</comment> 217set every time you log in)</comment>
214</pre> 218</pre>
215 219
216<p> 220<p>
217Then, 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>
218(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
244<chapter id="bootstrapping"> 248<chapter id="bootstrapping">
245<title>Using Distcc to Bootstrap</title> 249<title>Using Distcc to Bootstrap</title>
246<section> 250<section>
247<title>Step 1: Configure Portage</title> 251<title>Step 1: Configure Portage</title>
248<body> 252<body>
249 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-->
250<p> 257<p>
251Boot 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
252link="/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
253up until the bootstrapping part. Then configure Portage to use distcc: 262bootstrapping.) Then configure Portage to use distcc:
254</p> 263</p>
255 264
256<pre caption="Preliminary Setup"> 265<pre caption="Preliminary Setup">
257# <i>nano -w /etc/make.conf</i> 266# <i>nano -w /etc/make.conf</i>
258<comment>(Add distcc to the FEATURES</comment> 267<comment>(Add distcc to the FEATURES</comment>
271<section> 280<section>
272<title>Step 2: Getting Distcc</title> 281<title>Step 2: Getting Distcc</title>
273<body> 282<body>
274 283
275<p> 284<p>
276Before the installation of distcc, a user called distcc must be added to the
277<path>/etc/passwd</path>:
278</p>
279
280<pre caption="Create user distcc">
281# <i>echo "distcc:x:240:2:distccd:/dev/null:/bin/false" &gt;&gt;/etc/passwd</i>
282</pre>
283
284<impo>
285It is important to note that adding users like this is very bad. We only do
286it here because there is no <c>useradd</c> utility (which you normally use for
287adding users) yet at this stage of installation.
288</impo>
289
290<p>
291Install distcc: 285Install distcc:
292</p> 286</p>
293 287
294<pre caption="Getting Distcc on the new box"> 288<pre caption="Getting Distcc on the new box">
295# <i>USE='-*' emerge --nodeps sys-devel/distcc</i> 289# <i>USE='-*' emerge --nodeps sys-devel/distcc sys-devel/distcc-config</i>
296</pre> 290</pre>
297 291
298</body> 292</body>
299</section> 293</section>
300<section> 294<section>
331</chapter> 325</chapter>
332 326
333<chapter> 327<chapter>
334<title>Troubleshooting</title> 328<title>Troubleshooting</title>
335<section> 329<section>
336<title>Mozilla and Xfree</title> 330<title>Some Packages Don't Use Distcc</title>
337<body> 331<body>
338 332
339<p> 333<p>
340As 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
341distributed (and aren't being built in parallel). This is because the 335distributed (and aren't being built in parallel). This may happen because the
342developers of the Mozilla and Xfree ebuilds intentionally disable parallel 336package's Makefile doesn't support parallel operations or the maintainer of the
343building because it is known to cause problems. 337ebuild has explicitly disabled parallel operations due to a known problem.
344</p> 338</p>
345 339
346<p> 340<p>
347Sometimes 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
348for 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.
349</p>
350
351</body>
352</section>
353<section>
354<title>A Mixture of hardened-gcc and non-hardened-gcc Hosts Will Be Faulty</title>
355<body>
356
357<p>
358With such a long title any explanation here is almost irrelevent. However, if
359you plan to use distcc across hosts that have the <uri
360link="/proj/en/hardened/etdyn-ssp.xml">PaX/hardened-gcc</uri> and some that do
361not, you will run into problems.
362</p>
363
364<p>
365The solution requires a little foresight on your part; you have to run
366<c>hardened-gcc -R</c> on the host that has PaX/hardened-gcc, or you have to
367enable PaX protections in your kernel and <c>emerge hardened-gcc</c>. Both of
368which are a good thing to do since for the most part the protections offered
369by both packages is a good thing and is transparent to the user.
370</p> 343</p>
371 344
372</body> 345</body>
373</section> 346</section>
374<section> 347<section>

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

  ViewVC Help
Powered by ViewVC 1.1.20