ghc-6.2.2: unknown package name: Main (again)
Axel Simon
A.Simon at kent.ac.uk
Wed Dec 1 12:52:29 EST 2004
Hi,
On Wed, 2004-12-01 at 17:36, Gregory Wright wrote:
> I cleaned out all of the *.o and *.hi files and rebuilt. Everything
> was OK. No doubt there was something stale in one of the *.hi
> files, although the error message is perplexing to those of us
> who don't channel Simonness ;--)
I came across the same problem today.
> >> crossroads-able> ghc --make -package hsshellscript -o asgraph
> >> asgraph.hs
> >> Chasing modules from: asgraph.hs
> >> Skipping Reformat ( ./Reformat.hs, ./Reformat.o )
> >> Skipping Main ( asgraph.hs, asgraph.o )
> >> Linking ...
> >> ghc-6.2.2: unknown package name: Main
> >>
> >>
> >> However, building the package (hsshellscript) with the additional
> >> option
> >>
> >> -package-name hsshellscript
Files that *use* the package foo keep track of this dependency in the
.hi files. However they track the name that you give with the
-package-name option when compiling the package, not the name given with
-package when you compile the program. I guess in your case you forgot
to compile the package with -package-name=foo such that the package was
implicitly named Main. Solution: Rebuild the library with the proper
-package-name flag and rebuild everything that uses that package.
Axel.
More information about the Glasgow-haskell-bugs
mailing list