wiki:DistCC

distcc helps us compile things much faster by using everyone elses cpu.

  1. Get distcc: http://distcc.samba.org/ftp/distcc/distcc-2.18.3.tar.bz2
  2. ./configure --prefix=/usr --with-gnome
  3. make
  4. su
  5. make install
  6. cd /usr/lib
  7. mkdir distcc
  8. mkdir distcc/bin
  9. cd distcc/bin
  10. echo '#!/bin/sh' > c++
  11. echo 'distcc /usr/bin/c++ $*' >> c++
  12. sed s/c++/cc/g c++ > cc
  13. sed s/c++/gcc/g c++ > gcc
  14. sed s/c++/g++/g c++ > g++
  15. chmod a+x *
  16. exit
  17. mkdir ~/.distcc
  18. edit ~/.distcc/hosts to be:
    localhost
    130.216.165.130
    130.216.165.109
    130.216.165.110
    

Now when you want to compile something with distcc as the compiler, put /usr/lib/distcc/bin at the start of your path, and use -j option with make. for each machine in your hosts file, add 4 to the -j value, so if there are three machines in your host file you'll use "make -j12".

Get each person on their machine to run: distcc --daemon --allow "130.216.165.0/24 127.0.0.1" (This is best added to /etc/rc.local)

This will allow us all to share our cpu for compiling.