`stack ghci` fails when you include a project which imports Gloss

If you import Gloss within a Stack project and use stack ghci, you get the following error:

GHCi, version 7.10.2: http://www.haskell.org/ghc/  :? for help
<command line>: can't load .so/.DLL for: /Users/v/hs/.stack-work/install/x86_64-osx/lts-3.7/7.10.2/lib/x86_64-osx-ghc-7.10.2/GLUT- (dlopen(/Users/v/hs/.stack-work/install/x86_64-osx/lts-3.7/7.10.2/lib/x86_64-osx-ghc-7.10.2/GLUT-, 5): Symbol not found: _glutBitmap8By13
  Referenced from: /Users/v/hs/.stack-work/install/x86_64-osx/lts-3.7/7.10.2/lib/x86_64-osx-ghc-7.10.2/GLUT-
  Expected in: flat namespace
 in /Users/v/hs/.stack-work/install/x86_64-osx/lts-3.7/7.10.2/lib/x86_64-osx-ghc-7.10.2/GLUT-

How can that be fixed?


Tried this in my system and it worked:

cabal install GLUT --ghc-options="-optl-Wl,-framework,GLUT" --reinstall --jobs=1

I found this solution here: Trouble building applications with Haskell GLUT and freeglut on OS X with GHC 7.10.1

Need Your Help

Working of Amazon WS elastic load balancer

amazon-web-services amazon-ec2 cloud autoscaling amazon-elb

I am interested in knowing the working of ELB. I have a client which sends CPU intensive request to the server. All the request forwarded to server passes via AWS ELB. I have created a autoscaling ...

HtmlUnit: HtmlPage Serialization Exception

javascript css htmlunit serializable

After executing a JavaScript function that injects a style attribute on a HTML tag using HtmlUnit-2.13, we cannot serialize the resultant HtmlPage and we receive the following error: