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

  1. Get distcc:
  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:

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 "" (This is best added to /etc/rc.local)

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

Last modified 10 years ago Last modified on 2009-05-22T06:08:24+09:00