为什么cabal不能动态构建mighttpd2?

时间:2012-09-02 00:23:14

标签: haskell ghc cabal

GHC在静态链接我的可执行文件时速度太慢,因此我想使用“-dynamic”选项进行测试。尽管cabal install mighttpd2没问题,但以下两个命令会导致相同的错误。

$cabal install --ghc-options=-dynamic mighttpd2
$cabal install --enable-executable-dynamic mighttpd2

Linking dist/build/mkindex/mkindex ...
Preprocessing executable 'mightyctl' for mighttpd2-2.7.1...
Process.hs:11:8:
    Could not find module `Data.Conduit.Process'
    Perhaps you haven't installed the "dyn" libraries for package `process conduit-0.5.0.2'?
    Use Perhaps you haven't installed the "dyn" libraries for package `process-conduit-0.5.0.2'?
    Use -v to see a list of the files searched for.
    cabal: Error: some packages failed to install:
    mighttpd2-2.7.1 failed during the building phase. The exception was:ExitFailure 1

1 个答案:

答案 0 :(得分:4)

您需要安装mighttpd2所依赖的所有库的动态版本。 cabal-install正在抱怨process-conduit的动态版本无法使用。您必须重新安装mighttpd2的完整依赖关系树,并将--enable-shared --enable-executable-dynamic传递给cabal-install