
-----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 get: - ----- $ runghc newspage.hs GHCi runtime linker: fatal error: I found a duplicate definition for symbol fps_minimum whilst processing object file /usr/lib/bytestring-0.9.1.3/ghc-6.8.2/HSbytestring-0.9.1.3.o 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: http://hpaste.org/11514#a0 its fairly straightforward. any clues? thanks - brad -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkkF8ScACgkQxRg3RkRK91OosgCfeZIA378PleCnaxwymabNz97F TXAAnRzOhL4zQ9n9RG1oDp146a1b4ajK =qtCU -----END PGP SIGNATURE-----

On Mon, Oct 27, 2008 at 4:49 PM, brad clawsie
-----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 get:
- ----- $ runghc newspage.hs
GHCi runtime linker: fatal error: I found a duplicate definition for symbol fps_minimum whilst processing object file /usr/lib/bytestring-0.9.1.3/ghc-6.8.2/HSbytestring-0.9.1.3.o 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?
Hi Brad, 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! Cheers, D

2008/10/27 Dougal Stanton
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 problem is GHCi's linker. It cannot deal with duplicate symbols, while 'ld' can. I know of no workaround to get it to work, though. You could try to hide the new bytestring, so that ghci doesn't find it. FWIW, 6.10.1 will come with a recent version of bytestring, so separately upgrading should no longer be necessary.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
"Thomas Schilling"
2008/10/27 Dougal Stanton
: The problem is GHCi's linker. It cannot deal with duplicate symbols,
is this considered a bug? by the way, a nice feature of ghc would be a --clean option to remove .hi, .o files. and maybe a --veryclean to recompile all dependencies. i have more than once rm'd my .hs files by typo... thanks - brad -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkkHQS4ACgkQxRg3RkRK91MWsACfWD4kvCLvYiNaDGpVo7F8pujz uuUAn1zzhcI1hdYa9IRQNMtoW2LdIBzd =+k/m -----END PGP SIGNATURE-----

by the way, a nice feature of ghc would be a --clean option to remove .hi, .o files. and maybe a --veryclean to recompile all dependencies. i have more than once rm'd my .hs files by typo...
add yourself to http://hackage.haskell.org/trac/ghc/ticket/2258 ?-) btw, ghc head has this new option: -outputdir dir The -outputdir option is shorthand for the combination of -odir, -hidir, and -stubdir. Claus

2008/10/28 brad clawsie
-----BEGIN PGP SIGNED MESSAGE----- is this considered a bug?
More like missing feature, but certainly worth fixing.
by the way, a nice feature of ghc would be a --clean option to remove .hi, .o files. and maybe a --veryclean to recompile all dependencies. i have more than once rm'd my .hs files by typo...
What's wrong with cabal (or ./Setup) clean ?
participants (4)
-
brad clawsie
-
Claus Reinke
-
Dougal Stanton
-
Thomas Schilling