GHCi Package problem?
simonmar at microsoft.com
Thu Feb 3 05:13:59 EST 2005
On 02 February 2005 22:02, Martin Erwig wrote:
> I encountered the following problem while loading a package,
> and ghci (version 6.2) told me to report it to this list.
> Loading package fgl ... linking ...
> /usr/local/lib/ghc-6.2/HSfgl.o: unknown symbol
> ghc-6.2: panic! (the `impossible' happened, GHC version 6.2):
> can't load package `fgl'
> Please report it as a compiler bug to
> glasgow-haskell-bugs at haskell.org,
> or http://sourceforge.net/projects/ghc/.
> This happened after I removed "base" from the package_deps entry (see
You shouldn't remove 'base' from the dependencies! (we're being
conservative in flagging it as a bug in GHC, in this case it's a bug in
your package spec.)
> When "base" is included, ghci start fine:
> Loading package base ... linking ... done.
> Loading package fgl ... linking ... done.
> I can even access some values:
> Prelude> Data.Graph.Inductive.version
> FGL - Functional Graph Library, February 2005
> However, when I try others, I get errors:
> Prelude> Data.Graph.Inductive.Example.clr486
> GHCi runtime linker: fatal error: I found a duplicate definition
> for symbol
> whilst processing object file
> This could be caused by:
> * Loading two different object files which export the same
> * Specifying the same object file twice on the GHCi command line
> * An incorrect `package.conf' entry, causing some object to be
> loaded twice.
> GHCi cannot safely continue in this situation. Exiting now.
> I don't know what to do about this.
Looks like GHCi is trying to load an object file for a module that is
already present in the package. If
Data.Graph.Inductive.Internal.FiniteMap is present in the fgl package,
then you shouldn't also have it in the current directory, because GHC
will get confused (I believe the upcoming 6.4 release will be better in
this regard, though).
More information about the Glasgow-haskell-bugs