View previous topic :: View next topic |
Author |
Message |
appleshampoo Tux's lil' helper


Joined: 26 Sep 2004 Posts: 116
|
Posted: Mon Apr 06, 2009 7:25 pm Post subject: distcc cross compiling with debian and gentoo |
|
|
Hi folks,
I have a dinosaur of a box (P2 350MHz, 96MB RAM) running a gentoo install that hasn't been updated in a while and I'd like to get it up to speed. Meanwhile I have a more recent (dual P4 3GHz, 1GB RAM) debian box lying around that I'd like to have help out with the compiling. I have distcc set up and the boxes are talking to each other okay (and they have the same gcc versions, 4.3.2), but the Gentoo box was bootstrapped from stage 1 and the CHOST is actually'i686-pc-linux-gnu'. So naturally, the distcc daemon on the debian box can't do these compiles.
Now if both systems were Gentoo, I'm pretty sure I could solve this with crossdev as described here, but they're not. It looks like this guy had almost the exact problem, but I'm fuzzy on the details of how he solved it.
He says that he got "Gentoo's gcc transferred to the Debian box", but how do I do this? Copy specific files, dirs, or can I make a tarball of the toolchain on the Gentoo box and just move it over? I was going to try to emerge crossdev on the target box and slurp up the generated toolchain but...what's the point, I've already got that toolchain on that box, I just don't know exactly how to get it in a portable format.
Thanks for any help. Criticisms for not running Gentoo on the new box happily accepted and ignored :-) _________________ eden: HP, dual P4 3.0GHz,1GB,~160GB, ubuntu lucid
still <3 gentoo |
|
Back to top |
|
 |
ccp n00b

Joined: 14 Sep 2007 Posts: 62
|
Posted: Mon Apr 06, 2009 7:45 pm Post subject: |
|
|
I think use
will create tar-gz files in your $PKGDIR then you can take the result tar-gz file to your debian machine. but I think you may need more then gcc.
Anyway, another idea; put a new stage3 in your debian, then chroot to newly created stage3 env. build distcc then manually start distcc. |
|
Back to top |
|
 |
appleshampoo Tux's lil' helper


Joined: 26 Sep 2004 Posts: 116
|
Posted: Tue Apr 07, 2009 10:30 pm Post subject: |
|
|
ccp wrote: | I think use
will create tar-gz files in your $PKGDIR then you can take the result tar-gz file to your debian machine. but I think you may need more then gcc.
Anyway, another idea; put a new stage3 in your debian, then chroot to newly created stage3 env. build distcc then manually start distcc. |
I am currently trying this. Of course I can't properly emerge the tbz2 on the debian machine, but I've unpacked it manually and I'm going to see what I can do with it... _________________ eden: HP, dual P4 3.0GHz,1GB,~160GB, ubuntu lucid
still <3 gentoo |
|
Back to top |
|
 |
appleshampoo Tux's lil' helper


Joined: 26 Sep 2004 Posts: 116
|
Posted: Tue Apr 07, 2009 11:41 pm Post subject: |
|
|
appleshampoo wrote: | ccp wrote: | I think use
will create tar-gz files in your $PKGDIR then you can take the result tar-gz file to your debian machine. but I think you may need more then gcc.
Anyway, another idea; put a new stage3 in your debian, then chroot to newly created stage3 env. build distcc then manually start distcc. |
I am currently trying this. Of course I can't properly emerge the tbz2 on the debian machine, but I've unpacked it manually and I'm going to see what I can do with it... |
Here's what I did that *seems* to be working.
First ran to get gcc-4.3.2 in a tarball (I still have 4.1.1 lying around too).
Copied that oven to the debian system, unpacked it in /extra/gcc (/extra is just a partition I have lying around)
I now had the gcc-4.3.2 executables sitting in /extra/gcc/usr/i686-pc-linux-gnu/gcc-bin/4.3.2. I went in to /usr/bin and created the following symlinks:
Code: |
lrwxrwxrwx 1 root root 68 2009-04-07 15:57 i686-pc-linux-gnu-c++ -> /extra/gcc/usr/i686-pc-linux-gnu/gcc-bin/4.3.2/i686-pc-linux-gnu-c++
lrwxrwxrwx 1 root root 68 2009-04-07 15:57 i686-pc-linux-gnu-cpp -> /extra/gcc/usr/i686-pc-linux-gnu/gcc-bin/4.3.2/i686-pc-linux-gnu-cpp
lrwxrwxrwx 1 root root 68 2009-04-07 15:57 i686-pc-linux-gnu-g++ -> /extra/gcc/usr/i686-pc-linux-gnu/gcc-bin/4.3.2/i686-pc-linux-gnu-g++
lrwxrwxrwx 1 root root 68 2009-04-07 15:57 i686-pc-linux-gnu-gcc -> /extra/gcc/usr/i686-pc-linux-gnu/gcc-bin/4.3.2/i686-pc-linux-gnu-gcc
lrwxrwxrwx 1 root root 73 2009-04-07 15:57 i686-pc-linux-gnu-gfortran -> /extra/gcc/usr/i686-pc-linux-gnu/gcc-bin/4.3.2/i686-pc-linux-gnu-gfortran
|
And then followed the guidelines at the distcc cross-compiling guide for the machine doing the merge (to make sure distcc was passing the complete CHOST-ified gcc executable name). In retrospect, if this works, I probably could have just copied those executables straight over to the /usr/bin directory...I'm kind of flying by the seat of my pants here, although I really *should* know how this stuff works in more detail than I do.
So far so good...I'm about 6 packages deep into an 'emerge -ave system' after which I will do the same thing for world. (I'm upgrading from gcc-4.1.1 to 4.3.2 so I'm rebuilding everything. I'm not sure if it is necessary for this specific upgrade, but a world/system update wouldn't be that much less anyway.) Tailing the distcc log on the helper machine I'm seeing a bunch of jobs coming through. I actually disabled local compilation on the old machine because it's so much slower.
I'll report back if I run into problems with the distcc part. _________________ eden: HP, dual P4 3.0GHz,1GB,~160GB, ubuntu lucid
still <3 gentoo |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|