我想用分析编译我的程序,所以我运行:
$ 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'?
...
所以,问题是,与 cabal 通常的欢迎行为不同,cabal 不会解决依赖关系并在需要分析库时安装它们。
我可以通过手动解决依赖关系来解决它(通过遵循编译一段时间后出现的错误):
$ cabal install -p OpenGLRaw --reinstall
$ cabal install -p StateVar --reinstall
$ cabal install -p Tensor --reinstall
$ cabal install -p ObjectName --reinstall
$ cabal install -p GLURaw --reinstall
$ cabal install -p OpenGL --reinstall
$ cabal install -p GLUT --reinstall
然后重复我的下一个依赖项..
有一个更好的方法吗?即是否让 cabal 像普通图书馆一样独立完成工作?