[Haskell-cafe] strange ghc output
dougal at dougalstanton.net
Mon Oct 27 13:25:33 EDT 2008
On Mon, Oct 27, 2008 at 4:49 PM, brad clawsie <clawsie at fastmail.fm> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> i have a small program i have been using routinely that has stopped
> working. the last alteration of my install configuration was to upgrade
> the haskell-feed package as arch linux recommended. here is the error i
> - -----
> $ runghc newspage.hs
> 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 symbol
> * 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. Sorry.
> - -----
> i have reinstalled the haskell-bytestring package, to no avail.
> here is the actual code i am trying to run:
> its fairly straightforward. any clues?
This happens when, for example, your code imports a library which was
compiled with a previous version of bytestring. Replacing bytestring
on its own isn't enough to solve the problem. To make things more
awkward, it could be several libraries which use the old bytestring.
Using "ghc --make", it seems this error can be ignored, but it's
annoying if you want to use the interactive GHC.
The only answer I know of is to systematically examine the
dependencies of each failing library as it is loaded in GHCi. Then
rebuild this library with the new bytestring and try again. This is
what I did in the end.
Maybe cabal-install provides more sophisticated features for this
nowadays; its development seems to be quite pacy!
More information about the Haskell-Cafe