노무현 대통령 배너


2009. 2. 6. 16:04

distcc: a fast, free distributed C/C++ compiler

distcc: a fast, free distributed C/C++ compiler

NEWS: distcc 3.1 released!

Distcc release 3.1 is now available at Downloads. See NEWS for details.

Overview

distcc is a program to distribute builds of C, C++, Objective C or Objective C++ code across several machines on a network. distcc should always generate the same results as a local build, is simple to install and use, and is usually much faster than a local compile.

distcc does not require all machines to share a filesystem, have synchronized clocks, or to have the same libraries or header files installed. They can even have different processors or operating systems, if cross-compilers are installed.

"Just wanted to drop you a line to say that we are now using distcc at work and it is excellent. We have a rack of opteron machines that we use for computational tasks and we are now using them as a compile farm to compile our ~1MLOC C++ tree (which can take an hour on a single CPU to recompile if we change certain header files). We tried using Sun's grid engine to do this (we already use it to schedule our computational jobs), but the combination of its polled operation and the overhead of NFS led to little improvement (and greatly stressed our network). With distcc compile times are way down and my productivity has greatly improved; the two best features for me are its low impact on the network and its simplicity.
"Thanks a lot for a great tool!" — Jeremy Barnes

60-second instructions

  1. For each machine, download distcc, unpack, and do
  2. ./configure && make && sudo make install
  3. On each of the servers, run distccd --daemon, with --allow options to restrict access.
  4. Put the names of the servers in your environment:
  5. export DISTCC_POTENTIAL_HOSTS='localhost red green blue'
  6. Build!
  7. cd ~/work/myproject; pump make -j8 CC=distcc

Full documentation

See our documentation pages.

You may also be interested in an explanation of common pump-mode errors.

distcc 3

The major improvement in distcc 3 is the inclusion of "pump" mode. In "pump" mode, distcc sends source file with their included header files to the compilation servers, which now carry out both preprocessing and compilation. As a result, distcc-pump can distribute files up to 10 times faster to compilation servers than distcc.

distcc-pump is easily deployed through a wrapper script around an existing build command, such as 'make'. Pump mode uses the system header files from the compilation servers, so it works best if all of your compilation servers are configured identically, or if you use cross-compilers that come with their own system header files.

'프로그래밍' 카테고리의 다른 글

[1] 64-bit/32-bit 빌드 실습  (1) 2009.01.15
디버깅의 도(5)-메모리 관련 문제들  (1) 2008.10.28
디버깅의 도(4)-GDB  (0) 2008.10.28
디버깅의 도(3)-Assert  (0) 2008.10.28
디버깅의 도(2)  (0) 2008.10.28