/[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.21 Revision 1.22
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.21 2004/07/28 14:38:25 swift Exp $ --> 3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/distcc.xml,v 1.22 2004/08/22 20:51:08 neysx Exp $ -->
4
5<!--
6 Synchronised with rev 1.15 on
7 http://www.thedoh.com/viewcvs/distcc/html/distcc.xml
8-->
9 4
10<guide link="/doc/en/distcc.xml"> 5<guide link="/doc/en/distcc.xml">
11 6
12<title>Gentoo Distcc Documentation</title> 7<title>Gentoo Distcc Documentation</title>
13 8
41 36
42<!-- The content of this document is licensed under the CC-BY-SA license --> 37<!-- The content of this document is licensed under the CC-BY-SA license -->
43<!-- See http://creativecommons.org/licenses/by-sa/1.0 --> 38<!-- See http://creativecommons.org/licenses/by-sa/1.0 -->
44<license/> 39<license/>
45 40
46<version>1.7.2</version> 41<version>1.8</version>
47<date>July 28, 2004</date> 42<date>August 22, 2004</date>
48 43
49<chapter> 44<chapter>
50<title>Introduction</title> 45<title>Introduction</title>
51<section> 46<section>
52<title>What is distcc?</title> 47<title>What is distcc?</title>
122 117
123<pre caption="Integrating Distcc and Portage"> 118<pre caption="Integrating Distcc and Portage">
124# <i>emerge distcc</i> 119# <i>emerge distcc</i>
125# <i>nano -w /etc/make.conf</i> 120# <i>nano -w /etc/make.conf</i>
126<comment>(Set N to a suitable number for your particular setup)</comment> 121<comment>(Set N to a suitable number for your particular setup)</comment>
127<comment>(A common heuristic strategy is twice the number of CPUs + 1)</comment> 122<comment>(A common heuristic strategy is twice the number of total CPUs + 1)</comment>
128MAKEOPTS="-jN" 123MAKEOPTS="-jN"
129<comment>(Add distcc to your FEATURES variable)</comment> 124<comment>(Add distcc to your FEATURES variable)</comment>
130FEATURES="distcc" 125FEATURES="distcc"
131</pre> 126</pre>
132 127
200<pre caption="Setting your path"> 195<pre caption="Setting your path">
201# <i>export PATH="/usr/lib/ccache/bin:/usr/lib/distcc/bin:${PATH}"</i> 196# <i>export PATH="/usr/lib/ccache/bin:/usr/lib/distcc/bin:${PATH}"</i>
202</pre> 197</pre>
203 198
204<p> 199<p>
205Then, as you would normally type <c>make</c>, you would type <c>make -jN</c> 200Then, as you would normally type <c>make</c>, you would type <c>make -jN</c>
206(where N is an integer). The value of N depends on your network and the types 201(where N is an integer). The value of N depends on your network and the types
207of computers you are using to compile. For me, I have a dual processor P3 and 202of computers you are using to compile. For me, I have a dual processor P3 and
208a K6-2/400 that compiles everything for my desktop (a 1200MHz Athlon 203a K6-2/400 that compiles everything for my desktop (a 1200MHz Athlon
209Thunderbird) and I use -j5. Test your own settings to find the most 204Thunderbird) and I use -j5. Test your own settings to find the number that
210performant number. 205yields the best performance.
211</p> 206</p>
212 207
213</body> 208</body>
214</section> 209</section>
215</chapter> 210</chapter>
227</p> 222</p>
228 223
229</body> 224</body>
230</section> 225</section>
231<section> 226<section>
232<title>A Personal Note on Cross-compiling</title> 227<title>An Introduction to Cross-compiling</title>
233<body> 228<body>
234 229
235<p>
236I'd love to be able to help out on the Gentoo Cross-compiling effort, but I
237don't have any non-x86 machines. I can create things that work <e>in
238theory</e>, but I have to rely on other people to test what I write.
239That works to an extent, but it's tough. ;-)
240</p> 230<p>
241 231If you want to give Cross-compiling a try you can emerge the crossdev package.
242<p> 232I can't support it since I didn't write it, but that's a good way to start
243In the near future I hope to acquire a Sparc of some type to put Gentoo on so 233cross-compiling.
244I can play around in-house.
245</p> 234</p>
246 235
247</body> 236</body>
248</section> 237</section>
249</chapter> 238</chapter>
262 251
263<pre caption="Preliminary Setup"> 252<pre caption="Preliminary Setup">
264# <i>nano -w /etc/make.conf</i> 253# <i>nano -w /etc/make.conf</i>
265<comment>(Add distcc to the FEATURES variable)</comment> 254<comment>(Add distcc to the FEATURES variable)</comment>
266FEATURES="distcc" 255FEATURES="distcc"
267<comment>(Set distcc's directory for temporary space)</comment>
268DISTCC_DIR="${PORTAGE_TMPDIR}/.distcc"
269<comment>(Modify MAKEOPTS to include -jN with N an appropriate integer)</comment> 256<comment>(Modify MAKEOPTS to include -jN with N an appropriate integer)</comment>
270MAKEOPTS="-jN" 257MAKEOPTS="-jN"
271</pre> 258</pre>
272 259
260<pre caption="Setting your path">
261# <i>export PATH="/usr/lib/ccache/bin:/usr/lib/distcc/bin:${PATH}"</i>
262</pre>
263
273</body> 264</body>
274</section> 265</section>
275<section> 266<section>
276<title>Step 2: Getting Distcc</title> 267<title>Step 2: Getting Distcc</title>
277<body> 268<body>
278 269
270<p>
279<p>Before the installation of distcc, a user called distcc must be added to the 271Before the installation of distcc, a user called distcc must be added to the
280<path>/etc/passwd</path>:</p> 272<path>/etc/passwd</path>:
273</p>
281 274
282<pre caption="Create user distcc"> 275<pre caption="Create user distcc">
283# <i>echo "distcc:x:240:2:distccd:/dev/null:/bin/false" &gt;&gt; /etc/passwd</i> 276# <i>echo "distcc:x:240:2:distccd:/dev/null:/bin/false" &gt;&gt; /etc/passwd</i>
284</pre> 277</pre>
285 278
302</p> 295</p>
303 296
304<pre caption="Final distcc setup"> 297<pre caption="Final distcc setup">
305<comment>(Substitute host1, host2, ... with the IP number(s) of the participating hosts)</comment> 298<comment>(Substitute host1, host2, ... with the IP number(s) of the participating hosts)</comment>
306# <i>/usr/bin/distcc-config --set-hosts "localhost host1 host2 host3 ..."</i> 299# <i>/usr/bin/distcc-config --set-hosts "localhost host1 host2 host3 ..."</i>
300<comment>An example: <i>/usr/bin/distcc-config --set-hosts "localhost 192.168.0.4 192.168.0.6"</i></comment>
307</pre> 301</pre>
308 302
309<p> 303<p>
310distcc is now set up to bootstrap! Continue the official installation 304distcc is now set up to bootstrap! Continue the official installation
311instructions and <e>don't forget</e> to re-emerge distcc after <c>emerge 305instructions and <e>don't forget</e> to re-emerge distcc after <c>emerge
398and it is quite lovely. 392and it is quite lovely.
399</p> 393</p>
400 394
401<pre caption="Starting the monitors"> 395<pre caption="Starting the monitors">
402# <i>distccmon-text N</i> 396# <i>distccmon-text N</i>
403<comment>(Or ...)</comment> 397<comment>(Or)</comment>
404# <i>distccmon-gnome</i> 398# <i>distccmon-gnome</i>
405</pre> 399<comment>To monitor Portage's distcc usage you can use:</comment>
406 400# <i>DISTCC_DIR=`portageq envvar DISTCC_DIR` distccmon-text N</i>
407</body> 401<comment>(Or)</comment>
408</section> 402# <i>DISTCC_DIR=`portageq envvar DISTCC_DIR` distccmon-gnome</i>
409</chapter>
410
411<chapter>
412<title>Future Plans for Distcc and Gentoo</title>
413<section>
414<title>distcc-subnetscan</title>
415<body>
416
417<p>
418<c>distcc-subnetscan</c> is a perl program in development that will scan a
419subnet for hosts that have a participating distcc daemon. Even this will be
420enhanced to test if the daemon on a remote host will conform to a specific
421<c>CHOST</c> setting to make cross-compiling easier.
422</p> 403</pre>
423 404
424<p> 405<impo>
425The perl script is being kept at <uri link="http://dev.gentoo.org/~lisa/proj/distcc/distcc-subnetscan/distcc-subnetscan.html">lisa's 406Notice the backticks above. <c>portageq</c> is a part of Portage that will
426dev page</uri> until a more formal home can be found. 407return a piece of information (in this case what DISTCC_DIR is set to). For
427</p> 408simplicity, most users can use <c>DISTCC_DIR=/var/tmp/portage/.distcc
409distccmon-text N</c>
410</impo>
428 411
429</body> 412</body>
430</section> 413</section>
431</chapter> 414</chapter>
432</guide> 415</guide>

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

  ViewVC Help
Powered by ViewVC 1.1.20