我想用分析编译我的程序,所以我运行:
$ cabal configure --enable-executable-profiling
...
$ cabal build
...
Could not find module 'Graphics.UI.GLUT':
Perhaps you havent installed the profiling libraries for package 'GLUT-2.2.2.0'?
...
$ # indeed I have not installed the prof libs for GLUT, so..
$ cabal install -p GLUT --reinstall
...
Could not find module 'Graphics.Rendering.OpenGL':
Perhaps you havent installed the profiling libraries for package 'OpenGL-2.4.0.1'?
...
Run Code Online (Sandbox Code Playgroud)
因此,问题是,与cabal通常的欢迎行为不同,cabal无法解析依赖关系并在需要分析库时安装它们.
我可以通过手动解析依赖项来解决它(通过跟踪编译一段时间后出现的错误):
$ cabal install -p OpenGLRaw --reinstall
$ cabal install -p StateVar --reinstall
$ cabal install -p …Run Code Online (Sandbox Code Playgroud)