View previous topic :: View next topic |
Author |
Message |
lisa Retired Dev
Joined: 01 Jun 2003 Posts: 273 Location: York, UK again! Horray!
|
Posted: Sat Aug 16, 2003 8:00 pm Post subject: Distcc from Bootstrap and on |
|
|
Big edit:
See the official Distcc Guide, at http://www.gentoo.org/doc/en/distcc.xml for updated steps.
Report problems here, if I don't respond its probably because 1) someone already mentioned a fix or 2) the forum didn't notify of your reply (like it tends to do). Email me if I'm slacking. _________________ Distcc guide
Visit my website
I maintain Distcc, Ccache, Memcached, and some others (i think)
Last edited by lisa on Sat Oct 18, 2003 12:23 am; edited 2 times in total |
|
Back to top |
|
|
bassvandijk Guru
Joined: 13 Sep 2002 Posts: 306 Location: Haps, Netherlands
|
Posted: Mon Aug 18, 2003 6:52 pm Post subject: |
|
|
Great guide!
But it isn't working for me
This is my setup:
I have 3 computers:
1) Workstation AMD Thunderbird 850 Mhz (IP 10.0.0.2)
2) Laptop Pentium 4 2.6 Ghz (IP 10.0.0.3)
3) Laptop Pentium 4 2.6 ghz (IP 10.0.0.4)
On laptop 3 I'm reinstalling Gentoo the other computers are all running distccd.
/etc/distcc/hosts (from the new laptop)
Code: | localhost 10.0.0.3 10.0.0.2 |
The hosts files from the other computers are all correct.
On none of the other computers I see an increase in CPU usage, nor do I see gcc / cc / .. processes running...
during bootstrapping distcc is complaining that it can't connect to hosts ?
(All the computers can ping eachother)
What is wrong in my setup?
Thanks. |
|
Back to top |
|
|
lisa Retired Dev
Joined: 01 Jun 2003 Posts: 273 Location: York, UK again! Horray!
|
Posted: Mon Aug 18, 2003 7:07 pm Post subject: |
|
|
bassvandijk wrote: |
during bootstrapping distcc is complaining that it can't connect to hosts ?
(All the computers can ping eachother)
What is wrong in my setup? |
Is distccd running on the other hosts?
Were the symlinks set up properly? (ls /usr/lib/distcc/bin -l)
Is distcc in your make.conf? _________________ Distcc guide
Visit my website
I maintain Distcc, Ccache, Memcached, and some others (i think) |
|
Back to top |
|
|
bassvandijk Guru
Joined: 13 Sep 2002 Posts: 306 Location: Haps, Netherlands
|
Posted: Mon Aug 18, 2003 7:19 pm Post subject: |
|
|
Code: |
ls /usr/lib/distcc/bin/ -l
total 0
lrwxrwxrwx 1 root root 15 Aug 18 20:01 c++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Aug 18 20:01 cc -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Aug 18 20:01 g++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Aug 18 20:01 gcc -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Aug 18 20:01 i686-pc-linux-gnu-c++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Aug 18 20:01 i686-pc-linux-gnu-g++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Aug 18 20:01 i686-pc-linux-gnu-gcc -> /usr/bin/distcc
|
distcc is in the FEAURES flag in make.conf
And distccd is running on all the hosts. |
|
Back to top |
|
|
lisa Retired Dev
Joined: 01 Jun 2003 Posts: 273 Location: York, UK again! Horray!
|
Posted: Mon Aug 18, 2003 7:46 pm Post subject: |
|
|
bassvandijk wrote: | And distccd is running on all the hosts. |
What is MAKEOPTS set to? _________________ Distcc guide
Visit my website
I maintain Distcc, Ccache, Memcached, and some others (i think) |
|
Back to top |
|
|
bassvandijk Guru
Joined: 13 Sep 2002 Posts: 306 Location: Haps, Netherlands
|
Posted: Mon Aug 18, 2003 7:48 pm Post subject: |
|
|
MAKEOPTS="-j4"
(3 machines + 1)
It is possible that distcc isn't working becaused I messed a bit on the other computers stopping and starting the distcc daemon while bootstrapping (but distccd was running most of the time).
So I think it's best that i retry distcc while I do
emerge system
BTW don't you think it's a good idea to include distcc on the LiveCD's ? |
|
Back to top |
|
|
lisa Retired Dev
Joined: 01 Jun 2003 Posts: 273 Location: York, UK again! Horray!
|
Posted: Mon Aug 18, 2003 7:57 pm Post subject: |
|
|
bassvandijk wrote: | It is possible that distcc isn't working becaused I messed a bit on the other computers stopping and starting the distcc daemon while bootstrapping (but distccd was running most of the time).
|
Its possible. But distcc should keep retrying those hosts every minute or so. Weird things can happen if you stop the daemon. Try when you emerge system to use tcpdump on the other machines (tcpdump port 3632) to see if packets are being sent.
bassvandijk wrote: |
BTW don't you think it's a good idea to include distcc on the LiveCD's ? |
Absolutely. _________________ Distcc guide
Visit my website
I maintain Distcc, Ccache, Memcached, and some others (i think) |
|
Back to top |
|
|
bassvandijk Guru
Joined: 13 Sep 2002 Posts: 306 Location: Haps, Netherlands
|
Posted: Mon Aug 18, 2003 8:56 pm Post subject: |
|
|
OK bootstrapping just finsished. I gonna emerge system now and try the tcpdump thingy...
BTW the distcc daemon doesn't need to run on the client, does it? |
|
Back to top |
|
|
lisa Retired Dev
Joined: 01 Jun 2003 Posts: 273 Location: York, UK again! Horray!
|
Posted: Mon Aug 18, 2003 9:06 pm Post subject: |
|
|
bassvandijk wrote: | BTW the distcc daemon doesn't need to run on the client, does it? |
ONLY if you want to compile code on it for another box (ie, code gets sent to your box). Last time I checked the source code, you're okay if you have 'localhost' in your hosts. _________________ Distcc guide
Visit my website
I maintain Distcc, Ccache, Memcached, and some others (i think) |
|
Back to top |
|
|
bassvandijk Guru
Joined: 13 Sep 2002 Posts: 306 Location: Haps, Netherlands
|
Posted: Mon Aug 18, 2003 9:07 pm Post subject: |
|
|
BTW how do you let tcpdump only show dumps from port 3632 ? |
|
Back to top |
|
|
bassvandijk Guru
Joined: 13 Sep 2002 Posts: 306 Location: Haps, Netherlands
|
Posted: Mon Aug 18, 2003 9:10 pm Post subject: |
|
|
Nevermind...
I think it's working !!!
On my AMD 850 Mhz I suddently get 100% CPU usage and I see a process cc1
EDIT:
My other laptop works to !!! |
|
Back to top |
|
|
carambola5 Apprentice
Joined: 10 Jul 2002 Posts: 214
|
Posted: Tue Aug 19, 2003 5:11 am Post subject: Re: Distcc from Bootstrap and on |
|
|
lisa wrote: |
Step 1
Code: |
USE='-gtk -selinux' emerge --buildpkg distcc
|
|
Wouldn't this require that your CFLAGS for both machines be compatible? I mean, if you execute this emerge on machine A to be used for bootstrapping on machine B, and machine A had march=athlon-xp while machine B was a celeron, I don't think this would work.
Could you possibly execute this emerge right off the LiveCD and just copy everything over into the chroot jail? |
|
Back to top |
|
|
bassvandijk Guru
Joined: 13 Sep 2002 Posts: 306 Location: Haps, Netherlands
|
Posted: Tue Aug 19, 2003 7:18 am Post subject: |
|
|
http://distcc.samba.org/
Quote: | distcc does not require all machines to share a filesystem, have synchronized clocks, or to have the same libraries or header files installed. They can even have different processors or operating systems, if cross-compilers are installed. |
Should say enough... |
|
Back to top |
|
|
carambola5 Apprentice
Joined: 10 Jul 2002 Posts: 214
|
Posted: Tue Aug 19, 2003 11:42 am Post subject: |
|
|
bassvandijk wrote: | http://distcc.samba.org/
Quote: | distcc does not require all machines to share a filesystem, have synchronized clocks, or to have the same libraries or header files installed. They can even have different processors or operating systems, if cross-compilers are installed. |
Should say enough... |
I'm not talking about using distcc to compile other things. I, in fact, have it running over three machines right now: celeron, athlon-tbird, and athlon-xp. I know it works that way.
What I'm talking about is the actual binary package for distcc. lisa's instructions have the person compile distcc just like any other package, then install it to a different computer. In the extreme case, she (i presume lisa is female?) failed to restrict building distcc on a ppc, then copying the lib files over to an x86 box. So what I meant to say is: How do you know the binary executable for distcc will be compatible with the new machine? |
|
Back to top |
|
|
lisa Retired Dev
Joined: 01 Jun 2003 Posts: 273 Location: York, UK again! Horray!
|
Posted: Tue Aug 19, 2003 1:38 pm Post subject: Re: Distcc from Bootstrap and on |
|
|
carambola5 wrote: | Wouldn't this require that your CFLAGS for both machines be compatible? |
Yes, they would - CHOST, too. _________________ Distcc guide
Visit my website
I maintain Distcc, Ccache, Memcached, and some others (i think) |
|
Back to top |
|
|
bassvandijk Guru
Joined: 13 Sep 2002 Posts: 306 Location: Haps, Netherlands
|
Posted: Wed Aug 20, 2003 9:51 am Post subject: |
|
|
Aha now I understand...
I copied the distcc binaries and libraries from my AMD Thunderbird to my Pentium 4 laptop.
Both have completely different CFLAGS flags (with -march=Pentium4 and -march=athlon-tbird) aldough the CHOST flags are the same (i686-pc-linux-gnu).
Somehow it just worked
(But if distcc would be included on the LiveCD this shouldn't be a problem anymore.) |
|
Back to top |
|
|
akmolloy n00b
Joined: 12 Jul 2003 Posts: 5
|
Posted: Wed Aug 20, 2003 4:25 pm Post subject: Easier Way? |
|
|
https://forums.gentoo.org/viewtopic.php?p=472264&highlight=#472264
Quote: |
This worked for me to start using DISTCC from bootstrap, and was painless:
1. Right before you run bootstrap.sh (step 11 in the install instructions), do an
Code:
emerge -O distcc
I tried it without the -O, but it wanted to install tons of other packages, even with a USE="-*".
2. Set your MAKEOPTS, DISTCC_HOSTS, and FEATURES flags to the appropriate settings in /etc/make.conf.
3. Run:
Code:
scripts/bootstrap.sh
This worked fine for me, YMMV. I had tried other things from previous threads which involved editing the bootstrap.sh file, but those didn't want to work, so I thought I'd go with simplicity. |
|
|
Back to top |
|
|
ebrostig Bodhisattva
Joined: 20 Jul 2002 Posts: 3152 Location: Orlando, Fl
|
Posted: Wed Aug 20, 2003 9:57 pm Post subject: |
|
|
Thanks Lisa!
I just rebuilt a machine here and used the instructions above to get distcc working. Really nice to be able to use distcc during bootstrap since I build all my boxes from stage 1.
Thanks again
Erik _________________ 'Yes, Firefox is indeed greater than women. Can women block pops up for you? No. Can Firefox show you naked women? Yes.' |
|
Back to top |
|
|
JSharku Apprentice
Joined: 09 Feb 2003 Posts: 189 Location: Belgium
|
Posted: Thu Aug 21, 2003 7:14 am Post subject: |
|
|
Great guide!! If only I'd seen this before spending 72+ hours bootstrapping a Pentium 100 MHz; well 36+ hrs actually, the first time it died due to a dodgy nfs share... Oh well, it's running now.
I've also noticed that some packages don't do distcc at all, xfree for example, and get compiled on localhost in their entirety. I guess it's not safe to use distcc for those?
Sharku |
|
Back to top |
|
|
ebrostig Bodhisattva
Joined: 20 Jul 2002 Posts: 3152 Location: Orlando, Fl
|
Posted: Thu Aug 21, 2003 6:30 pm Post subject: |
|
|
JSharku wrote: | Great guide!! If only I'd seen this before spending 72+ hours bootstrapping a Pentium 100 MHz; well 36+ hrs actually, the first time it died due to a dodgy nfs share... Oh well, it's running now.
I've also noticed that some packages don't do distcc at all, xfree for example, and get compiled on localhost in their entirety. I guess it's not safe to use distcc for those?
Sharku |
If people discover ebuilds that do not use distcc, please update Ebuilds that ignore distcc so Lisa can track and check out the ebuilds as to why this is so.
Erik _________________ 'Yes, Firefox is indeed greater than women. Can women block pops up for you? No. Can Firefox show you naked women? Yes.' |
|
Back to top |
|
|
chrisis Tux's lil' helper
Joined: 22 May 2003 Posts: 112 Location: Auckland
|
Posted: Mon Sep 08, 2003 1:06 am Post subject: Re: Distcc from Bootstrap and on |
|
|
lisa wrote: |
Code: |
On the new box, inside chroot:
cd /tmp
tar xvfz distcc.tar.gz
tar xvfjp distcc-DISTCC_VERSION.tbz2
mv usr/* /usr/
mv var/* /var/
mv etc/* /etc/
|
You should now have the core files for distcc installed (yay)!
Ignore this error: bzip2: (stdin): trailing garbage after EOF ignored
|
Hi. Most of this guide worked for me (I am bootstrapping a box atm, and the tail of my distccd log is wagging ). However, when I followed the above steps, I got errors for each mv command: "Cannot overwrite x" for each of /usr, /var, and /etc. I double-checked that I had typed each correctly, and I had. So then I tried
... and ended up have to untar my stage1 and portage snapshot to replace all the stuff that disappeared. After I did that, everything worked. I suspect that I could have avoided the untarring had I simply manually mv'd the contents of each directory in /tmp/usr(/var/etc)? i.e. something like
Code: | cd /tmp/usr
cd bin
mv * /usr/bin/
(etcetera) |
Or can you spot something else that I did wrong?
Chrisis _________________ But the situation seemed to call for witty repartee. "Huh?" I said. |
|
Back to top |
|
|
lisa Retired Dev
Joined: 01 Jun 2003 Posts: 273 Location: York, UK again! Horray!
|
Posted: Mon Sep 08, 2003 1:16 am Post subject: Re: Distcc from Bootstrap and on |
|
|
chrisis wrote: | lisa wrote: |
Code: |
On the new box, inside chroot:
cd /tmp
tar xvfz distcc.tar.gz
tar xvfjp distcc-DISTCC_VERSION.tbz2
mv usr/* /usr/
mv var/* /var/
mv etc/* /etc/
|
|
|
Check your line. Inside /tmp, you issue mv usr/* /usr/. Note placement of / and *. _________________ Distcc guide
Visit my website
I maintain Distcc, Ccache, Memcached, and some others (i think) |
|
Back to top |
|
|
chrisis Tux's lil' helper
Joined: 22 May 2003 Posts: 112 Location: Auckland
|
Posted: Mon Sep 08, 2003 1:55 am Post subject: Re: Distcc from Bootstrap and on |
|
|
lisa wrote: |
Check your line. Inside /tmp, you issue mv usr/* /usr/. Note placement of / and *. |
This is what I did. I've just gone back in the history and I have the command exactly as you have it.
Fortunately it is something minor that I had to work around. Thanks for the help. And btw, thanks for a kewl guide.
Chrisis _________________ But the situation seemed to call for witty repartee. "Huh?" I said. |
|
Back to top |
|
|
VisualPhoenix Tux's lil' helper
Joined: 26 Sep 2002 Posts: 135 Location: (CT v NJ)
|
Posted: Tue Sep 09, 2003 8:18 am Post subject: |
|
|
Hey guys... I love distcc THANKS FOR THE THREAD LISA!
I just wanted to report:
!!! ERROR: media-libs/tiff-3.6.0_beta2 failed.
!!! Function src_compile, Line 29, Exitcode 2
!!! (no error message)
I think distcc and this package dont play nice together...
here is the error:
../libtiff/libtiff.so.3: undefined reference to `__builtin_va_start'
collect2: ld returned 1 exit status
distcc[10542] ERROR: compile on localhost failed
make[1]: *** [fax2tiff] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/tiff-3.6.0_beta2/work/tiff-v3.6.0-beta2/tools'
make: *** [all] Error 2
dunno if that it but it might be distcc... i'm trying now w/ straight gcc... |
|
Back to top |
|
|
lisa Retired Dev
Joined: 01 Jun 2003 Posts: 273 Location: York, UK again! Horray!
|
Posted: Tue Sep 09, 2003 4:12 pm Post subject: |
|
|
VisualPhoenix wrote: | Hey guys... I love distcc THANKS FOR THE THREAD LISA!
I just wanted to report:
!!! ERROR: media-libs/tiff-3.6.0_beta2 failed.
!!! Function src_compile, Line 29, Exitcode 2
!!! (no error message)
I think distcc and this package dont play nice together...
here is the error:
../libtiff/libtiff.so.3: undefined reference to `__builtin_va_start'
collect2: ld returned 1 exit status
distcc[10542] ERROR: compile on localhost failed
make[1]: *** [fax2tiff] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/tiff-3.6.0_beta2/work/tiff-v3.6.0-beta2/tools'
make: *** [all] Error 2
dunno if that it but it might be distcc... i'm trying now w/ straight gcc... |
Read this bug. _________________ Distcc guide
Visit my website
I maintain Distcc, Ccache, Memcached, and some others (i think) |
|
Back to top |
|
|
|