hsc2hs : compiler/ghci/LibFFI.hsc:42 sizeof(ffi_cif) is not an integer
Cross-compiling git HEAD from linux-amd64 to linux-aarch64 and I get the above error message. The command (after removing a bunhc of irrelevant command line flags) is:
inplace/bin/hsc2hs --cc=/usr/bin/aarch64-linux-gnu-gcc \
--ld=/usr/bin/aarch64-linux-gnu-gcc \
--cross-safe --cflag=-fno-stack-protector --cross-compile \
--cflag=-Daarch64_HOST_ARCH=1 \
--cflag=-Dlinux_HOST_OS=1 --cflag=-D__GLASGOW_HASKELL__=711 \
--cflag=-Icompiler/../rts/dist/build \
--cflag=-Werror=unused-but-set-variable \
--cflag=-include \
--cflag=compiler/stage2/build/autogen/cabal_macros.h \
compiler/ghci/LibFFI.hsc -o compiler/stage2/build/LibFFI.hs
The command grep 'sizeof(ffi_cif)' compiler/ghci/LibFFI.hsc
finds:
cif <- mallocBytes (#const sizeof(ffi_cif))
Native compile on this system works fine.
Checking out an older revision that was know to compile correctly also fails. That suggests that something in the tool chain has changed. My GHC is still 7.8.3, but aarch64-linux-gnu-gcc
was recently updated.
Edited by erikd