Gentoo Distributed Compiling HOWTO


Recommended Posts

(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
Link to comment
https://www.neowin.net/forum/topic/126946-gentoo-distributed-compiling-howto/
Share on other sites

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

  configure said:
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.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Hi all! My motherboard is Gigabyte x570 Gaming X, and believe it or not I just realised it has two M2 slots 😅 So I wanna buy a new SSD, which would mostly be used for gaming. What would you recommend I buy? Is 990 Evo Plus good choice?
    • Windows 7 its the peak of windows desktop experience, it felt polished, it was CONSISTENT, the UI was not something made to ###### people off it was more functional and productive because everything felt like a improvement. Windows 8 was horrible they did fix a little with 8.1 but the thing its that in usability it was the same as 7 you can avoid all the metro stuff, you don't need to use the cripple setting or metro stuff, for me it was bearable because it can be customized and you can make it like 7 (sure you waste time setting stuff) even if you needed a third party app. And there are serious performance improvement over 7 faster startup, Windows 10 was ok too nothing felt out of place and the start menu was usable it was filled with bloat but as usual you can remove it, what i really hated about 10 at that time it have worse windows update, you cant customize what update to install and the privacy and telemetry is horrible again it was bearable even but w11, not only they double down on things that i seriously hate on 10 like the bloat, they force changes that make no sense, make an worse start menu, worse context menu, worse task bar. force microsoft account. When i tried w10 iot enterprise LTSC on a ancient laptop, i felt that it was a throwback of what OLD windows should be a normal desktop OS with only the basics and you put the rest it was fast fluid functional, no nagging, its a productive, spend less time setting up the OS the way i want it. every windows after 7 its making it worse for me because i have to spend more time setting up
    • https://filepilot.tech/ File Pilot is a whole lot faster and offers a lot of the same features. Has a free beta available, but it looks like it's going to be a paid app in the future.
    • 24H2 was absolutely plagued with stability and compatibility problems, many of which are still not solved. You don't have to take my word for that either, given that Microsoft have an official know issues page available. Games using older versions of Easy Anti-Cheat still cause 24H2 to lock up and/or BSOD, and there's still a compatbility hold on upgrades if you have them installed as a result. Maybe 25H2 will be less of a dumpster fire, but I wouldn't count on it given Microsoft's recent track record.
    • No I don't also get my news for one source. Have you considered that maybe I just don't care about tech enough to spend time reading multiple sources? Anyway my website preferences are way off topic.
  • Recent Achievements

    • Week One Done
      MIghty Haul earned a badge
      Week One Done
    • One Month Later
      MIghty Haul earned a badge
      One Month Later
    • Collaborator
      KD2004 earned a badge
      Collaborator
    • One Month Later
      ataho31016 earned a badge
      One Month Later
    • One Month Later
      Delahenty Machinery earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      593
    2. 2
      Michael Scrip
      200
    3. 3
      ATLien_0
      192
    4. 4
      +FloatingFatMan
      140
    5. 5
      Xenon
      127
  • Tell a friend

    Love Neowin? Tell a friend!