game-in-haskell
game-in-haskell copied to clipboard
cabal install fails: <command line>: unknown package: (unknown)
I've download ghc from here: https://github.com/ghcformacosx/ghc-dot-app/releases/download/v7.10.1-r0/ghc-7.10.1-r0.zip
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.10.1
OS X Yosemite 10.10.3
Steps to reproduce (in my situation):
$ rm -fr ~/.cabal/ ~/.ghc
$ cabal update
$ cd game-in-haskell
$ cabal sandbox init
$ cabal install --only-dependencies
<command line>: unknown package: (unknown)
Unfortunately, I don't see more specifics. -v
doesn't seem to give more info:
$ cabal install -v --only-dependencies
Using a sandbox located at
/Users/user/projects/haskell/game-in-haskell/.cabal-sandbox
/usr/bin/gcc -dumpversion
/Applications/ghc-7.10.1.app/Contents/bin/haddock --version
/Applications/ghc-7.10.1.app/Contents/bin/hpc version
looking for tool hsc2hs near compiler in
/Applications/ghc-7.10.1.app/Contents/bin
found hsc2hs in /Applications/ghc-7.10.1.app/Contents/bin/hsc2hs
/Applications/ghc-7.10.1.app/Contents/bin/hsc2hs --version
/Applications/ghc-7.10.1.app/Contents/bin/ghc -c /var/folders/rb/_2dmxqts4_19p9rpfytvv4km0000gn/T/16807282475249.c -o /var/folders/rb/_2dmxqts4_19p9rpfytvv4km0000gn/T/1622650073984943658.o
<command line>: unknown package: (unknown)
Which setup are you using? Do you spot a mistake in my setup?
As a workaround, I was able to use ghc 7.8.4, globally install the needed packages (elerea, GLFW-b etc.) via stackage, and then build manually with ghc --make ...
. So there should be a possible solution to adapt the game-in-haskell-book.cabal to the packages in stackage LTS and it should work in a sandbox. Might try it.