12 Nov 2002

distcc, gentoo and stuff

woohoo .. i'm so happy! i finally got went and bothered to compile gcc-3.2 on my lab machine so i can compile stuff remotely using distcc. it is just so beautiful. i can compile stuff in seconds.

steps that i needed (on the server):

  1. compile gcc-3.2 (or any version) on my lab machine with the following configure flags:
    notice that i set the program suffix to -gentoo, that means my compiler will be named gcc-gentoo. this is to avoid conflict with redhat (my lab machine's) compiler.
  2. make and make install it, obviously modify the configure flags if you want your independent compiler put somewhere else.
  3. configure, make make install your distcc (i used 0.12)
  4. set your PATH variable on the compile server to point to your new compiler.
  5. now start distccd with :
    distccd --no-fork
    or with any options you want. do distccd --help for more info.
and on the client side (gentoo laptop):
  1. emerge distcc (obviously
  2. and make a bunch of symlinks from {gcc,cpp,c++}-gentoo to {gcc,cpp,c++}. i just did it in my /usr/local/bin.
  3. (optional) to get around the firewall at the engineering department, we use an ssh tunnel, obviously not a convienent choice, and also stresses the CPU a little, but its well worth the speed (2.4GHz P4 :P) by doing:
    ssh -L 4200:hostname:4200 -c blowfish hostname
    this will make a tunnel from localhost:4200 to the hostname:4200,.
  4. and then you do a emerge using:
    DISTCC_HOSTS="localhost:4200" CC="distcc gcc-gentoo" CXX="distcc g++-gentoo" emerge whatever
and you're done. its not too difficult at all, now i can compile everything will my hearts content, and still have a reasonably responsive local machine !! i'm going to compile evolution 1.2 now! wicked!

You can reply to me about this on Twitter: