When running stack setup
in Miso sample-app (https://github.com/dmjio/miso/tree/master/sample-app) following error occurred.
Shorter version:
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
Verbose:
/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
Stack and cabal version:
[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
Works after deleting cabal-install
and running stack build
. As hinted by @MichaelSnoyman ghcjs might be expecting right cabal version.