09 September 2009

MacPorts, Snow Leopard, and GHC == Sadness

Wow, it has been a long time since I've had anything to say on this particular blog. Another baby (we're at four now) will do that to a guy, I guess.

I was going to do a little exploratory coding tonight, and so installed XCode, then MacPorts, then tried to install GHC. MacPorts tells me (after installing most of the components) that "ghc is not yet supported on Mac OS X 10.6.x (SnowLeopard)."

I know it hasn't been out very long, but the APIs have supposedly been frozen since May, so I'm a bit surprised.

I guess I'll see if the package installer works, but I was hoping to go a little more cutting-edge.

8 comments:

dainanaki said...

Paul, the problem is that there's no 64 bit build for Macs yet. Use the Haskell platform installer and then google ghc Snow Leopard to help you configure it for building 32-bit binaries. It's the only way for now.

subway376 said...

I had no problems whatsever installing the latest Beta of the Haskell Platform for Mac in 10.6. You should try that.

Syzygies2 said...

Across the board on OS X or Linux, I use a package manager whenever I'd be happy with a version of a package from the last year or two. I have friends who adopt packages, and they tell me I should too, if I want to expect better than this for any package I care about. This has nothing to do with GHC, it's the norm.

There's a tiny issue with Snow Leopard; see http://hackage.haskell.org/trac/ghc/ticket/3400 and links for details.

Intall GHC using the package "GHC-6.10.4-i386.pkg" found directly on their site: http://haskell.org/ghc/download_ghc_6_10_4.html

Then edit (as superuser, e.g. "sudo nano /usr/bin/ghc") the file /usr/bin/ghc to change "-dynload" to "-optc-m32 -opta-m32 -optl-m32 -dynload". This forces GHC to issue 32 bit code; it can't yet manage 64 bit code for OS X.

dleimbach said...

It's because mac os x snow leopard and ghc don't agree on the system architecture.

If you don't use macports,you can install the latest GHC, and correct the wrapper scripts to emit good code per this thread in Haskell-Cafe.

http://www.haskell.org/pipermail/haskell-cafe/2009-August/065827.html

Paul R. Potts said...

Thanks for all the suggestions and info!

Paul R. Potts said...

I'm away from my Macs for the day, but I will try out these options when I get home.

Itkovian said...

I am still using the Haskell platform I installed on Leopard, and it seems to work fine.

Mietek said...

You may be interested in Homebrew, a fresh take on open-source package management on OS X. You can find formulae for GHC 6.12.1 and Cabal 0.8.0 in my fork.