Skip to content

Instantly share code, notes, and snippets.

@bdha
Last active August 29, 2015 14:15
Show Gist options
  • Save bdha/c456cf6e5484ea5ad256 to your computer and use it in GitHub Desktop.
Save bdha/c456cf6e5484ea5ad256 to your computer and use it in GitHub Desktop.
Building Haskell on SmartOS

Useful but not complete: https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Illumos

Prep

pkgin up
pkgin in build-essential ghc

cabal

Get tarball. Extract.

Modify ./bootstrap.sh to not override your LD:

https://github.com/haskell/cabal/blob/master/cabal-install/bootstrap.sh#L89

Should be LD=/usr/bin/ld

PATH=/opt/local/bin:$PATH PREFIX=/opt/ghc LD=/usr/bin/ld ./bootstrap.sh
export PATH=$USER/.cabal/bin:/opt/ghc/bin:$PATH
cabal update
cabal install cabal-install # Or cabal install cabal-install==1.20.0.6
cabal install happy
cabal install alex

ghc

Get tarball. Extract.

Modify ./libraries/base/GHC/Event/EPoll.hsc

Add

#include <sys/stdint.h>
#include <sys/signal.h>

above

#include <sys/epoll.h>

Build stuff

./configure --prefix=/opt/ghc
make -j 8
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment