Distcc is a program designed to distribute compiling tasks across a network to participating hosts. It is comprised of a server,
>=sys-apps/portage-2.0.46-r11Distcc-2.11 and on require >=sys-apps/portage-2.0.49-r6 >=sys-devel/gcc-config-1.3.1 sys-apps/shadow(As of version 2.8 and up until 2.11) And the following optional dependencies when you have gtk in your USE flags >=x11-libs/gtk+-2.2.1
>=sys-apps/portage-2.0.49-r6 >=sys-devel/gcc-config-1.3.1 sys-apps/shadowIn this revision you may chose between a Gnome and GTK GUI monitor, they have the following added dependencies For GTK: >=x11-libs/gtk+-2.0.0 >=gnome-base/libglade-2.0.0 x11-libs/pangoFor Gnome: >=x11-libs/gtk+-2.0.0 >=gnome-base/libglade-2.0.0 x11-libs/pango >=gnome-base/libgnomeui-2.0.0.0 >=gnome-base/libgnome-2.0.0
Installing Distcc is very easy. Simply set your USE flags and emerge distcc. But, there's a couple of options you should know about.
Distcc ships with a graphical monitor to monitor tasks that your computer is sending away for compilation. If you use Gnome then put 'gnome' in your USE flags. However, if you don't use Gnome and would still like to have the monitor then you should put 'gtk' in your USE flags.
Setting up distcc is very easy to do with Portage. Follow these simple steps on each computer you want to use distcc on:
# emerge distcc # nano -w /etc/make.conf
Next you have to specify what hosts you want to use. To do this you can use the
192.168.0.1 192.168.0.2 192.168.0.3 192.168.0.1/2 192.168.0.2 192.168.0.3/10 192.168.0.1:4000/2 192.168.0.2/1 192.168.0.3:3632/4 @192.168.0.1 @192.168.0.2:/usr/bin/distccd 192.168.0.3
It may all look complicated, but in most cases a variant of line 1 or 2 will work. An explanation of each line is: Line 1 is just a space-delimited list of hosts that will use default everything. Line 2 is a list of hosts that specifies the maximum number of jobs (by use of the /N) to send that host at any given time (specified with the
A sample command to set the hosts (for line 1) is:
# /usr/bin/distcc-config --set-hosts "192.168.0.1 192.168.0.2 192.168.0.3"
The final step to integrating distcc into Portage is to re-open your
# nano -w /etc/make.conf MAKEOPTS=-jN
This is in some cases easier than the Portage setup. What you have to do is update your
# export PATH="/usr/lib/ccache/bin:/usr/lib/distcc/bin:${PATH}"
Then, as you would normally type
Cross-compiling is using one architecture to build programs for another architecture. This can be as simple as using an Athlon (i686) to build a program for a K6-2 (i586), or using a Sparc to build a program for a ppc.
I'd love to be able to help out on the Gentoo Cross-compiling effort, but I don't have any non-x86 machines. I can create things that work
In the near future I hope to acquire a Sparc of some type to put Gentoo on so I can play around in-house.
Next, you have to boot your new box with a Gentoo Linux LiveCD and follow all of the steps up until the bootstrapping. Then proceed with a little preliminary setup on the new box.
Here we add distcc to FEATURES # nano -w /etc/make.confAdd "distcc" to FEATURES Modify MAKEOPTS in /etc/make.conf to include -jN (as described above)
Then add the distcc user to your
# echo "distcc:x:240:2:distccd:/dev/null:/bin/false" >>/etc/passwdDo not forget the `>>'
Next you will want to issue the following command inside the chroot on the new box.
# emerge --nodeps distcc
Now set up distcc itself...
# /usr/bin/distcc-config --install # /usr/bin/distcc-config --set-hosts "localhost host1 host2 host3 ..."
distcc should be set up now to bootstrap! Continue the official install guide, and don't forget to re-emerge distcc after
As you emerge various packages, you'll notice that they aren't being distributed (and indeed aren't being built in parallel). This is because the developers of Mozilla and Xfree .ebuilds disabled parallel building because it is known to cause problems. This isn't necessarily a distcc problem.
That isn't to say that sometimes distcc will cause a package to fail to compile.
With such a long title any explanation here is almost irrelevent. However, if you plan to use distcc across hosts that have the
The solution requires a little foresight on your part; you have to run
If you have differing versions of GCC on your hosts, there will likely be very weird problems. The solution is to make certain all hosts have the same GCC version.
Distcc ships with two monitors. The text-based one is always built, it is called
The other monitor is only turned on if you enabled
There is a caveat to using these programs. If you want to monitor any emerge, you have to start the monitor like so:
# DISTCC_DIR=/path/to/distccdir distccmon-text NOr you can start the graphical monitor... # DISTCC_DIR=/path/to/distccdir distccmon-gnome
The perl script is being kept at