/[gentoo]/xml/htdocs/doc/en/handbook/hb-working-features.xml
Gentoo

Contents of /xml/htdocs/doc/en/handbook/hb-working-features.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download) (as text)
Fri Nov 28 07:32:38 2003 UTC (11 years ago) by swift
Branch: MAIN
Changes since 1.2: +30 -6 lines
File MIME type: application/xml
Update

1 swift 1.1 <!-- The content of this document is licensed under the CC-BY-SA license -->
2     <!-- See http://creativecommons.org/licenses/by-sa/1.0 -->
3    
4 swift 1.3 <!-- $Header: /home/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-features.xml,v 1.2 2003/11/26 20:19:59 swift Exp $ -->
5 swift 1.1
6     <sections>
7     <section>
8     <title>DistCC</title>
9     <subsection>
10     <title>What is DistCC?</title>
11     <body>
12    
13 swift 1.2 <p>
14     <c>distcc</c> is a program to distribute compilations across several, not
15     necessarily identical, machines on a network. The <c>distcc</c> client sends all
16     necessary information to the available DistCC servers (running <c>distccd</c>)
17     so they can compile pieces of sourcecode for the client. The net result is a
18     faster compilation time.
19     </p>
20    
21     <p>
22     You can find more elaborate information about <c>distcc</c> (and information on
23     how to have it work with Gentoo) in our <uri link="/doc/en/distcc.xml">Gentoo
24     Distcc Documentation</uri>.
25     </p>
26    
27 swift 1.1 </body>
28     </subsection>
29     <subsection>
30     <title>Installing DistCC</title>
31     <body>
32    
33 swift 1.2 <p>
34     Distcc ships with a graphical monitor to monitor tasks that your computer is
35     sending away for compilation. If you use Gnome then put 'gnome' in your
36     <c>USE</c> setting. However, if you don't use Gnome and would still like to have
37     the monitor then you should put 'gtk' in your <c>USE</c> setting.
38     </p>
39    
40     <p>
41     Installing distcc is, as is with all software available through Gentoo's
42     Portage, extremely easy:
43     </p>
44    
45     <note>
46     From now on, as you now know how to install binary packages if you want, we will
47     omit the <c>--usepkg</c> option throughout the rest of the Gentoo Handbook.
48     </note>
49    
50     <pre caption="Installing Distcc">
51     # <i>emerge distcc</i>
52     </pre>
53    
54 swift 1.1 </body>
55     </subsection>
56     <subsection>
57     <title>Activating Portage Support</title>
58     <body>
59    
60 swift 1.2 <p>
61     Well, if installation is easy, the rest should be easy too :) So let us quickly
62     activate the Portage support for <c>distcc</c>.
63     </p>
64    
65     <p>
66     First, open <path>/etc/make.conf</path> and edit the <c>FEATURES</c> variable so
67     it contains the <c>distcc</c> keyword. Next, edit the <c>MAKEOPTS</c> variable
68 swift 1.3 so it reads <c>-jX</c> with <c>X</c> the number of CPUs that run <c>distccd</c>
69     (including the current host) plus one:
70 swift 1.2 </p>
71    
72     <pre caption="Possible MAKEOPTS setting in /etc/make.conf">
73 swift 1.3 <comment># Suppose you have 2 single-CPU distccd hosts excluding this host:</comment>
74     MAKEOPTS="-j4"
75 swift 1.2 </pre>
76    
77     <p>
78     Now, still inside <path>/etc/make.conf</path>, uncomment the
79     <c>PORTAGE_TMPDIR</c> line and add the following line at the end
80     of the file:
81     </p>
82    
83     <pre caption="Add an extra, distcc-specific variable to /etc/make.conf">
84     <comment># Don't forget to uncomment the PORTAGE_TMPDIR variable</comment>
85     DISTCC_DIR=${PORTAGE_TMPDIR}/portage/.distcc
86     </pre>
87 swift 1.3
88     <p>
89     Now run <c>distcc-config</c> and enter the list of available DistCC servers. For
90     a simple example we assume that the available DistCC servers are
91     <c>192.168.1.102</c> (the current host), <c>192.168.1.103</c> and
92     <c>192.168.1.104</c> (two "remote" hosts):
93     </p>
94    
95     <pre caption="Configuring distcc to use three available DistCC servers">
96     # <i>distcc-config --set-hosts "192.168.1.102 192.168.1.103 192.168.1.104"</i>
97     </pre>
98    
99     <p>
100     Of course, don't forget to run the <c>distccd</c> daemon too:
101     </p>
102    
103     <pre caption="Starting the distcc daemon">
104     # <i>/etc/init.d/distccd start</i>
105     </pre>
106    
107     <p>
108     Congratulations, your system will now use distributed compiling! For more
109     in-depth information about DistCC and Gentoo, please read our <uri
110     link="/doc/en/distcc.xml">Gentoo DistCC Documentation</uri>.
111     </p>
112 swift 1.2
113 swift 1.1 </body>
114     </subsection>
115     </section>
116     <section>
117     <title>cCache</title>
118     <subsection>
119     <title>What is cCache?</title>
120     <body>
121    
122     </body>
123     </subsection>
124     <subsection>
125     <title>Installing cCache</title>
126     <body>
127    
128     </body>
129     </subsection>
130     <subsection>
131     <title>Activating Portage Support</title>
132     <body>
133    
134     </body>
135     </subsection>
136     </section>
137     <section>
138     <title>Binary Packages</title>
139     <subsection>
140     <title>Creating binary packages</title>
141     <body>
142    
143 swift 1.2 <p>
144     We have already discussed how to work with prebuild packages, but how do you
145     create your own prebuild packages?
146     </p>
147    
148     <p>
149     If the package is already installed, you can use the <c>quickpkg</c> command
150     which will make a tarball of the installed files. This is very interesting for
151     backup purposes!
152     </p>
153    
154     <pre caption="Using quickpkg">
155     # <i>quickpkg gnumeric</i>
156     </pre>
157    
158     <p>
159     If the package isn't installed yet, you can install it using <c>emerge</c> and
160     ask to build a binary package too. <c>emerge</c> uses the <c>--buildpkg</c>
161     option (<c>-b</c> in short) for this:
162     </p>
163    
164     <pre caption="Installing gnumeric and building binary packages too">
165     # <i>emerge --buildpkg gnumeric</i>
166     </pre>
167    
168     <p>
169     If you want Portage to do this by default, you should set the <c>buildpkg</c>
170     keyword in the <c>FEATURES</c> variable declared in <path>/etc/make.conf</path>.
171     </p>
172    
173     <p>
174     If you don't want to install the software, but only build the package, you can
175     use the <c>--buildpkgonly</c> option (<c>-B</c> in short):
176     </p>
177    
178     <pre caption="Building a binary package for gnumeric">
179     # <i>emerge --buildpkgonly gnumeric</i>
180     </pre>
181 swift 1.1
182     </body>
183     </subsection>
184     </section>
185     </sections>

  ViewVC Help
Powered by ViewVC 1.1.20