ghc panic: -fexternal-interpreter + .o + QuasiQuotes?
- 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
- Write Haskell that uses QuasiQuotes, e.g:
cat > h.hs << EOF
{-# LANGUAGE QuasiQuotes #-}
import Text.Heredoc (here)
s :: String
s = [here|goes nothing|]
EOF
- 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 |