Building applications with profiling

Greetings, I want to profile the Yi text editor. A quick look on the Haskell wiki suggests that I need --enable-executable-profiling, however enabling that complains that the yi libraries weren't built with profiling. Additionally enabling --enable-library-profiling allows me to recompile the libs but at the very end I get an error about ‘mtl’ not having been built with profiling.
src/library/Yi/Boot.hs:9:8: Could not find module `Control.Monad.State' Perhaps you haven't installed the profiling libraries for package `mtl-2.1.2'? Use -v to see a list of the files searched for.
I can't really recompile mtl with profiling considering that just about every single package on my system seems to depend on it and they would (probably?) all break. Does anyone have any suggestions on how to approach the problem? Am I doing it all wrong? Thanks -- Mateusz K.

On Mon, Dec 16, 2013 at 8:14 PM, Mateusz Kowalczyk
I can't really recompile mtl with profiling considering that just about every single package on my system seems to depend on it and they would (probably?) all break.
Does anyone have any suggestions on how to approach the problem? Am I doing it all wrong?
How did you install ghc and the Haskell Platform? Vendor packages on Linux may split out the profiling libraries into separate packages (e.g. on Fedora 19 ghc-mtl-devel includes the profiling libraries, but on Debian wheezy they're separated into libghc-ghc-mtl-prof instead of being in libghc-ghc-mtl-dev). Installing such packages will not break anything using the existing -dev packages' libraries. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

On 17/12/13 01:37, Brandon Allbery wrote:
On Mon, Dec 16, 2013 at 8:14 PM, Mateusz Kowalczyk
wrote: I can't really recompile mtl with profiling considering that just about every single package on my system seems to depend on it and they would (probably?) all break.
Does anyone have any suggestions on how to approach the problem? Am I doing it all wrong?
How did you install ghc and the Haskell Platform? Vendor packages on Linux may split out the profiling libraries into separate packages (e.g. on Fedora 19 ghc-mtl-devel includes the profiling libraries, but on Debian wheezy they're separated into libghc-ghc-mtl-prof instead of being in libghc-ghc-mtl-dev). Installing such packages will not break anything using the existing -dev packages' libraries.
I compiled it all myself and am not using my distro's (Gentoo) package manager for any Haskell packages. Will I have to recompile GHC (and everything that comes with it)? If yes, what flags should I pass to get profiling for the libs? The version in question is 7.6.3. -- Mateusz K.

On Mon, Dec 16, 2013 at 9:19 PM, Mateusz Kowalczyk
I compiled it all myself and am not using my distro's (Gentoo) package manager for any Haskell packages.
Will I have to recompile GHC (and everything that comes with it)? If yes, what flags should I pass to get profiling for the libs?
The version in question is 7.6.3.
You need to adjust build.mk as described in < https://ghc.haskell.org/trac/ghc/wiki/Building/Using#Commonbuild.mkoptions>, and yes, you'll have to reinstall everything else afterward. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
participants (2)
-
Brandon Allbery
-
Mateusz Kowalczyk