Software projects/OS/Slackware/Advanced usage/Distributed compilation

From Pandora Wiki
Revision as of 00:58, 6 May 2012 by Linux-SWAT (talk | contribs) (Get started)
Jump to: navigation, search

Get started

  • So you need at least two networked OP.
  • In this exemple, we'll use two OP, OP-1 and OP-2.
  • The compilation will be launched on OP-1.
  • OP-2 IP adress is 10.0.0.2
  • If you connect two OP with an USB cable, be sure to read this.

Distccd server activation

  • On both OP, launch as root:
distccd

Setting up the hosts

  • On OP-1, open a terminal:
export DISTCC_HOSTS="localhost 10.0.0.2"

Compile

  • In the same OP-1 terminal:
make -j4 CC=distcc
make -j4 CC=distcc
  • In the -j(n), n represents the (number of CPU used X 2), so if you compile with 10 OP, it will be -j20 .

Monitoring

  • You can see how the compilation is distributed.
  • As root on OP-1, type:
distccmon-gnome