我正在尝试使用ghc-mod库来检测另一个程序中的haskell程序。当我这样做时,我收到以下错误:
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
我不知道hslogger是什么,因为它不是我的cabal文件中的依赖项。即使输入文件只是x=3
,也会发生错误,所以在要检查的文件中没有任何奇怪的导入。
有谁知道可能导致这种情况的原因?我在yesod的一个线程中调用ghc-mod,这可能会导致问题吗?是否已知ghc-mod是非线程安全的?