2012-09-02 55 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手動。 = / –

相關問題