distcc

Install distcc

 #sudo apt-get install distccmon-gnome

Local configuration

Modify the /etc/default/distcc file and replace or add the existing values with these :

STARTDISTCC=”true”
ALLOWEDNETS=”192.168.0.0/16″
LISTENER=”0.0.0.0″

This ALLOWEDNETS property would allow connection from any clients on the 192.168 subnet. You must configure this attribute on any host you want to use.

Hosts configuration

#mkdir ~/.distcc
#echo "localhost build-machine" > ~/.distcc/hosts
#chmod 666 ~/.distcc/hosts

Restart the service

#sudo /etc/init.d/distcc restart

Configure Mozilla projects

Edit your mozilla/.mozconfig file described here and add the following line:

mk_add_options MOZ_MAKE_FLAGS="CC='distcc gcc' CXX='distcc g++' -j4"

The -j4 parameter represents the number of parallel compilation will be used. Set this number to the total number of processing units (CPUs and cores) + 2. Ex: If your localhost is a dual core CPU and you have a Pentium 4 client on your network, this parameter should be 3+2 = -j5.

Launch the build

You can launch a build with the 'make -f client.mk build' and monitor the distributed build by using the distccmon-gnome application.


CategoryMozillaTeam

MozillaTeam/Develop/distcc (last edited 2011-02-25 22:47:42 by n198-169-188-000)