Emon Posted December 28, 2003 Share Posted December 28, 2003 (edited) (This is an easy and quick HOWTO on distributed compiling. I am sure there are several ways to do this but this is what worked for me nicely.) Well if you are a Gentoo user you sure know how it feels like waiting for big package(s) (i.e KDE) to compile. But there's a way to reduce that wait time. If you have some extra PCs lying here and there in your place, you can use them to compile your precious Gentoo apps. Sounds neat ..isn't it ? :) Here's what you have to do. We are going to use a program call distcc So in your Gentoo Box install that app. emerge distcc Now we have to configure distcc. To do that we have to edit the /etc/make.conf file. add FEATURES="distcc" uncomment PORTAGE_TMPDIR and add DISTCC_DIR=${PORTAGE_TMPDIR}/portage/.distcc at the end of the file. Also you have to uncomment MAKEOPTS=-jN and change that N to a number. For example if you are using 3 machines to compile then the N have to be 4. Make a directory call .distcc inside /var/tmp/portage directory. Now download a KNOPPIX(distccKNOPPIX) iso from here and burn it. distccKNOPPIX is a bootable and self-configuring Linux system running distccd daemon. Boot your extra PC with that CD and type ifconfig to get the IP address of that machine. We are almost done...Head over to your Gentoo Box, open a console window and type /usr/bin/distcc-config --set-hosts "localhost 'IP_address_of_the_other_machine'" Thats it !! Now you are ready for distributed compiling. EDIT: don't forget to run the distcc daemon in your Gentoo Box also. :) /etc/init.d/distccd start If you want you can also add the daemon to startup. rc-update add distccd default distcc comes with a nice GUI to monitor which machine is doing what. Here's how you can run it. open a console window and type that DISTCC_DIR=/var/tmp/portage/.distcc distccmon-gnome Now emerge and have fun. :D ( if you want to cross compile, such as using cygwin read this http://forums.gentoo.org/viewtopic.php?t=66930. It didn't work for me. So If anyone can get cross compiling working let me know.) Edited January 12, 2006 by Emon Link to comment Share on other sites More sharing options...
markwolfe Veteran Posted December 28, 2003 Veteran Share Posted December 28, 2003 Oh, WOW! That is an AWESOME trick! It's almost like running a cluster, but its handled by the distcc program for compile operations. I'll have to cut this procedure out and put it in my tricks dir, so I can use it later... :D Link to comment Share on other sites More sharing options...
kemical Posted December 29, 2003 Share Posted December 29, 2003 clever i may try that :) Link to comment Share on other sites More sharing options...
forster Posted December 29, 2003 Share Posted December 29, 2003 (Y) Well done :) Link to comment Share on other sites More sharing options...
configure Veteran Posted December 29, 2003 Veteran Share Posted December 29, 2003 Thread moved to Linux HOWTO & FAQ's forum. Oh and I edited the title too :p Link to comment Share on other sites More sharing options...
volrathxp Posted December 29, 2003 Share Posted December 29, 2003 Very nice thanks :) Has this been posted at all over Gentoo's forums? I'ma have to look :) Link to comment Share on other sites More sharing options...
Emon Posted December 29, 2003 Author Share Posted December 29, 2003 Thread moved to Linux HOWTO & FAQ's forum.Oh and I edited the title too :p :) and I was looking for this thread all over ! I forgot to mention that you have to turn on the distcc daemon in your Gentoo box too. Thanks Configure for moving it here. Link to comment Share on other sites More sharing options...
Tek Posted December 29, 2003 Share Posted December 29, 2003 Nice info man. (Y) Link to comment Share on other sites More sharing options...
MG-Cloud Posted December 31, 2003 Share Posted December 31, 2003 Great stuff :D Now I just gotta get me another computer ....................................... doh :'( Link to comment Share on other sites More sharing options...
JadeWolf324 Posted January 2, 2004 Share Posted January 2, 2004 wow thats damn cool...:woot: Link to comment Share on other sites More sharing options...
Recommended Posts