As some of you know, (Hi, Mike!) I have a new box.  Its hostname is
newbox.  I am bringing up Gentoo on it.  It's reasonably fast.  It
"sort of" has two CPUs.  (A Pentium 4 w/ hyperhtreading shows up as two
CPUs in Linux.)

I have another reasonably fast box, the dual Athlon box I use for work.
Its hostname is tivopc.  It has to run RedHat 7.2 because that's what
TiVo development works on.

I wanted to use the RedHat box to help compile Gentoo.  After several
false starts, I found that this works.

1. Copy entire Gentoo filesystem to a directory on the RedHat box.

        tivopc> mkdir /work/tmp/distcc-root
        tivopc> cd /work/tmp/distcc-root
        tivopc> ssh -n [EMAIL PROTECTED] 'cd /; tar cf - . --exclude==./proc \
            --exclude=/usr/portage/distfiles' | sudo tar xfp -

2. Mount /proc in the right place (needed so distccd can know
   we have two CPUs).

        tivopc> sudo mount -t proc proc proc

3. Chroot into the gentoo filesystem.

        tivopc> sudo chroot .

4. Clear your environment (very important, and learned the hard way)
   and become a non-root user.  Note the kbob is not a known user
   on tivopc, but he is on newbox.

        tivopc# env - sudo -u kbob

5. Start distcc daemon.

        bash-2.05b$ distccd --verbose --daemon \
                        --log-file=/home/kbob/distccd.log

6. Over on newbox, set it up to run 3 jobs each on localhost and tivopc.
   Add some things to /etc/make.conf too.  (I'm still not sure I have
   the right stuff there, suggestions are welcome.)

        newbox> sudo distcc-config --set-hosts 'localhost/3 tivopc/3'

   make.conf:
        FEATURES="distcc"
        CC="distcc"
        CXX="distcc g++"
        MAKEOPTS="-j8"

7. Emerge big packages.

        newbox> sudo emerge xfree kde emacs mozilla

Anyway, sometimes it uses both machines fully, and sometimes tivopc is
standing idle.  I have gkrellm running on both.  I *think* it's
working as expected.

-- 
Bob Miller                              K<bob>
kbobsoft software consulting
http://kbobsoft.com                     [EMAIL PROTECTED]
_______________________________________________
EuG-LUG mailing list
[EMAIL PROTECTED]
http://mailman.efn.org/cgi-bin/listinfo/eug-lug

Reply via email to