Acceptable Collateral Damage

Fine, I'll Play Your Little Game

A minor technical note, if you would – I’m building Mozilla from source these days for my own amusement, and I’ve had these problems with it that I should probably document. And some of you out there in internet-land might be asking yourselves the same questions, like “If I upgrade to Snow Leopard, and I’m heavily invested in MacPorts, what happens?” or “I followed the instructions and it didn’t work, double-yew-tee-eff?” So, here you go. I’ll put them up on the wiki in a few moments.

The short version is: when you upgrade to Snow Leopard you need to rebuild your dev environment from scratch. Otherwise you get a lot of spurious errors from MacPorts (no libiconv, can’t make executables, no perls, etc) that are all basically lies. Do not get fooled into playing whackamole with the MacPorts errors; that is not the way. Purge and rebuild.

The long version is as follows:

  • If you have the Leopard XCode package installed, the Snow Leopard installer won’t touch it; you need to go back to the DVD and get Snow Leopard’s XCode package out of the Optional Installs, or you’ll start getting “compiler cannot create executables” errors, or something very much like that. Obvious! But I declare it also “easy to overlook” because I overlooked it and doing so was, in hindsight, pretty easy.
  • Uninstall all of your ports: “sudo ports -f uninstall installed” from a shell prompt. After that, “sudo ports clean installed” just to be sure, “sudo ports selfupdate” and “sudo ports sync”.

Some of these steps might be unnecessary – if you’re working with the latest version of MacPorts “selfupdate” won’t do anything, for example – but this fix works for me. Now you can go back to step 3 of the OSX Prerequisites page and follow along, and it will work as advertised.

3 Comments

  1. Zeynep
    Posted November 9, 2009 at 9:44 am | Permalink

    You know, I have no useful contribution re: Mozilla building from source code, but the look in your daughter’s eyes clearly says “There will be retribution for this [costume].”

    HTH, HAND.

  2. kev
    Posted November 10, 2009 at 9:37 am | Permalink

    do I want to know why you’re building from source? most folks do it for a reason, not to satisfy their masochistic needs.

  3. mhoye
    Posted November 10, 2009 at 9:39 am | Permalink

    Hard to contribute patches if you can’t build!