プロファイリングを使用してプログラムをコンパイルしたいので、次を実行します。
$ 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 が独自に作業を行うようにしますか?