Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't cabal build mighttpd2 dynamically?

Tags:

haskell

ghc

cabal

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
like image 350
z_axis Avatar asked Apr 02 '26 02:04

z_axis


1 Answers

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.

like image 183
Ptharien's Flame Avatar answered Apr 08 '26 06:04

Ptharien's Flame



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!