- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试安装 nano-hmac-0.2.0使用 Cabal 和 GHC 6.12.1 从 Hackage 中下载包(我想要的包的依赖项),但失败并出现以下错误:
Data/Digest/OpenSSL/HMAC.hsc:1:0:
Warning: Module `Prelude' is deprecated:
You are using the old package `base' version 3.x.
Future GHC versions will not support base version 3.x. You
should update your code to use the new base version 4.x.
<no location info>:
Failing due to -Werror.
果然,包的 .cabal 文件中有以下行:
ghc-options: -Wall -Werror -O2 -fvia-C
我希望能够覆盖 -Werror
选项,这样我就可以在不手动修改 .cabal 文件的情况下安装该软件包,但找不到可行的方法。特别是,我尝试将 --ghc-options
传递给 Cabal,以在 GHC 的参数列表中粘贴 -Wwarn
,如下所示:
$ cabal install nano-hmac-0.2.0 -v2 --ghc-options='-Wwarn'
但这并没有达到我想要的效果;详细输出验证了 -Wwarn
已添加到 GHC 参数列表的开头,但 .cabal 文件中的 -Werror
稍后出现,并且似乎覆盖了它:
/usr/bin/ghc -Wwarn --make -package-name nano-hmac-0.2.0 -hide-all-packages -fbuilding-cabal-package -i -idist/build -i. -idist/build/autogen -Idist/build/autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -odir dist/build -hidir dist/build -stubdir dist/build -package-id base-3.0.3.2-0092f5a086872e0cdaf979254933cd43 -package-id bytestring-0.9.1.5-125aff5b9d19ec30231ae2684b8c8577 -O -Wall -Werror -O2 -fvia-C -XForeignFunctionInterface -XBangPatterns -XCPP Data.Digest.OpenSSL.HMAC
我还尝试将 --constraint='base >= 4'
传递给 Cabal 以强制它使用更新版本的 base 并完全避免警告,但我遇到了同样的失败,我仍然在详细输出中看到以下内容:
Dependency base ==3.0.3.2: using base-3.0.3.2
有没有办法通过 Cabal 命令行消除或覆盖来自 .cabal 文件的 -Werror
,还是我自己只能修改 .cabal 文件?
最佳答案
Is there a way to get rid of or override the -Werror coming from the .cabal file via the Cabal command line, or am I stuck modifying the .cabal file myself?
确实如此。一般情况下是没有办法的。您也许能够覆盖包限制,以使警告消失,但是,通常您必须修改 .cabal 文件。
如今,Hackage 会阻止人们上传 .cabal 文件中带有 -Werror
的软件包,因此随着时间的推移,这个问题将会消失。
关于haskell - 从 Cabal 安装时覆盖 -Werror,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4941284/
我是haskell和cabal的新手,所以我可能缺少一些简单的东西。 我更新了 cabal 安装: sudo cabal install cabal-install Password: Resolvi
这个问题只有yak-shaving尝试排除故障 another problem . 因此,为了诊断我的另一个问题,建议我尝试: cabal unpack base cd base-4.3.1.0 ca
当我安装 vector和: cabal install vector 我收到很多 SpecConstr如果我可以指定 -fspec-constr-count=SOMETHING-HIGHER,限制将消
当我尝试安装目录包时出现以下错误: $ cabal install directory Resolving dependencies... Failed to install directory-1.
我刚刚在运行 Mavericks 10.9 的 Mac 上安装了 Haskell 平台。包含的 cabal 版本 (1.16) 已过时,并提示我运行“cabal update”,然后运行“cabal
我已经在 I:\cabal 和 ghc 文件夹中分别安装了 cabal 和 I:\ghc 文件夹。我之前安装了 Haskell-Platform,但是没有用,我不得不卸载它。但是有一个名为 C:\Us
我已经制作了一个 Cabal 沙箱,并为它安装了一个软件包,但 runhaskell Setup configure提示我刚刚安装的软件包依赖项丢失了。 我验证了包名和版本,没问题。 运行 cabal
我是否需要手动编辑 *.cabal 文件的 build-depends部分添加包作为项目依赖? 或者也许有一种更方便的方法,它不像手动修改构建文件那样容易出错。 考虑我使用的几乎所有包管理器都具有的功
当我做 cabal --version我懂了: cabal-install version 0.14.0 using version 1.14.0 of the Cabal library 那么有什么
我刚刚做了brew install haskell-platform它安装了 Glorious Glasgow Haskell 编译系统,版本 7.6.3 。 $ cabal --version ca
我需要通过 Cabal 安装 Yesod 和依赖项,不幸的是我无法更新 cabal。外壳输出: ...$ sudo cabal install cabal-install Resolving depe
我似乎在 cabal 中的依赖关系图损坏方面遇到了很多问题,我最终尝试遵循 SO 建议转向 cabal-dev,但由于类似的原因,它无法安装。 跳过原始安装尝试的许多页面,以下是当前状态: C:\Us
每次我安装库时,cabal 都会告诉我安装新版本的 cabal-install。尽管我运行了(明显成功)下面列出的过程,但 cabal-install 的版本保持不变。我哪里错了? (我的操作系统是W
当我通过 sudo apt-get 安装 Haskell/GHC+cabal 时我安装了 Cabal 1.16 版。这显然不是最新的版本。我将如何升级到至少 1.18 版?我试着做 sudo apt-
我制作了自己的 cabal 包(我们称之为 package-1),其中包含两个目标,一个库和一个可执行文件。库部分有一个构建依赖列表,而可执行文件有另一个更大的构建依赖列表。 现在我创建了 packa
当我在 vim 中构建一个 cabal 项目时,使用 :set makeprg=cabal\ build :make haskellmode-vim似乎没有找到类型信息。当光标位于 foo 上时执行
我刚刚通过 apt-get 在 Linux Mint 12 上进行了全新的 haskell 平台安装。每次我尝试使用 cabal-install 安装一些 hackage 包时,我都会得到: coul
当我在 vim 中构建一个 cabal 项目时,使用 :set makeprg=cabal\ build :make haskellmode-vim似乎没有找到类型信息。当光标位于 foo 上时执行
我有两个正在开发的软件包,A和 B .包B取决于 A . A是在它自己的沙盒中开发的,B 也有类似的情况。 : A> cabal sandbox init A> cabal install --ena
看来我错过了什么。据我了解cabal sandbox init表示从当前文件夹和所有子文件夹全部 cabal install命令的范围为沙箱。因此,此文件夹之外的所有内容都不在沙箱中。 那么 caba
我是一名优秀的程序员,十分优秀!