I'm trying to use the ghc-mod library to typecheck a haskell program from within another program. When I do so, I get the following error:
GHCi runtime linker: fatal error: I found a duplicate definition for symbol
__stginit_hsloggerzm1zi2zi3_SystemziLog
whilst processing object file
/home/joey/stuff/workspace/myproject/.cabal-sandbox/lib/x86_64-linux-ghc-7.6.3/hslogger-1.2.3/libHShslogger-1.2.3.a
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.
Exit code: ExitFailure 1
I have no idea what hslogger is, as it isn't a dependency in my cabal file. The error happens even when the input file is just x=3
, so it's not any weird import in the file being checked.
Does anyone know what might be causing this? I'm calling ghc-mod from within a thread in yesod, might this be causing problems? Is ghc-mod known to be non-threadsafe?