Use x86 Boxes to Compile Mac OS X Binaries
IceFox writes "While working on the KDE on Darwin project I have only had one Mac to do development with. At the same time I have been playing around with distcc for Linux/x86 compiling. Combining the two projects I built a Mac OS X cross-compiler (for Linux/x86) and have created the DistccPPCKnoppix distribution. DistccPPCKnoppix is a 46MB Knoppix distribution based on distccKnoppix; with it you can use your extra x86 computers to build Linux/x86 or Mac OS X/PPC binaries. It might not be as shiny as an Xserve cluster, but it is a heck of a lot cheaper."
The reason it's news is that GNU has no support for Mach-O, Apple has their own assembler and linker. Making them work on linux is a real pain in the ass.
WWJD? JWRTFM!!!
Not any more though, and I have to say that having this new distcc-centric Knopix distro around has turned it from being 'a pain in the ass' to 'unbelievably easy, cheap, and fast!' ...
... how can I put this: c'mon Microsoft, roll your own distro, for cryin' out loud!!!
oh dear. linux is unstoppable. you'd think that, by now, the point where linux is becoming 'The Development Environment of Choice' for compiling stuff for Other Operating Systems, well
; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
Um, yeah, an Xserve is a piece of hardware, and a C-compiler is a piece of software. apples and oranges.
you could install distcc on your Xserve cluster, nnd it (the software) would still be cheap, and it (the hardware) would also be shiny.
Um, i guess the point is that if you want distributed compiling for MacOSX, heretofore the only option was Xserve cluster, and now linux/x86 cluster is also an option. ok ok....
Mac is about the desktop, why not use cheap bland hardware for backend muling.
And that is how it should be, we should be able to select the type of hardware for the job in hand, the software should run wherever it is required.
And if you thought that was boring you obviously havn't read my Journal ;-)
Specifying '-arch i386' on MacOS X doesn't work though. OSX doesn't ship with fat libraries, so it isn't possible to generate an x86 executable using the gcc switches. To make this work, you need to recompile several system frameworks and libraries and install them on your box. This is hairy. I saw instructions on how to do this about 2 years ago somewhere...
Compiling ppc on x86 or x86 on ppc is actually a bit easier using OpenDarwin. You can run this fat on your hardware and emit fat executables just as the man page suggests.
cr