GHC Panic: Failed to load shared temp object

We are working on the Parsec fork (with a full set of QuickCheck tests, improved error messages, and other improvements), and some progress has been made. Most of the time I worked with REPL from Emacs, specifying the purpose of the tests assembly (that is, obviously, the name of the test suite). This is working fine.

Now our thing passes tests, everything looks fine, but if I start using REPL with the target library (or omitting it, that is cabal repl or cabal repl lib:megaparsec ) and do something, I get a GHC panic:

 Ξ»> parseTest (string "rere" <* eof) "reri" ghc: panic! (the 'impossible' happened) (GHC version 7.10.1 for x86_64-unknown-linux): Loading temp shared object failed: /tmp/ghc9380_0/libghc9380_93.so: undefined symbol: _hpc_tickboxes_megapzuEw3SHAmfXgNLpm5a31oXO6_TextziMegaparsecziError_hpc Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug 

Since the code compiles and works fine through cabal repl tests , I believe that this is not my programming error, but maybe this is a mistake.

I found this ticket: https://ghc.haskell.org/trac/ghc/ticket/10761 , but our library does not use Template Haskell.

Actual question: what should I do and how can I fix it? I can’t even say whether it is Cabal or GHC, I have no idea how to create a minimal example that could reproduce the problem.


I reported this:

https://ghc.haskell.org/trac/ghc/ticket/10765#ticket

+7
haskell ghc cabal
source share
1 answer

If you carefully read the error, you will notice that the missing function is related to hpc:

  undefined symbol: _hpc_ tickboxes_megapzuEw3SHAmfXgNLpm5a31oXO6_TextziMegaparsecziError_hpc

My guess is that the toolkit that provides HPC (haskell coverage) is not compatible with the interactive haskell code that GHCi does. Disabling HPC ( cabal clean , followed by cabal configure so that coverage is disabled when disconnecting), you need to fix the problem.

I suggest reporting a bug in tracking GHC bugs (although this could also be a cache bug, I don't know who is to blame).

+7
source share

All Articles