New Computer, New Tools (GCC on Mac OS X)

I recently traded in my two-and-a-half year old MacBook for a sexy new 13.1 inch MacBook Pro. It's pretty much the base model plus a 128 SSD, 'cause I read somewhere that SSDs are "... the most cost effective performance increase you can buy... "

I have to say, it's pretty awesome. Thanks to the migration assistant Chrome and Firefox were already there, Pandora and Gmail already knew who I was: It was pretty much a drop-in replacement for my old computer, except faster an shinier. "Pretty much" is kind of the operative phrase there. I did have to reinstall GCC, and that was a pain. Y'see, the entire reason I use a MacBook is because Mac OS X is a *nix with a pretty, consistent, GUI. I'm a build-from-source kind of guy, so I need a C compiler on my laptop, and getting that compiler onto my MacBook was way harder than it ought to be.

Here's what setting up a build environment on Ubuntu (my other *nix of choice) looks like:

sudo apt-get install build-essential

One command that I can type from memory1 and a little bit of waiting. Contrast that with what you need to do to get GCC on Mac OS X:

  1. Register as a developer at which includes explaining whether your interested in building iPhone apps, iPad apps or iPhone apps.
  2. Download Xcode, which is like 3 Gigs (keep in mind, I have an SSD, it's teeny). This took all. Frigging. Day. I don't know if it was Verzion, or Apple or both, but some router, somewhere was conspiring to keep me from getting my C compiler in a timely fashion.
  3. Install Xcode and remembering to not install the iOS environment which takes up like 8 Gigs (SSD!). You can't just install GCC, you have to install Xcode (a development environment I will never use, I have Vim after all) so there goes 2 Gigs I'll never get back.
  4. You now have a C compiler, and can now checkout and build clang from source.
  5. You now have not one, but two C compilers. All is right in the world. (Okay, so that last step is superfluous, but, who doesn't want a C compiler they built themselves from source?)

So that's only a days worth of downloading and a multi-gigabyte install so that I can compile "Hello World": Come on!

Now the reality is, the last time I had to do this was two and a half years ago, and if my computer only annoys me enough to write about it once every couple of years, I'm doing pretty good.

[1]The package might actually be named build-essentials, but since Ubuntu's apt-get auto-completes package names, you just have to type build-^TAB and you get the right thing.