elm-lang / elm-reactor

Interactive development tool that makes it easy to develop and debug Elm programs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exception in StaticFiles.hs when compiling 0.18 on FreeBSD

steinuil opened this issue · comments

I'm getting an exception when compiling elm-reactor along with the rest of the Elm 0.18 tools on FreeBSD 11-RELEASE-p1 amd64, with the instructions from the elm-package.

This is the command I ran:

runhaskell BuildFromSource.hs 0.18

And this is the error I get from elm-reactor. All the other components compile successfully.

[4 of 8] Compiling StaticFiles      ( src/backend/StaticFiles.hs, dist/dist-sandbox-3897df68/build/elm-reactor/elm-reactor-tmp/StaticFiles.o )

src/backend/StaticFiles.hs:50:5:
    Exception when trying to run compile-time code:
      fd:16: hGetContents: invalid argument (invalid byte sequence)
    Code: (=<<)
            bsToExp runIO (Build.compile ("src" </> "pages" </> "Errors.elm"))
    In the splice:
      $(bsToExp
        =<< runIO (Build.compile ("src" </> "pages" </> "Errors.elm")))
cabal: Error: some packages failed to install:
elm-reactor-0.18 failed during the building phase. The exception was:
ExitFailure 1

The rest of the log is here, though it's probably useless.

I tried compiling twice and got the same error. I'm not really sure what to do here, please tell me if you need more information.

I'm using the latest version of ghc and cabal available from the FreeBSD package manager, 7.10.2 and 1.22.6.0 using version 1.22.4.0 of the Cabal library respectively.

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

I run into the same problem with FreeBSD 10.3 amd64, both with ghc 7.10.2 and ghc 8.0.2.

Yep, also encountered this problem. Very strange, it succeeds the second time I run sudo runhaskell BuildFromSource.hs 0.18, and I have no idea why. But at least it works.