Useful but not complete: https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Illumos
pkgin up
pkgin in build-essential ghc
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
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