ghc 6.2 gets confused about Main.hi reuse
C.Reinke
C.Reinke at kent.ac.uk
Tue Feb 3 13:00:54 EST 2004
When trying to build HaRe with ghc 6.2 (builds fine with ghc 6.0.1),
we encountered a long list of strange error messages of the kind:
...
*** Compiling Main:
compile: input file pfe_client.hs
*** Checking old interface for Main:
Failed to load interface for `MapDeclMBase':
Could not find interface file for `MapDeclMBase'
locations searched:
/proj/haskell/lib/ghc-6.2/imports/MapDeclMBase.hi
/proj/haskell/lib/ghc-6.2/hslibs-imports/text/MapDeclMBase.hi
/proj/haskell/lib/ghc-6.2/hslibs-imports/data/MapDeclMBase.hi
/proj/haskell/lib/ghc-6.2/hslibs-imports/util/MapDeclMBase.hi
/proj/haskell/lib/ghc-6.2/hslibs-imports/posix/MapDeclMBase.hi
/proj/haskell/lib/ghc-6.2/hslibs-imports/concurrent/MapDeclMBase.hi
/proj/haskell/lib/ghc-6.2/hslibs-imports/lang/MapDeclMBase.hi
...
It turns out that ghc 6.2 seems to get confused about the reuse of
Main.hi: we build two different executables (client/server) in the
same directory, from the same set of modules, and ghc traditionally
ignores the -o directive and names the interface file Main.hi.
ghc 6.0.1 had no trouble with this, but for ghc 6.2, I have to
delete Main.hi before building the second executable, to avoid the
"Failed to load interface" errors mentioned above (btw, that was the
complete list of locations searched, as given in the error message -
note that it does *not* include the locations where ghc has put the
interface files for the current project).
As I've got a work-around (remove Main.hi), this isn't critical, but
I'd be interested to learn what happened between 6.0.1 and 6.2, and
others who get this kind of error message might be interested to
know what to look for.
Cheers,
Claus
More information about the Glasgow-haskell-bugs
mailing list