1 AUTHOR: Cedric de Wijs cedric.de.wijs<at>softhome<dot>net
5 LICENSE: GNU Public Licence
7 SYNOPSIS: How to install distcc --a free distributed C/C++ compiler system
10 TODO: put some usefull words here
13 The distcc package, available from:
14 http://distcc.samba.org/ftp/distcc/distcc-2.12.1.tar.bz2 (317,8kB)
18 This hint expect you to have two working lfs systems with the same version of gcc, binutils and glibc, and functional networking
37 Compiling sourcecode can take a long time. This hint describes how to install distcc, a tool that can be used to distribute the compiling across multiple machines in a network.
38 The machine you sit behind and issue the compile from is the client.
39 The machines who are doing the work are the servers.
40 Every machine can contain both a server and a client
42 This text is based upon the documentation of distcc, written by Martin Pool
44 Estimated build time: 0.20 SBU
45 Estimated required disk space: 5.4 MB
50 The distcc package, available from:
51 http://distcc.samba.org/ftp/distcc/distcc-2.12.1.tar.bz2 (317,8kB)
56 To install the package run the following:
58 ./configure --sysconfdir=/etc &&
61 =======================
62 3. Configuration server
63 =======================
64 To make distcc run as a server create a new user. Make sure /tmp is writable by that user:
69 To start the daemon use the following command:
71 nice -n 19 distccd --daemon
74 To make distcc start at boottime use this script:
76 cat > /etc/rc.d/init.d/distcc << "EOF"
78 source /etc/sysconfig/rc
82 echo "Starting distributed compile daemon"
83 nice -n 19 /usr/local/bin/distccd --daemon
86 echo "Stopping distributed compile daemon"
87 killproc /usr/local/bin/distccd
90 echo "Usage: $0 {start|stop|reload|restart|status}"
95 chmod 700 /etc/rc.d/init.d/distcc
97 And make some symlinks to it:
99 cd /etc/rc.d/init.d &&
100 ln -sf ../init.d/distcc ../rc0.d/K00distcc &&
101 ln -sf ../init.d/distcc ../rc2.d/S99distcc &&
102 ln -sf ../init.d/distcc ../rc3.d/S99distcc &&
103 ln -sf ../init.d/distcc ../rc5.d/S99distcc &&
104 ln -sf ../init.d/distcc ../rc6.d/K00distcc
106 =======================
107 4. Configuration client
108 =======================
109 To make distcc run as a client run the following:
111 ./configure --sysconfdir=/etc &&
115 To let distcc know who the servers are edit the following file:
118 cat > /root/.distcc/hosts << "EOF"
119 localhost #your own machine
120 192.168.0.201 #the first server,
121 192.168.0.202 #and the second server
124 To make sure distcc is found before your real compiler, create some symlinks:
126 ln -s /usr/local/bin/distcc /bin/c++ &&
127 ln -s /usr/local/bin/distcc /bin/cc &&
128 ln -s /usr/local/bin/distcc /bin/g++ &&
129 ln -s /usr/local/bin/distcc /bin/gcc
134 Instead of running the following command:
135 ./configure && make && make install
137 ./configure && make -j 6 && make install
140 Every server can handle three clients per CPU unless otherwise configured, so the above comand can fill two servers.
144 Don't use version 1.12. This version contains a bug causing distccd not to run as user distcc. Older and newer versions should work fine
146 ======================
147 7. Recommended reading
148 ======================
149 The documentation included with distcc
152 parallelcompiling.txt
156 The programmer of this utility:
157 Martin Pool <mbp@samba.org>
159 The author of parallelcompiling.txt
160 Daniel Baumann <daniel.baumann@panthera-systems.net>
163 2004-04-09 Initial release