Hello,
I would like to install Elm on FreeBSD, which currently fails because there are no FreeBSD binaries. It would be great if you could provide them. Alternatively, I could create a FreeBSD port, which would enable installing via the package manager (although not via npm). For that, a bit of documentation on how to build from source would be appreciated.
Thank you!
I think that folk might be able to help on the #compiler channel in elm slack :)
I finally got it to build on FreeBSD 12.0 by modifying elm.cabal and running cabal new-build in the compiler-0.19.0 directory.
--- compiler-0.19.0.orig/elm.cabal 2018-08-20 21:41:41.000000000 +0800
+++ compiler-0.19.0/elm.cabal 2019-02-22 22:24:12.029313000 +0800
@@ -246,7 +246,7 @@
http-client >= 0.5 && < 0.6,
http-client-tls >= 0.3 && < 0.4,
http-types >= 0.9 && < 1.0,
- language-glsl >= 0.0.2 && < 0.3,
+ language-glsl >= 0.0.2 && < 0.4,
logict,
mtl >= 2.2.1 && < 3,
network >= 2.4 && < 2.7,
@@ -263,4 +263,4 @@
unordered-containers,
utf8-string,
vector,
- zip-archive
+ zip-archive < 0.4
I needed to allow a newer version of language-glsl (0.3.0) in order to have cabal successfully resolve dependencies for elm 0.19.0. I had to constrain zip-archive to versions less than 0.4 because of a change that caused an UnsafePath error when elm attempted to unpack downloaded packages during compilation (see https://github.com/elm/compiler/issues/1882).
I'm using GHC 8.6.2 (ghc862) and cabal-install 2.4.1.0 (hs-cabal-install).
stack (https://github.com/elm/compiler/issues/1894) didn't work for me because there's no package set that includes language-glsl 0.3 and GHC 8.6.2. The most recent version of language-glsl on stackage appears to be 0.2.1 (https://www.stackage.org/package/language-glsl). There's also the 64-bit inodes change in FreeBSD 12.0 that causes stack to produce a broken setup, but this can be worked around with the --system-ghc --no-install-ghc options (https://github.com/commercialhaskell/stack/issues/4503#issuecomment-453964325).
Edit: Added FreeBSD package names for GHC and cabal-install.
Thanks @huggablemonad! Your instructions helped me build elm on FreeBSD 11.2.
What would it take to make a port out of those build instruction?
@glorieux My guess is that you'd need to create the patch needed to build on freebsd and the port makefile, and that should be it. The Porter's Handbook should be helpful.
Here is the open bug for the new port: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236805
Now waiting for review.
In the meantime you can use the attached shar file to add the lang/elm port and install it.
I would advise to install the pre-compiled ghc and cabal packages since they take a long time to compile.
Tracking in https://github.com/elm/compiler/issues/1949
Now available https://www.freshports.org/lang/elm/ 馃帀
Thanks to all contributors.
Most helpful comment
Here is the open bug for the new port: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236805
Now waiting for review.
In the meantime you can use the attached shar file to add the
lang/elmport and install it.I would advise to install the pre-compiled
ghcandcabalpackages since they take a long time to compile.