haskell - Cabal 在需要分析库时不安装依赖项?

标签 haskell profiling cabal

我想通过分析来编译我的程序,所以我运行:

$ 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 像普通库一样独立完成工作?

最佳答案

我已在我的 ~/.cabal/config 文件中启用了 library-profiling: True。从那时起,任何新安装都将自动启用分析。

不幸的是,这仍然意味着我必须手动重新安装已安装的旧软件包。虽然,经过一段时间的手动执行此操作后,我现在已经重新安装了大多数软件包并启用了分析...

关于haskell - Cabal 在需要分析库时不安装依赖项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1704421/

相关文章:

parsing - 解析器组合器的类型

Android 软件 NDK native c 代码在实际 Android 手机上的分析

c++ - 将自定义对象文件与 Cabal 链接

haskell - 相当于将 `-p zlib` 参数传递给 `nix-shell` 中的 `shell.nix`

parsing - 理解阿托秒差距

时间:2019-03-17 标签:c#profilingaspxpageloadtime

haskell - 安装 Happy 时出现问题

haskell - 错误 : "Failed to load interface for ' Data. Either.Utils'"

Haskell:Num 类 "inherit"Eq 类吗?

objective-c - 屏幕保护程序中的生涩/抖动(核心)动画?