/[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.3 Revision 1.4
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.3 2003/09/08 08:09:02 blubber Exp $ --> 3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/distcc.xml,v 1.4 2003/09/13 07:47:57 erwin 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@gentoo.org</mail> 10 <mail link="lisa@gentoo.org">Lisa Seelye</mail>
11</author>
12
13<author title="Editor">
14 <mail link="vapier@gentoo.org">Mike Frysinger</mail>
15</author>
16
17<author title="Editor">
18 <mail link="erwin@gentoo.org">Erwin</mail>
11</author> 19</author>
12 20
13<author title="Reviewer"> 21<author title="Reviewer">
14 <mail link="swift@gentoo.org">swift@gentoo.org</mail> 22 <mail link="swift@gentoo.org">Sven Vermeulen</mail>
15</author> 23</author>
16 24
17<author title="Reviewer"> 25<author title="Reviewer">
18 <mail link="blubber@gentoo.org">blubber@gentoo.org</mail> 26 <mail link="blubber@gentoo.org">Tiemo Kieft</mail>
19</author> 27</author>
20 28
21<version>1.1</version> 29<version>1.1</version>
22<date>September 08, 2003</date> 30<date>September 13, 2003</date>
23 31
24<abstract>This document serves as a HOWTO for using distcc with Gentoo.</abstract> 32<abstract>This document serves as a HOWTO for using distcc with Gentoo.</abstract>
25 33
26<chapter> 34<chapter>
27 <title>Introduction</title> 35 <title>Introduction</title>
31 <p>Distcc is a program designed to distribute compiling tasks across a network to participating hosts. It is comprised of a server, <c>distccd</c> and a client program, <c>distcc</c>. Distcc can work transparently with <uri link="http://ccache.samba.org">ccache</uri> and Portage with a little set up.</p> 39 <p>Distcc is a program designed to distribute compiling tasks across a network to participating hosts. It is comprised of a server, <c>distccd</c> and a client program, <c>distcc</c>. Distcc can work transparently with <uri link="http://ccache.samba.org">ccache</uri> and Portage with a little set up.</p>
32 </body> 40 </body>
33 </section> 41 </section>
34 42
35 <section> 43 <section>
36 <title>Dependancies</title> 44 <title>Dependencies</title>
37 <body> 45 <body>
38 <pre caption="Distcc Dependancies"> 46 <pre caption="Distcc dependencies">
39&gt;=sys-apps/portage-2.0.46-r11 47&gt;=sys-apps/portage-2.0.46-r11
40&gt;=sys-devel/gcc-config-1.3.1 48&gt;=sys-devel/gcc-config-1.3.1
41&gt;sys-apps/shadow 49sys-apps/shadow
42<codenote>(As of version 2.8) And the following optional dependancies when you have <c>gtk</c> in your <c>USE</c> flags</codenote> 50<codenote>(As of version 2.8) And the following optional dependencies when you have <i>gtk</i> in your <i>USE</i> flags</codenote>
43&gt;=x11-libs/gtk+-2.2.1 51&gt;=x11-libs/gtk+-2.2.1
44 </pre> 52 </pre>
45 </body> 53 </body>
46 </section> 54 </section>
47</chapter> 55</chapter>
56# <i>emerge distcc</i> 64# <i>emerge distcc</i>
57# <i>nano -w /etc/make.conf</i> 65# <i>nano -w /etc/make.conf</i>
58<codenote>Edit your FEATURES flags to include &quot;distcc&quot;</codenote> 66<codenote>Edit your FEATURES flags to include &quot;distcc&quot;</codenote>
59 </pre> 67 </pre>
60 68
61 <p>Next you have to specify what hosts you want to use. To do this you can use the <i>distcc-config</i> command to set that list of hosts. Here is an example of some hosts that might be in your list:</p> 69 <p>Next you have to specify what hosts you want to use. To do this you can use the <c>distcc-config</c> command to set the list of hosts. Here is an example of some hosts that might be in your list:</p>
62 <pre caption="Examples of host definitions"> 70 <pre caption="Examples of host definitions">
63192.168.0.1 192.168.0.2 192.168.0.3 71192.168.0.1 192.168.0.2 192.168.0.3
64192.168.0.1/2 192.168.0.2 192.168.0.3/10 72192.168.0.1/2 192.168.0.2 192.168.0.3/10
65192.168.0.1:4000/2 192.168.0.2/1 192.168.0.3:3632/4 73192.168.0.1:4000/2 192.168.0.2/1 192.168.0.3:3632/4
66@192.168.0.1 @192.168.0.2:/usr/bin/distccd 192.168.0.3 74@192.168.0.1 @192.168.0.2:/usr/bin/distccd 192.168.0.3
67 </pre> 75 </pre>
68 <p>It may all look complicated, but in most cases a variant of line 1 or 2 will work. An explanation of each line is: Line 1 is just a space-delimited list of hosts that will use default everything. Line 2 is a list of hosts that specifies the maxmimum number of jobs (by use of the /N) to send that host at any given time (specified with the <c>/n</c>). Since most people won't be using lines 3 or 4, I'll <uri link="http://distcc.samba.org/man/distcc_1.html">point you to</uri> the distcc docs for more information.</p> 76 <p>It may all look complicated, but in most cases a variant of line 1 or 2 will work. An explanation of each line is: Line 1 is just a space-delimited list of hosts that will use default everything. Line 2 is a list of hosts that specifies the maximum number of jobs (by use of the /N) to send that host at any given time (specified with the <c>/n</c>). Since most people won't be using lines 3 or 4, I'll <uri link="http://distcc.samba.org/man/distcc_1.html">point you to</uri> the distcc docs for more information.</p>
69 <p>A sample command to set the hosts (for line 1) is:</p> 77 <p>A sample command to set the hosts (for line 1) is:</p>
70 <pre caption="Sample command to set the hosts"> 78 <pre caption="Sample command to set the hosts">
71# <i>/usr/bin/distcc-config --set-hosts "192.168.0.1 192.168.0.2 192.168.0.3</i> 79# <i>/usr/bin/distcc-config --set-hosts "192.168.0.1 192.168.0.2 192.168.0.3"</i>
72 </pre> 80 </pre>
73 81
74 <p>The final step to integrating distcc into Portage is to re-open your <path>/etc/make.conf</path> and edit <c>MAKE_OPTS</c> to include <c>-jN</c> (where N is an integer). Typically you will want to set this to the total number of processors in your network plus one.</p> 82 <p>The final step to integrating distcc into Portage is to re-open your <path>/etc/make.conf</path> and edit <c>MAKE_OPTS</c> to include <c>-jN</c> (where N is an integer). Typically you will want to set this to the total number of processors in your network plus one.</p>
75 <pre caption="Final steps in make.conf"> 83 <pre caption="Final steps in make.conf">
76# <i>nano -w /etc/make.conf</i> 84# <i>nano -w /etc/make.conf</i>
110<chapter> 118<chapter>
111 <title>Known Problems With Distcc</title> 119 <title>Known Problems With Distcc</title>
112 <section> 120 <section>
113 <title>Portage Doesn't Work With Distcc</title> 121 <title>Portage Doesn't Work With Distcc</title>
114 <body> 122 <body>
115 <p>This heading is a misnomer, really. The only thing that doens't work is the monitoring programs (<c>distccmon-text</c> and <c>distccmon-gnome</c>) with the standard distcc source. The reason for this is that distcc relies on the <c>TMPDIR</c> envvar, but Portage reassigns that.</p> 123 <p>This heading is a misnomer, really. The only thing that doesn't work is the monitoring programs (<c>distccmon-text</c> and <c>distccmon-gnome</c>) with the standard distcc source. The reason for this is that distcc relies on the <c>TMPDIR</c> envvar, but Portage reassigns that.</p>
116 <p>The solution to this is a patch that changes the dependancy to <c>DISTCC_TMPDIR</c>. The patch is automatically applied to distcc. If you don't want to use <path>/tmp</path> (the default) you can reassign <c>DISTCC_TMPDIR</c>.</p> 124 <p>The solution to this is a patch that changes the dependency to <c>DISTCC_TMPDIR</c>. The patch is automatically applied to distcc. If you don't want to use <path>/tmp</path> (the default) you can reassign <c>DISTCC_TMPDIR</c>.</p>
117 <p>You may also notice that Distcc does not work with some packages. This can be a result of several things, such as an error in the .ebuild (Using <c>make</c> instead of <c>emake</c>) or an error in the program's Makefile, which the next section addresses.</p> 125 <p>You may also notice that Distcc does not work with some packages. This can be a result of several things, such as an error in the .ebuild (Using <c>make</c> instead of <c>emake</c>) or an error in the program's Makefile, which the next section addresses.</p>
118 </body> 126 </body>
119 </section> 127 </section>
120 <section> 128 <section>
121 <title>Mozilla and Xfree</title> 129 <title>Mozilla and Xfree</title>
130 <title>Using Distcc to Bootstrap</title> 138 <title>Using Distcc to Bootstrap</title>
131 <section> 139 <section>
132 <title>Step 1: Build the Tarball</title> 140 <title>Step 1: Build the Tarball</title>
133 <body> 141 <body>
134 <p>This section is helpful if you want to use Distcc during the Gentoo installation. Surprisingly it isn't that hard. What you'll need is another computer running Gentoo and a way to transfer a tarball to your new system (I use scp).</p> 142 <p>This section is helpful if you want to use Distcc during the Gentoo installation. Surprisingly it isn't that hard. What you'll need is another computer running Gentoo and a way to transfer a tarball to your new system (I use scp).</p>
135 <p>First you have to build a tarball of Distcc and include a library (<c>/usr/lib/libpopt.so.*</c>).</p> 143 <p>First you have to build a tarball of Distcc and include a library (<path>/usr/lib/libpopt.so.*</path>).</p>
136 <pre caption="Building the tarball"> 144 <pre caption="Building the tarball">
137<i># USE='-gtk -selinux' emerge --buildpkg distcc 145# <i>USE='-gtk -selinux' emerge --buildpkg distcc</i>
138# mkdir -p /tmp/distcc/usr/lib 146# <i>mkdir -p /tmp/distcc/usr/lib</i>
139# cp /usr/portage/packages/sys-devel/distcc-DISTCC_VERSION.tbz2 /tmp/distcc/ 147# <i>cp /usr/portage/packages/sys-devel/distcc-DISTCC_VERSION.tbz2 /tmp/distcc/</i>
140# cp /usr/lib/libpopt.so.* /tmp/distcc/usr/lib 148# <i>cp /usr/lib/libpopt.so.* /tmp/distcc/usr/lib</i>
141# cd /tmp/distcc 149# <i>cd /tmp/distcc</i>
142# tar cfzv distcc.tar.gz *</i> 150# <i>tar cfzv distcc.tar.gz *</i>
143<codenote>Be sure you replace DISTCC_VERSION with the version (and Gentoo revision) of Distcc, <c>like 2.10-r1</c></codenote> 151<codenote>Be sure you replace DISTCC_VERSION with the version (and Gentoo revision) of Distcc, <i>like 2.10-r1</i></codenote>
144 </pre> 152 </pre>
145 </body> 153 </body>
146 </section> 154 </section>
147 <section> 155 <section>
148 <title>Step 2: Setup on New Box</title> 156 <title>Step 2: Setup on New Box</title>
149 <body> 157 <body>
150 <impo>Do not forget to start sshd and reset the root password for the LiveCD!</impo> 158 <impo>Do not forget to start sshd and reset the root password for the LiveCD!</impo>
151 <p>Next, you have to boot your new box with a Gentoo Linux LiveCD and follow all of the steps up until the bootstrapping. Then procede with a little preliminary setup on the new box.</p> 159 <p>Next, you have to boot your new box with a Gentoo Linux LiveCD and follow all of the steps up until the bootstrapping. Then proceed with a little preliminary setup on the new box.</p>
152 <pre caption="Preliminary Setup"> 160 <pre caption="Preliminary Setup">
153<codenote>Here we add distcc to FEATURES</codenote> 161<codenote>Here we add distcc to FEATURES</codenote>
154<i># echo "FEATURES=\"\${FEATURES} distcc\"" >> /etc/make.conf</i> 162# <i>echo "FEATURES=\"\${FEATURES} distcc\"" >> /etc/make.conf</i>
155<codenote>You can also use <c>nano</c> to edit <c>/etc/make.conf</c> and manually add distcc to FEATURES.</codenote> 163<codenote>You can also use <i>nano</i> to edit <path>/etc/make.conf</path> and manually add distcc to FEATURES.</codenote>
156<i># echo "MAKEOPTS=\"\${MAKEOPTS} -jN\"" >> /etc/make.conf</i> 164# <i>echo "MAKEOPTS=\"\${MAKEOPTS} -jN\"" >> /etc/make.conf</i>
157<codenote>Just like above, you can use <c>nano</c> to edit <c>/etc/make.conf</c> and manually change MAKEOPTS.</codenote> 165<codenote>Just like above, you can use <i>nano</i> to edit <path>/etc/make.conf</path> and manually change MAKEOPTS.</codenote>
158 </pre> 166 </pre>
159 <p>Then add the distcc user to your <c>/etc/passwd</c>:</p> 167 <p>Then add the distcc user to your <path>/etc/passwd</path>:</p>
160 <pre caption="Add the distcc user to /etc/passwd"> 168 <pre caption="Add the distcc user to /etc/passwd">
161<i># echo "distcc:x:240:2:distccd:/dev/null:/bin/false" >>/etc/passwd</i> 169# <i>echo "distcc:x:240:2:distccd:/dev/null:/bin/false" >>/etc/passwd</i>
162<codenote>Do not forget the `<c>&gt;&gt;</c>'</codenote> 170<codenote>Do not forget the `<i>&gt;&gt;</i>'</codenote>
163 </pre> 171 </pre>
164 </body> 172 </body>
165 </section> 173 </section>
166 <section> 174 <section>
167 <title>Step 3: Copy the Tarball</title> 175 <title>Step 3: Copy the Tarball</title>
168 <body> 176 <body>
169 <p>Next you will want to copy the distcc tarball that you made.</p> 177 <p>Next you will want to copy the distcc tarball that you made.</p>
170 <pre caption="Copy the tarball to the new box"> 178 <pre caption="Copy the tarball to the new box">
171<codenote>Execute this on the "old" box</codenote> 179<codenote>Execute this on the "old" box</codenote>
172<i># scp /tmp/distcc/distcc.tar.gz root@ip.of.new.box:/mnt/gentoo/</i> 180# <i>scp /tmp/distcc/distcc.tar.gz root@ip.of.new.box:/mnt/gentoo/</i>
173<codenote>Substitute <c>ip.of.new.box</c> for your new box's IP</codenote> 181<codenote>Substitute <i>ip.of.new.box</i> for your new box's IP</codenote>
174 </pre> 182 </pre>
175 </body> 183 </body>
176 </section> 184 </section>
177 185
178 <section> 186 <section>
179 <title>Step 4: Unpacking the Tarball</title> 187 <title>Step 4: Unpacking the Tarball</title>
180 <body> 188 <body>
181 <pre caption="Unpack the tarball"> 189 <pre caption="Unpack the tarball">
182<i># tar xvfz distcc.tar.gz 190# <i>tar xvfz distcc.tar.gz</i>
183# tar xvfjp distcc-DISTCC_VERSION.tbz2</i> 191# <i>tar xvfjp distcc-DISTCC_VERSION.tbz2</i>
184<codenote>Be sure you replace DISTCC_VERSION with the version (and Gentoo revision) of Distcc, <c>like 2.10-r1</c></codenote> 192<codenote>Be sure you replace DISTCC_VERSION with the version (and Gentoo revision) of Distcc, <i>like 2.10-r1</i></codenote>
185 </pre> 193 </pre>
186 </body> 194 </body>
187 </section> 195 </section>
188 196
189 <section> 197 <section>
190 <title>Step 5: Setting Up Distcc Itself</title> 198 <title>Step 5: Setting Up Distcc Itself</title>
191 <body> 199 <body>
192 <p>Now set up distcc itself...</p> 200 <p>Now set up distcc itself...</p>
193 <pre caption="Final distcc setup"> 201 <pre caption="Final distcc setup">
194<i># /usr/bin/distcc-config --install 202# <i>/usr/bin/distcc-config --install</i>
195# /usr/bin/distcc-config --set-hosts "localhost host1 host2 host3 ..."</i> 203# <i>/usr/bin/distcc-config --set-hosts "localhost host1 host2 host3 ..."</i>
196 </pre> 204 </pre>
197 205
198 <p>distcc should be set up now to bootstrap! Continue the official install guide, and dont forget to re-emerge distcc after <c>emerge system</c>.</p> 206 <p>distcc should be set up now to bootstrap! Continue the official install guide, and don't forget to re-emerge distcc after <c>emerge system</c>.</p>
199 </body> 207 </body>
200 </section> 208 </section>
201</chapter> 209</chapter>
202 210
203 211
208 <body> 216 <body>
209 <p>Distcc ships with two monitors. The text-based one is always built, it is called <c>distccmon-text</c>. Running it for the first time can be a bit confusing, but it is really quite easy to use. If you run the program with no parameter it will run once. However, if you pass it a number it will update every N seconds, where N is the argument you passed.</p> 217 <p>Distcc ships with two monitors. The text-based one is always built, it is called <c>distccmon-text</c>. Running it for the first time can be a bit confusing, but it is really quite easy to use. If you run the program with no parameter it will run once. However, if you pass it a number it will update every N seconds, where N is the argument you passed.</p>
210 <p>The other monitor is only turned on if you enabled <c>gtk</c> in your <c>USE</c> flags. This one is GTK+ based and runs in an X environment, and it is quite lovely.</p> 218 <p>The other monitor is only turned on if you enabled <c>gtk</c> in your <c>USE</c> flags. This one is GTK+ based and runs in an X environment, and it is quite lovely.</p>
211 <p>There is a caveat to using these programs. If you want to monitor any emerge, you have to start the monitor like so:</p> 219 <p>There is a caveat to using these programs. If you want to monitor any emerge, you have to start the monitor like so:</p>
212 <pre caption="Starting the monitors"> 220 <pre caption="Starting the monitors">
213<i>sudo -u portage distccmon-text N</i> 221# <i>sudo -u portage distccmon-text N</i>
214<codenote>Or you can start the graphical monitor...</codenote> 222<codenote>Or you can start the graphical monitor...</codenote>
215<i>sudo -u portage distccmon-gnome</i> 223# <i>sudo -u portage distccmon-gnome</i>
216<note>If you aren't using <c>userpriv</c> in your FEATURES, you should not use the '-u portage' part.</note>
217 </pre> 224 </pre>
225 <note>If you aren't using <c>userpriv</c> in your FEATURES, you
226 should not use the '-u portage' part.</note>
218 </body> 227 </body>
219 </section> 228 </section>
220</chapter> 229</chapter>
221 230
222<chapter> 231<chapter>

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.20