Aerosol Posted December 30, 2014 Report Posted December 30, 2014 Today I started to play with attoparsec package and tried to write simple parser. I wrote really toy data type like this: module SimpleParser whereimport qualified Data.ByteString.Char8 as BSimport Data.Attoparsec.ByteStringdata Str = End deriving (Show, Eq)I tried to type:*SimpleParser> Endin ghci and will get End as I expected. Instead End I got following error: GHCi runtime linker: fatal error: I found a duplicate definition for symbol _hs_bytestring_long_long_uint_hexwhilst processing object file /home/alex/.cabal/lib/x86_64-linux-ghc-7.6.3/bytestring-0.10.4.0/HSbytestring-0.10.4.0.oThis 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.As we can see in error output GHCi runtime linker found duplicate definition of _hs_bytestring_long_long_uint_hex. Let's see what's wrong bytestring package with:cabal info bytestringIt will give us output like this: * bytestring (library) Synopsis: Fast, compact, strict and lazy byte strings with a list interface Versions available: 0.9.0.4, 0.9.1.9, 0.9.1.10, 0.9.2.0, 0.9.2.1, 0.10.0.1, 0.10.0.2, 0.10.2.0, 0.10.4.0 (and 14 others) Versions installed: 0.10.4.0, 0.10.2.0 Homepage: https://github.com/haskell/bytestring Bug reports: https://github.com/haskell/bytestring/issues Description: An efficient compact, immutable byte string type (both strict and lazy) suitable for binary or 8-bit character data...........................................................................................................................................We can note that there two installed versions of bytestring package. Let's remove old version with:sudo ghc-pkg unregister --force bytestring-0.10.0.2That's all. After this error with GHCi runtime linker found a duplicate definition error...... will disappear.Source Quote