2012-09-02 49 views
3

当静态链接我的可执行文件时,GHC速度太慢,所以我想使用“-dynamic”选项进行测试。尽管cabal install mighttpd2没问题,但以下两个命令会导致相同的错误。为什么不能动态构建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 

回答

4

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

+2

谢谢!但如何使用cabal重新安装mighttpd2的整个依赖树? –

+1

@z_axis手动。 = / –

相关问题