User Tools

Site Tools




Distcc is used to compile packages faster on slow machines, such as Santo or the virtual machines, by doing some of the grunt work on physical hosts.

Build Hosts

  • (River)
  • (Badger)
  • <s> (Hex)</s> todo

The build hosts use the following architectures:

{| class=“wikitable” cellspacing=“10”

! Name ! Value

The following cross-compilation environments are also available:

  • i586-pc-linux-gnu
  • i686-pc-linux-gnu

Configuring a build host

/etc/conf.d/distccd|<source lang="text"> </source>

Configuring a new cross-compilation environment

Run the following command on each build host, where <tt>i586</tt> is the name of the new environment.

<source lang="bash"> crossdev -t i586 </source>

This command will build the necessary tools for cross-compilation, and will take a considerable time to run. To serve as a progress check, the following stages are run:

  • binutils
  • linux-headers-quick
  • glibc-headers
  • gcc-stage1
  • linux-headers
  • glibc
  • gcc-stage2

Configuring a build client

If the client has the same CHOST as all the build hosts, then setting up distcc is straightforward:

<source lang="bash"> distcc-config --set-hosts "" </source>

  • Configure portage to use distcc for compilations by adding setting the following option:

/etc/make.conf|<source lang="bash"> FEATURES="distcc" </source>

Configuring a build client with a different CHOST to the build hosts

As explained in the Gentoo documentation, set up a wrapper script to have distcc tell the build host which environment to use for compilation.

  • Create the wrapper script in <tt>/usr/lib/distcc/bin/</tt>, with the name of the CHOST to be used, for example, <tt>i686-pc-linux-gnu-wrapper</tt>, containing the following:

/usr/lib/distcc/bin/i686-pc-linux-gnu-wrapper|<source lang="bash"> #!/bin/bash exec /usr/lib/distcc/bin/sparc-unknown-linux-gnu-g${0:$[[-2]]} "$@" </source>

  • Make the wrapper script executable, and replace the unqualified tool symlinks with symlinks to the new wrapper:

<source lang="bash"> cd /usr/lib/distcc/bin chmod a+x i686-pc-linux-gnu-wrapper rm cc gcc c++ g++ ln -s i686-pc-linux-gnu-wrapper cc ln -s i686-pc-linux-gnu-wrapper gcc ln -s i686-pc-linux-gnu-wrapper c++ ln -s i686-pc-linux-gnu-wrapper g++ </source>

See Also

distcc.txt · Last modified: 2014/11/24 01:14 by