snapframework/snap

Can't build the 'snap' executable with --enable-executable-dynamic

Closed this issue · 0 comments

If you try building snap like so:

$ cabal install snap --enable-executable-dynamic

It will eventually fail when building the snap executable because of the executable's use of TH. The fix is quite easy: add extensions: TemplateHaskell to the Executable snap block in snap.cabal.

Building a dynamic/profiling library or executable that uses TH requires that it gets built twice: once the vanilla way, and then the dynamic/profiling way. Cabal handles this edge case as long as it knows that TH is in use.