在需要分析库时Cabal没有安装依赖关系? [英] Cabal not installing dependencies when needing profiling libraries?

查看:98
本文介绍了在需要分析库时Cabal没有安装依赖关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用分析编译我的程序,所以我运行:

  $ cabal configure --enable-executable-profiling 
...
$ cabal build
...
无法找到模块'Graphics.UI.GLUT':
也许您还没有安装包的分析库'GLUT-2.2.2.0'?
...
$#我确实没有安装GLUT的prof库,所以..
$ cabal install -p GLUT --reinstall
...
找不到模块'Graphics.Rendering.OpenGL':
也许你还没有安装包'OpenGL-2.4.0.1'的分析库?
...

所以,问题是,不像cabal一贯的欢迎行为,cabal如果需要分析库,则无法解析依赖关系并安装它们。



我可以通过手动解决依赖关系来解决它(通过遵循一段时间编译后出现的错误):

  $ cabal install -p OpenGLRaw --reinstall 
$ cabal install -p StateVar --reinstall
$ cabal install -p张量--reinstall
$ cabal install -p ObjectName --reinstall
$ cabal install -p GLURaw --reinstall
$ cabal install -p OpenGL --reinstall
$ cabal install -p GLUT --reinstall

然后重复我的下一个依赖关系。 。

有没有更好的方法来做到这一点?即使cabal自己做的工作,因为它为正常的库吗?

解决方案

我已启用 library-profiling:True 在我的〜/ .cabal / config 文件中。从那以后,任何新安装都会自动启用分析。



不幸的是,这仍然意味着我必须手动重新安装已安装的旧软件包。尽管手动完成这些操作后,我现在仍然可以重新安装大部分软件包,并且启用了分析功能...


I want to compile my program with profiling, so I run:

$ 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'?
...

So, the problem is, that unlike cabal's usual welcome behavior, cabal doesn't resolve the dependencies and install them when needing profiling libraries.

I can work around it by resolving the dependencies manually (by following errors that appear after a while of compiling):

$ 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

And then repeat for my next dependency..

Is there a better way to do this? i.e do make cabal do the work on its own as it does for normal libraries?

解决方案

I've enabled library-profiling: True in my ~/.cabal/config file. From then on, any new installations will automatically enable profiling.

Unfortunately that still means I had to manually reinstall for the old packages already installed. Although, after a while of doing this manually, I now have most packages reinstalled with profiling enabled...

这篇关于在需要分析库时Cabal没有安装依赖关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆