[Haskell-cafe] ghc 6.2.2 seems to ignore -package when there's a -prof option

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Wed Oct 11 18:42:29 EDT 2006


On Wed, 2006-10-11 at 16:01 -0400, Seth Gordon wrote:
> I have a program using HSQL that I'm trying to profile.  When I do
> 
> ghc program.hs -package hsql -o program
> 
> it compiles fine, but when I do
> 
> ghc -prof -auto-all program.hs -package hsql -o program
> 
> I get error messages saying "failed to load interface for
> `Database.HSQL'" and so forth, the same way I do if I leave off the
> -package argument entirely.
> 
> How can I work around this?

The likely problem is that you do not have the profiling version of hsql
installed.

The reason for the error message is that the .hi files for the normal
and profiling versions are distinct, and in this case the .hi files for
the profiling version are missing. Newer versions of GHC give a slightly
more helpful error message in this case.

If you built from source using Cabal then you need to rebuild and pass
-p (or --enable-library-profiling) during the configure step.

If you're using a distro package then you probably just need the prof
variant as well.

Duncan



More information about the Haskell-Cafe mailing list