logo       

ghc 6.2 gets confused about Main.hi reuse: msg#00005

lang.haskell.glasgow.bugs

Subject: ghc 6.2 gets confused about Main.hi reuse


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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise