How to build Stack Yesod?

孤街浪徒 提交于 2020-01-07 06:49:46

问题


I've been trying to use stack to start a yesod-simple project, but nothing I do will build this project. I've looked into other similar stackoverflow questions but couldn't get this to work. Can some one help me figure out what I need to do to get started?

Error

> stack build

Populated index cache.
yesod-persistent-1.4.0.6: configure
yesod-persistent-1.4.0.6: build
yesod-persistent-1.4.0.6: copy/register
yesod-form-1.4.9: configure
yesod-form-1.4.9: build
yesod-form-1.4.9: copy/register
yesod-auth-1.4.15: configure
yesod-auth-1.4.15: build
Progress: 3/6
--  While building package yesod-auth-1.4.15 using:
  /Users/scottyluciano/.stack/setup-exe-cache/x86_64-osx/setup-Simple-Cabal-1.22.5.0-ghc-7.10.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.5.0 build --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure 1
Logs have been written to: /Users/scottyluciano/Documents/tutorials/practice/.stack-work/logs/yesod-auth-1.4.15.log

Configuring yesod-auth-1.4.15...
Building yesod-auth-1.4.15...
Preprocessing library yesod-auth-1.4.15...
[ 1 of 12] Compiling Yesod.PasswordStore ( Yesod/PasswordStore.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Yesod/PasswordStore.o )

/private/var/folders/kl/yp2gqzf116131b5gvs9pzttw0000gn/T/stack64861/yesod-auth-1.4.15/Yesod/PasswordStore.hs:166:31: Warning:
    Defaulting the following constraint(s) to type ‘Integer’
      (Integral b0)
        arising from a use of ‘^’ at Yesod/PasswordStore.hs:166:31
      (Num b0)
        arising from the literal ‘32’ at Yesod/PasswordStore.hs:166:32-33
    In the first argument of ‘(-)’, namely ‘2 ^ 32’
    In the first argument of ‘(*)’, namely ‘(2 ^ 32 - 1)’
    In the second argument of ‘(>)’, namely ‘(2 ^ 32 - 1) * hLen’

/private/var/folders/kl/yp2gqzf116131b5gvs9pzttw0000gn/T/stack64861/yesod-auth-1.4.15/Yesod/PasswordStore.hs:419:1: Warning:
    Defined but not used: ‘toStrict’

/private/var/folders/kl/yp2gqzf116131b5gvs9pzttw0000gn/T/stack64861/yesod-auth-1.4.15/Yesod/PasswordStore.hs:422:1: Warning:
    Defined but not used: ‘fromStrict’
[ 2 of 12] Compiling Yesod.Auth.Message ( Yesod/Auth/Message.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Yesod/Auth/Message.o )

/private/var/folders/kl/yp2gqzf116131b5gvs9pzttw0000gn/T/stack64861/yesod-auth-1.4.15/Yesod/Auth/Message.hs:24:1: Warning:
    The import of ‘mappend’ from module ‘Data.Monoid’ is redundant

/private/var/folders/kl/yp2gqzf116131b5gvs9pzttw0000gn/T/stack64861/yesod-auth-1.4.15/Yesod/Auth/Message.hs:460:1: Warning:
    Pattern match(es) are overlapped
    In an equation for ‘finnishMessage’: finnishMessage Password = ...

/private/var/folders/kl/yp2gqzf116131b5gvs9pzttw0000gn/T/stack64861/yesod-auth-1.4.15/Yesod/Auth/Message.hs:460:1: Warning:
    Pattern match(es) are non-exhaustive
    In an equation for ‘finnishMessage’:
        Patterns not matched: CurrentPassword
[ 3 of 12] Compiling Yesod.Auth.Routes ( Yesod/Auth/Routes.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Yesod/Auth/Routes.o )
[ 4 of 12] Compiling Yesod.Auth       ( Yesod/Auth.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Yesod/Auth.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 7.10.3 for x86_64-apple-darwin):
    Loading temp shared object failed: dlopen(/var/folders/kl/yp2gqzf116131b5gvs9pzttw0000gn/T/ghc65133_0/libghc_21.dylib, 5): no suitable image found.  Did find:
    /var/folders/kl/yp2gqzf116131b5gvs9pzttw0000gn/T/ghc65133_0/libghc_21.dylib: malformed mach-o: load commands size (36784) > 32768

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

回答1:


GHC 8.0.2 fixes the panic issue. By changing LTS to 8.0, the upgrade resolves all issues.



来源:https://stackoverflow.com/questions/41531416/how-to-build-stack-yesod

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!