
Speed Up Compiles #87
Chapter 9, Administration and Automation
|
261
HACK
even though these compiles can take hours or days to complete, Gentooists
still tout their distribution as being one of the fastest available. Because of
their constant need to compile, Gentoo users have picked up a few tricks on
making the process go faster, including using distcc to create a cluster of
computers for compiling. Distcc is a distributed compiling daemon that
allows you to combine the processing power of other Linux computers on
your network to compile code. It is very simple to set up and use, and it
should produce identical results to a completely local compile. Having three
machines with similar speeds should make compiling 2.6 times faster. The
distcc home page at http://distcc.samaba.org has testimonials concerning real
user’s experiences using the program. Using this hack, you can get distcc to
work with any Linux distribution, which will make compiling KDE and
GNOME from scratch quick and easy.
Distcc does not require the machines in your compile farm to
have shared filesystems, synchronized clocks, or even the
same libraries and headers. However, it is a good idea to
make sure you are on the same major version number of the
compiler itself.
Before getting started with distcc, first you must know how to perform a par-
allel make when building code. To perform a parallel make, use the
–j
option in your make command: ...