Skip to content

ghc panic: -fexternal-interpreter + .o + QuasiQuotes?

  1. Compile an object file with -fPIC, e.g:
cat > hello.c << EOF
#include <stdio.h>
void hi(){puts("Hello, World!");}
EOF
gcc -c -fPIC hello.c
  1. Write Haskell that uses QuasiQuotes, e.g:
cat > h.hs << EOF
{-# LANGUAGE QuasiQuotes #-}
import Text.Heredoc (here)
s :: String
s = [here|goes nothing|]
EOF
  1. Compile with -fexternal-interpreter:
cabal install heredoc
ghc -fexternal-interpreter h.hs hello.o

I saw:

[1 of 1] Compiling Main ( h.hs, h.o ) ghc: panic! (the 'impossible' happened)

(GHC version 8.0.2 for x86_64-unknown-linux):

Loading temp shared object failed: /home/blynn/.local/lib/ghc-8.0.2/ghc-prim-0.5.0.0/libHSghc-prim-0.5.0.0-ghc8.0.2.so: undefined symbol: stg_thawArrayzh

Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug

Trac metadata
Trac field Value
Version 8.0.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information