I have upstreamed a fix in ghc, which is not yet released and funnily I don’t think the fix works anyway. 😄 However there is a known to be working workaround:
Put this in the executable part of your .cabal file.
-- Workaround for a runtime error ("HEAP8 not found"). Only necessary until
-- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/14362 is resolved.
ld-options: -sEXPORTED_RUNTIME_METHODS=HEAP8,HEAPU8