DEV Community

Carlos Saltos
Carlos Saltos

Posted on • Updated on

Install Elm for OpenBSD x86_64

What?

Just some quick steps to compile Elm for OpenBSD on amd64 based chips since the official distribution does not support OpenBSD yet.

How?

Get OpenBSD installed and run these commands as root:

pkg_add git
pkg_add cabal-install

git clone https://github.com/elm/compiler.git
cd compiler
git checkout 0.19.1

rm worker/elm.cabal
cabal new-update
cabal new-configure
cabal new-build
Enter fullscreen mode Exit fullscreen mode

Wait for a while and the binary should be hopefully at compiler/dist-newstyle/build/x86_64-openbsd/ghc-*/elm-0.19.1/x/elm/build/elm/elm

IMPORTANT: Please ensure you have at least 4 gigas RAM memory available for the compilation to work

Who?

As always a big thank you to Evan Czaplicki and the wonderful people creating and maintaining Elm.

Some references compilation optimizations may be found at https://github.com/elm/compiler/blob/0.19.1/installers/linux/Dockerfile and https://gist.github.com/rlefevre/1523f47e75310e28eee243c9c5651ac9

For learning more about Elm please go to Elm The Complete Guide

Top comments (0)