Linux, distcc and Mac OS X

If you’re like me, and have Fink installed on your Mac and compiling away all those wonderful unix applications, and you have a desktop nearby running linux (with more processor power being unused), you’ll want to setup distcc so you can harnass all that power.

I found a rather nice article that contains a walkthrough on how to get things done.

It works nicely. A few remarks:

  • Download the correct gcc version from Apple. You can check your Mac’s version by running gcc -v:
    $ gcc -v
    Using built-in specs.
    Target: i686-apple-darwin8
    ...
    Thread model: posix
    gcc version 4.0.1 (Apple Computer, Inc. build 5367)

    That build is important.
  • Don’t bother trying to build the odcctools on x86_64. It’s broken, kaput. Install yourself a 32bit chroot and build as from there. Don’t forget to switch back to the 64bit environment when building gcc!

Now, the other thing you need to do is convince fink to use distcc.

After compiling a while, you should have a working distcc setup. Unfortunately, for some reason my distcc’s keep segfaulting on my debian box, so that’s one issue I have to fix. If anyone can help, feel free ;)

Bookmark the permalink.

2 Comments

  1. Thanks for the pointers, especially the bit about not bothering to try to compile the assembler on x86_64.

    However, I do have one question: Where did you find the gcc tarball for build 5367?

    I’ve found the tarball for 5363 on Apple’s download site (as of about a half hour ago, at least), but 5367 ain’t there, and google is no help. Was it there when you looked?

    (5363 craps out in building cc1plusobj, btw, so I just want to try the exact same build before chasing phantoms like using gcc-4.0.1 to actually compile the cross-compiler, etc…

    Thanks again!

  2. In the end I used build 5363, but I honestly don’t recall what I did to get it all working.

    After a while I stopped using it again, as it caused some programs to fail compilation. I never bothered to investigate why – I guess I should look into that.

Leave a Reply

Your email address will not be published. Required fields are marked *