Skip to content

CApiFFI doesn't produce wrappers for #defined values in GHCi

When using the FFI's capi calling convention to get access to #defined constants ghci produces the following error:

ByteCodeLink: can't find label During interactive linking, GHCi couldn't find the following symbol:

ghc_wrapper_<mangled string>_<symbol name>

Compiling via the commandline works just fine. Attached is a minimal test case. "ghc minimal.hs" produces a working binary, but "ghci minimal.hs" produces the above error.

Trac metadata
Trac field Value
Version 7.6.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHCi
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