Consider the following simple code:
import Crypto.Hash.SHA1 (hashlazy)
import qualified Data.ByteString as BS
main = return ()
I installed cabal install --global bytestring
and then I obtain (on a newly installed Ubuntu 12.04 machine using ghc 7.4.1):
GHCi runtime linker: fatal error: I found a duplicate definition for symbol
fps_minimum
whilst processing object file
/usr/local/lib/bytestring-0.10.0.1/ghc-7.4.1/HSbytestring-0.10.0.1.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.
What can I do with that?
bytestring
wascryptohash
built against? – Fourthclasscryptohash 0.7.6
was built usingghc 7.6
(I use7.4
). Could it be a problem? – Brainardghc-pkg describe cryptohash
will list something likebytestring-0.10.0.0-b8146809d010d5e46cdb979e5b99953f
in the depends field. If that is not the same version ofbytestring
that theimport qualified Data.ByteString as BS
pulls in, you have your duplicate symbol error. – Fourthclassbytestring-0.9.2.1-18f26186028d7c0e92e78edc9071d376
but I have installedbytestring-0.10.0.1
, so that's the problem, right? – Brainardbytestring
, or tell ghc(i) to use the old whenever you use cryptohash. - Note, you may need to rebuild other packages too. – Fourthclass