Slashdot Mirror


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."

12 of 64 comments (clear)

  1. This is news? by shamino0 · · Score: 4, Interesting
    MacOS X has always used gcc as the main compiler. And GCC has always supported cross-compiling. I would be far more surprised if you couldn't compile Apple's version of GCC to cross-compile from Windows/Linux/Solaris/whatever.

    I suppose it's worth noting that someone's distributing such a cross-compiler, but the most newsworthy aspect is that it took somebody this long to get around to doing it.

  2. Cool, I like this! by Cecil · · Score: 3, Interesting

    This is great! I do all my development on my 12" Powerbook G4, since I prefer to code in (and for) Mac OS X. That is all good, but it certainly isn't the fastest thing in the world, and I dread having to compile something large like Tex or Mozilla on it. If I was able to get it to do distributed compiles on the numerous Athlons I've got sitting around, it would be awesome.

    1. Re:Cool, I like this! by Ranger+Rick · · Score: 4, Interesting

      XCode uses distcc for it's distributed compiles; the problem is it's an old version and the patch is no where near applying cleanly to modern distcc. Might be easier to just use something to advertise distcc on rendezvous manually.

      --

      WWJD? JWRTFM!!!

  3. How it should be by MrIrwin · · Score: 5, Interesting
    Ferrari use Fiat vans to ship car parts around.

    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 ;-)

    1. Re:How it should be by gsfprez · · Score: 5, Interesting

      >why not use cheap bland hardware for backend muling?

      sometimes, you're a small business and you don't want to pay someone $xxxxxx to run your backend mules. You don't know how to grok Linux email and file servers because you're a parts manufacturer, or a solar panel business, or a gift basket maker...

      With Mac OS X Server and a $300 iMac off eBay and prudent backups, you could run email for 40 people and have your own webserver off your home DSL with no problem.

      I only know this because i did it. They know jack shit about running computers. I did the scary part and installed the server for them (i hit "okay" a lot) and then showed them...

      see this window? This is where you add users... this window shows you that your email server is running just fine.

      They call me every so often to tell me that things are fine. And i get to not answer dumbass questions and watch the playoffs on ESPN.

      They own their IT... their IT does not own them.

      With Linux, if you're going to have geeks around, then yes, its cheaper and does everything i just mentioned at a MUCH lower cost. But if you're not a geek, and you want services like email and web servers for small business, and you want rock solid performance (not Windows shitty performance) then you're wanting Mac OS X Server.

      Mac OS X Server is the greatest boon to small business i've ever seen. I have helped 4 small businesses (friends) do this - and they are all running just fine without me - and they have all the stability that they would get from a competent Linux install and a in-house geek running it.

      Mac OS X Server can get a lot of low-ball geeks fired... OR it can help low-ball geeks make a lot of money serving a lot more customers. Its all in how you think about it.

      --
      guns kill people like spoons make Rosie O'Donnell fat.
  4. Re:Works in reverse, too...I think! by lpontiac · · Score: 4, Interesting
    pecifying '-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.

    The Darwin 7.x installation CD you can get from Apple (also linked from opendarwin.org) does have fat binaries for everything, although MacOS X proper doesn't.

    Well, a slight correction - everything in /usr/bin in the Darwin 7.x is either a script or a fat binary, with one sole exception - distcc. Methinks Apple doesn't like the idea of Mac developers buying a Mac for every desk, then a pile of cheap x86's to make builds ten times faster :)

  5. Apple GCC vs. GNU GCC by WatertonMan · · Score: 3, Interesting

    I thought Apple's gcc was slightly different than the regular gcc - especially in terms of PPC optimizations. If true, then the code output won't be quite the same, will it?

    1. Re:Apple GCC vs. GNU GCC by TomorrowPlusX · · Score: 2, Interesting

      Any chance apple's Objective-C++ patches will *ever* be integrated into mainstream GCC?

      I simply could *not* get my development work done ( at least, not gracefully ) without Objective-C++, and that's a bit hampering considering I'm a believer in The Right Tool for the Right Job.

      Some things are better written in C++ and some things are better written in Objective-C. Sometimes both will be needed for one project, and if i have to write vanilla C glue between them I'll be rather unhappy. Sure, C glue-code works, but you tend to lose polymorphism, and you end up with a bunch of typedef'd pointer types, which while acceptable, give me vietnam-style flashbacks to GTK programming, and I don't like that.

      I love developing on Mac OS X, mainly because I love Cocoa. I'd love to be able to port my work to GNU Step, but without Objective-C++ it's simply not going to happen.

      --

      lorem ipsum, dolor sit amet
  6. Re:The iso download by Anonymous Coward · · Score: 1, Interesting

    http://www.archive.org/web/freecache.php

  7. Re:fruits by geoffspear · · Score: 3, Interesting

    Xcode will let me do distributed compiling on whatever random Macs happen to be on my network, without buying an Xserve cluster.

    --
    Don't blame me; I'm never given mod points.
  8. Nice job by -tji · · Score: 4, Interesting

    This is a cool concept. I would think that most Mac users have at least one fast/cheap PC laying around. I know I've got a few of them. You might as well use them for some extra horsepower.

    What would be really cool is an x86 agent for iMovie, iDVD, and Final Cut - where it could offload all of the number frunching of MPEG2 compression or other video conversion to some cheap PC's in the basement. I would love to have my 450MHz G4 Cube as the front end, and my Athlon 64 doing the heavy lifting behind the scenes.

  9. Sparc... by Roogna · · Score: 2, Interesting


    Now when is someone going to post binaries for cross-compiling to Mach-O PPC from Sparc's. I've got a bunch of Sun's here I could be using. Granted, I know I could do this myself. But gcc takes so bloody long to compile ;)