Skip to content

Instantly share code, notes, and snippets.

@bahamat
Forked from bdha/gist:c456cf6e5484ea5ad256
Last active December 20, 2020 01:06
Show Gist options
  • Save bahamat/c154b59ea1c5710e141c to your computer and use it in GitHub Desktop.
Save bahamat/c154b59ea1c5710e141c to your computer and use it in GitHub Desktop.
haskell ghc 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

PREFIX=/opt/ghc LD=/usr/bin/ld ./bootstrap-sh
export PATH=$USER/.cabal/bin:$PATH
cabal update
cabal install cabal-install
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