堆栈设置错误“求解器必须是以下之一:模块化”

问题描述 投票:2回答:1

在Miso sample-app(stack setup)中运行https://github.com/dmjio/miso/tree/master/sample-app后发生错误。

更短的版本:

exit status: 1                                
stderr: solver must be one of: modular        
CallStack (from HasCallStack):                
  error, called at libraries/Cabal/Cabal/Distribution/ReadE.hs:46:24 in Cabal-2.0.1.0:Distribution.ReadE

详细:

/Users/username/Documents/projects/hs/miso/sample-app$ [ghcjs-pkg]: /Users/username/.stack/programs/x86_64-osx/ghcjs-0.2.0.9006020_ghc-7.10.3/src/.stack-work/install/x86_64-osx/lts-6.20/7.10.3/bin/ghcjs-pkg "recache" "--global" "--no-user-package-db"
installing stage 0
/Users/username/.ghcjs/x86_64-darwin-0.2.0.9006020-7.10.3/ghcjs/ghcjs-boot/boot/ghc-prim$ rm_rf dist
/Users/username/.ghcjs/x86_64-darwin-0.2.0.9006020-7.10.3/ghcjs/ghcjs-boot$ [cabal]: /usr/local/bin/cabal "--config-file" "/Users/username/.ghcjs/x86_64-darwin-0.2.0.9006020-7.10.3/ghcjs/cabalBootConfig" "--ignore-sandbox" "install" "./boot/ghc-prim" "--solver=topdown" "--global" "--ghcjs" "--one-shot" "--avoid-reinstalls" "--builddir" "dist" "--with-compiler" "/Users/username/.stack/programs/x86_64-osx/ghcjs-0.2.0.9006020_ghc-7.10.3/src/.stack-work/install/x86_64-osx/lts-6.20/7.10.3/bin/ghcjs" "--with-hc-pkg" "/Users/username/.stack/programs/x86_64-osx/ghcjs-0.2.0.9006020_ghc-7.10.3/src/.stack-work/install/x86_64-osx/lts-6.20/7.10.3/bin/ghcjs-pkg" "--prefix" "/Users/username/.ghcjs/x86_64-darwin-0.2.0.9006020-7.10.3/ghcjs" "--enable-documentation" "--haddock-html" "--haddock-hyperlink-source" "--enable-shared" "--enable-library-profiling" "--root-cmd" "/Users/username/.ghcjs/x86_64-darwin-0.2.0.9006020-7.10.3/ghcjs/run.sh" "-v2" "--dry-run"
/usr/local/bin/cabal --config-file /Users/username/.ghcjs/x86_64-darwin-0.2.0.9006020-7.10.3/ghcjs/cabalBootConfig --ignore-sandbox install ./boot/ghc-prim --solver=topdown --global --ghcjs --one-shot --avoid-reinstalls --builddir dist --with-compiler /Users/username/.stack/programs/x86_64-osx/ghcjs-0.2.0.9006020_ghc-7.10.3/src/.stack-work/install/x86_64-osx/lts-6.20/7.10.3/bin/ghcjs --with-hc-pkg /Users/username/.stack/programs/x86_64-osx/ghcjs-0.2.0.9006020_ghc-7.10.3/src/.stack-work/install/x86_64-osx/lts-6.20/7.10.3/bin/ghcjs-pkg --prefix /Users/username/.ghcjs/x86_64-darwin-0.2.0.9006020-7.10.3/ghcjs --enable-documentation --haddock-html --haddock-hyperlink-source --enable-shared --enable-library-profiling --root-cmd /Users/username/.ghcjs/x86_64-darwin-0.2.0.9006020-7.10.3/ghcjs/run.sh -v2 --dry-run
solver must be one of: modular
CallStack (from HasCallStack):
  error, called at libraries/Cabal/Cabal/Distribution/ReadE.hs:46:24 in Cabal-2.0.1.0:Distribution.ReadE
ghcjs-boot: error running: /usr/local/bin/cabal --config-file /Users/username/.ghcjs/x86_64-darwin-0.2.0.9006020-7.10.3/ghcjs/cabalBootConfig --ignore-sandbox install ./boot/ghc-prim --solver=topdown --global --ghcjs --one-shot --avoid-reinstalls --builddir dist --with-compiler /Users/username/.stack/programs/x86_64-osx/ghcjs-0.2.0.9006020_ghc-7.10.3/src/.stack-work/install/x86_64-osx/lts-6.20/7.10.3/bin/ghcjs --with-hc-pkg /Users/username/.stack/programs/x86_64-osx/ghcjs-0.2.0.9006020_ghc-7.10.3/src/.stack-work/install/x86_64-osx/lts-6.20/7.10.3/bin/ghcjs-pkg --prefix /Users/username/.ghcjs/x86_64-darwin-0.2.0.9006020-7.10.3/ghcjs --enable-documentation --haddock-html --haddock-hyperlink-source --enable-shared --enable-library-profiling --root-cmd /Users/username/.ghcjs/x86_64-darwin-0.2.0.9006020-7.10.3/ghcjs/run.sh -v2 --dry-run
exit status: 1
stderr: solver must be one of: modular
CallStack (from HasCallStack):                
  error, called at libraries/Cabal/Cabal/Distribution/ReadE.hs:46:24 in Cabal-2.0.1.0:Distribution.ReadE

Booting GHCJS (this will take a long time) ...Process exited with ExitFailure 1: /Users/username/.stack/programs/x86_64-osx/ghcjs-0.2.0.9006020_ghc-7.10.3/src/.stack-work/install/x86_64-osx/lts-6.20/7.10.3/bin/ghcjs-boot --clean

堆栈和阴谋版本:

[sample-app] stack --version                                          master  ✱
Version 1.6.3 x86_64 hpack-0.20.0
[sample-app] cabal --version                                          master  ✱
cabal-install version 2.0.0.1
compiled using version 2.0.1.0 of the Cabal library 
haskell cabal haskell-stack ghcjs haskell-miso
1个回答
2
投票

删除cabal-install并运行stack build后工作。正如@MichaelSnoyman所暗示的那样,ghcjs可能会期待正确的cabal版本。

© www.soinside.com 2019 - 2024. All rights reserved.