Error when building cabal package with template haskell configured for profiling

Hello, I would like to profile a cabal package that contains template haskell code. However I get the following error: $ cabal configure --ghc-options="-O2 -prof -auto-all -caf-all" ... $ cabal build ... Dynamic linking required, but this is a non-standard build (eg. prof). You need to build the program twice: once the normal way, and then in the desired way using -osuf to set the object file suffix. What's the best way to solve this? Currently I do a cabal build -v and copy the ghc --make ... command line. Then I first build the program normally (without -prof) and then build it with -prof and -osuf p_o like the error messages suggests. This is annoying however. Is there a ticket for this bug? Bas

On Fri, Jan 27, 2012 at 12:06 PM, Bas van Dijk
$ cabal configure --ghc-options="-O2 -prof -auto-all -caf-all"
Why aren't you using the specific options for profiling? $ cabal configure --help | grep profiling -p --enable-library-profiling Enable Library profiling --disable-library-profiling Disable Library profiling --enable-executable-profiling Enable Executable profiling --disable-executable-profiling Disable Executable profiling Cheers, =) -- Felipe.

On 27 January 2012 15:14, Felipe Almeida Lessa
On Fri, Jan 27, 2012 at 12:06 PM, Bas van Dijk
wrote: $ cabal configure --ghc-options="-O2 -prof -auto-all -caf-all"
Why aren't you using the specific options for profiling?
$ cabal configure --help | grep profiling -p --enable-library-profiling Enable Library profiling --disable-library-profiling Disable Library profiling --enable-executable-profiling Enable Executable profiling --disable-executable-profiling Disable Executable profiling
This gives the following error:
$ cabal configure --enable-executable-profiling
...
$ cabal build
...
cannot find normal object file `
participants (2)
-
Bas van Dijk
-
Felipe Almeida Lessa