Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide FreeBSD binaries (or document building from source) #1892

Closed
AnotherKamila opened this issue Feb 7, 2019 · 7 comments
Closed

Provide FreeBSD binaries (or document building from source) #1892

AnotherKamila opened this issue Feb 7, 2019 · 7 comments

Comments

@AnotherKamila
Copy link

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!

@harrysarson
Copy link

I think that folk might be able to help on the #compiler channel in elm slack :)

@huggablemonad
Copy link

huggablemonad commented Feb 22, 2019

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 #1882).

I'm using GHC 8.6.2 (ghc862) and cabal-install 2.4.1.0 (hs-cabal-install).

stack (#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 (commercialhaskell/stack#4503 (comment)).

Edit: Added FreeBSD package names for GHC and cabal-install.

@glorieux
Copy link

glorieux commented Mar 5, 2019

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?

@AnotherKamila
Copy link
Author

@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.

@glorieux
Copy link

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.

@evancz
Copy link
Member

evancz commented Jul 10, 2019

Tracking in #1949

@evancz evancz closed this as completed Jul 10, 2019
@glorieux
Copy link

Now available https://www.freshports.org/lang/elm/ 🎉
Thanks to all contributors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants