Why can't cabal build mighttpd2 dynamically?

核能气质少年 提交于 2020-01-02 08:12:07

问题


GHC is too slow when it links my executable statically, so I want to test using "-dynamic" options. The following two commands cause the same error although cabal install mighttpd2 is ok.

$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:


You need to install the dynamic version of all the libraries that mighttpd2 depends on. cabal-install is rightly complaining that the dynamic version of process-conduit is not available. You will have to reinstall mighttpd2's entire dependency tree with --enable-shared --enable-executable-dynamic passed to cabal-install.



来源:https://stackoverflow.com/questions/12232471/why-cant-cabal-build-mighttpd2-dynamically

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!