
#10237: compiler/ghci/LibFFI.hsc:42 sizeof(ffi_cif) is not an integer -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Building GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Description changed by erikd: Old description:
Cross-compiling from linux-amd64 to linux-armhf 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:
{{{#!hs cif <- mallocBytes (#const sizeof(ffi_cif)) }}}
Native compile on this system works fine.
New description: 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: {{{#!hs 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. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10237#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler