panic: Loading temp shared object failed
I've attached a no-Haskell-code project that fails when I run cabal repl
with the following error:
ghc: panic! (the 'impossible' happened)
(GHC version 7.10.3 for x86_64-unknown-linux):
Loading temp shared object failed: /tmp/ghc60744_0/libghc_1.so: undefined symbol: _ZN2Zq1qE
Building the project works fine, so the problem seems to be (only) with dynamic linking. The issue can be resolved by swapping the order of the .cpp files in the cabal file.