• Sign in to Neowin Faster!

    Create an account on Neowin to contribute and support the site.

Sign in to follow this  

Gentoo Distributed Compiling HOWTO

Recommended Posts

Emon    40

(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 by Emon

Share this post


Link to post
Share on other sites
markjensen    98

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

Share this post


Link to post
Share on other sites
kemical    0

clever i may try that :)

Share this post


Link to post
Share on other sites
forster    23

(Y) Well done :)

Share this post


Link to post
Share on other sites
configure    1

Thread moved to Linux HOWTO & FAQ's forum.

Oh and I edited the title too :p

Share this post


Link to post
Share on other sites
volrathxp    0

Very nice thanks :)

Has this been posted at all over Gentoo's forums? I'ma have to look :)

Share this post


Link to post
Share on other sites
Emon    40
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.

Share this post


Link to post
Share on other sites
Tek    0

Nice info man. (Y)

Share this post


Link to post
Share on other sites
MG-Cloud    0

Great stuff :D

Now I just gotta get me another computer .......................................

doh :'(

Share this post


Link to post
Share on other sites
JadeWolf324    0

wow thats damn cool...:woot:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.