|
|
Or "How i spent an evening kicking my computer"
Why on earth would you want to build a linux cross-compiler on cygwin? Well, unfortunately my desktop PC runs windows but has more horsepower than my linux 'server', the idea was to get distcc working using the cygwin box as a 'client' to build linux binaries.
The whole process is outlined here: http://www.xraylith.wisc.edu/~khan/software/gnu-win32/cygwin-to-linux-cross-howto.txt
One thing i found was the way the tar commands were written didn't work for me; i did like so: ( cd /; tar chv ) | tar xf -
In other words I used --dererence and copied all symlink targets. I ended up with 650 MB of libraries etc. before compression, but hey disk space is cheap these days....
One caveat i initially tried on an existing cygwin installation which i've had for a while. I just used the setup program to update. The compilation of gcc died everytime. I nuked the entire cygwin directory and did a fresh install and everything worked. Don't know why...
CAUTION:
I now have 1 linux main machine and 2 cygwin hosts. If i start to compile with
make -jx where x is more than the number of machines i have setup for distcc then the cygwin hosts go crazy to 100% CPU usage and you need to kill the distccd daemon on the linux host and then kill distccd on the cygwin boxes to get them back under control.
Update:
After using distcc for a while; i'm pretty sure this issue only arose when doing the main build on the cygwin box.
Some quick stats:
Compile apache2 without distcc:
12 minutes
with distcc and 1 Pentium III 800Mhz with a cygwin cross compiler
9 minutes
with distcc and 1 pentium III 800Mhz and 1 pentium 4 1.6Ghz both with cygwin cross compilers
7 minutes
|
|