Difference between revisions of "Software projects/OS/Slackware/Advanced usage/Distributed compilation"

From Pandora Wiki
Jump to: navigation, search
(Get started)
Line 1: Line 1:
 
= Get started =
 
= Get started =
* So you need at least two networked OP.
+
* So you need at least two [http://pandorawiki.org/Software_projects/OS/Slackware/Advanced_usage/Network_get_started networked] OP.
 
* In this exemple, we'll use two OP, OP-1 and OP-2.
 
* In this exemple, we'll use two OP, OP-1 and OP-2.
 
* The compilation will be launched on OP-1.
 
* The compilation will be launched on OP-1.

Revision as of 00:58, 6 May 2012

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