Mac Nerd Post: MacPorts and XCode

I’d been pretty frustrated with MacPorts (née DarwinPorts) over the past year. stuff just seemed to break a lot, or not build for me, or whatever. It was frustrating, and it drove me to “roll my own” copies of a lot of software, which was a huge hassle.

I’ve been trying to follow this Haskell Wikibook on and off lately and one of the things that hosed me was that the installation instructions for the Haskell compiler, GHC, are basically “install it with Macports!” And it wouldn’t. It wouldn’t work for me. Errored out again and again. Finally I googled up the error message and found out that it was associated with having the wrong version of Xcode installed for your version of MacPorts…

The who what? Version of Xcode? I never checked my version of Xcode… glory be, there were new ones. I’m used to Macs telling me automatically when updates of anything are available, not seeking them out on Apple’s web site. I had no idea I was behind.

I wiped out my MacPorts directory and GHC built for me the first time. (Took forever, but it built cleanly the first time, no effort required beyond the command “sudo port install ghc.”)

MacPorts and I are friends again, and my home-compiled copies of a lot of stuff are going away.