[Haskell-cafe] Haskell plugin dynamic linking issue

Lana Black lanablack at amok.cc
Mon Apr 10 12:44:54 UTC 2017


I'm working on a Haskell plugin (a shared library) for a C program. When
I load the plugin, I get the following error:

> ./open
dlopen() failed:
undefined symbol: stg_thawArrayzh

open is just a testing wrapper around dlopen(). I found out that
stg_thawArrayzh symbol is exported by the rts, and my library isn't
linked to it, and neither is ghc-prim. How do I fix that? Adding
-lHSrts-ghc8.0.2 to ld-options doesn't seem to have any effect.


More information about the Haskell-Cafe mailing list