Cabal使用启用共享标志重建所有 [英] Cabal rebuild all with enable-shared flag
问题描述
使用ghc构建共享库时遇到了问题,我想我需要使用--enable-shared重建我的haskell软件包,是否有一种简单的方法可以用cabal来重建所有软件包 - 如果你有一个〜/ .cabal /世界, cabal install - 重新安装 - 启用 - 共享世界
可以工作,但先用 - 干运行
标志进行测试。但是,这只会照顾安装在cabal上的包装。如果您的软件包随发行版软件包管理器一起安装,发行版可能还会为这些软件提供共享版本(否则,您必须手动执行)。另外,在〜/ .cabal / config中设置 shared:True
可能会有帮助。
I am having an issue with building a shared library with ghc and I think I need to rebuild my haskell packages with --enable-shared, is there an easy way to rebuild all of my packages with cabal with the flag --enable-shared?
If you have a ~/.cabal/world, cabal install --reinstall --enable-shared world
could work, but test with the --dry-run
flag first. That will, however only take care of cabal-installed packages. If you have packages installed with your distro's package manager, the distro might also provide shared versions for those (otherwise, you'd have to do it manually). Also, it would probably be helpful to set shared: True
in ~/.cabal/config.
这篇关于Cabal使用启用共享标志重建所有的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!