Question about packages and GHCi
simonmar at microsoft.com
Wed Feb 2 04:26:54 EST 2005
On 02 February 2005 01:52, Martin Erwig wrote:
> I apologize if this is the wrong mailing list to turn to,
> but I would be grateful for any help with two problems
> I have when trying to add a package to GHCi. (I wasn't able
> to find sufficient information in the documentation for packages
> (1) When I try to add a package to ghc, I receive the
> error message that a GHCi lib fil cannot be found.
> > ghc-pkg -u -i fgl.pkg
> Reading package info from "fgl.pkg"done.
> Expanding embedded variables... done.
> warning: can't find GHCi lib `HSfgl.o'
> Saving old package config file... done.
> Writing new package config file... done.
> The missing file `HSfgl.o' is located on the
> current directory as well as in the directory
> where all other .o and .a files for GHC are
> kept (/usr/local/lib/ghc-6.2/).
ghc-pkg is looking in the directories specified in the library_dirs
field in fgl.pkg. HSfgl.o should be in one of those directories.
> (2) Maybe related to the previous problem is the
> following. When I start "ghci -package fgl", I receive
> the following error message:
> Loading package base ... linking ... done.
> Loading package haskell98 ... linking ... done.
> Loading package haskell-src ... linking ... done.
> Loading package fgl ...
> 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 vaguely remembered seeing this before... googling for 'duplicate
__module_registered' turned up this:
which indicates that perhaps you should add -x to ld when building
What version of GHC is this, BTW?
More information about the Libraries