Skip to content

Installation of GHC 6.12.1 on Mac OS X

Udit Gupta edited this page Sep 21, 2018 · 5 revisions

This is still a bit sketchy – compiler patches need to be applied. I would recommend using a linux VM for the moment for minimal hair-pulling, as I haven’t tested these steps for a while. More wiki-gardening required.

It looks like the haskell team is working on the dynamic library/mac os x problem for the 6.12.3 Haskell release (see http://hackage.haskell.org/trac/ghc/ticket/3550). Though, as of 4/19/10, no date has been set for release (http://hackage.haskell.org/trac/ghc/roadmap).

That said, if you’re determined it is possible to get working on Mac, you just need a few patches.
First, get c2hs installed with GHC 6.10 (as it’s currently broken on 6.12)

Then, apply the patches here:

  1. GHC patch:
  2. http://hackage.haskell.org/trac/ghc/ticket/3550
  3. Cabal patch:
  4. http://hackage.haskell.org/trac/hackage/ticket/591

We can then install the Haskell support lib (these instructions assume you’re using Ruby 1.9 from ports: adjust the include-dirs and lib-dirs as appropriate if you’re not)

  1. probably a better way of doing this, but this is how i build it.
    cabal unpack hubris
    cd hubris-0.0.2
  2. edit the —extra-include-dirs and —extra-lib-dirs to reflect
  3. your installation. You’ll need the ruby headers installed -
  4. they’re installed already in ports, and it’s ruby1.9.dev on Ubuntu.
    runhaskell Setup configure —enable-shared —user —ghc-options=-dynamic —extra-include-dirs=/usr/local/include/ruby-1.9.1/ —extra-lib-dirs=/usr/local/lib/
    runhaskell Setup build
    runhaskell Setup install
  5. check that Hubrify is now in your path.

Then the Ruby side

  1. only if you haven’t got gemcutter yet
    sudo gem install gemcutter
    sudo gem install tumble
  1. and the actual package
    sudo gem install rake rspec open4
    git clone git://github.com/mwotton/Hubris.git
    cd Hubris/ext
    ruby extconf.rb && make
    cd ..
    spec .