View Tutorial Metadata Edit Content Revision History Add to Watchlist Add New Tutorial Install profiling version of libraries in GHC

Using cabal to install profiling versions of libraries for GHC

GHC allows profiling of programs by creating an assembly that generates profiling data during execution. To enable this, all libraries used by the program must also have profiling-version object files (.o files) on the system.

One way to ensure that libraries have them is to install the profiling libraries using the package manager found on the operating system. However, this might not always be feasible, because the operating system packages may lag behind the most recent library versions.

A possible solution is to edit the cabal configuration file, usually found in ~/.cabal/config, and to make sure it contains a library-profiling: True entry.

Then, re-installing the packages using cabal install <package-name> --reinstall will ensure that the profiling version of the library is compiled as well. Remember to specify the version of the library you want to install, and to add a sudo at the beginning for libraries installed by the root user.

Only plain text supported.

Optional

Required - will be kept private

Optional

 
 

Rating: (0+, 0-) In: Haskell