On a fresh gentoo install, ghc is failing to compile because it can't find ffi.h. # file /usr/lib64/libffi-3.0.11/include/ffi.h /usr/lib64/libffi-3.0.11/include/ffi.h: ASCII English text I've attached emerge --info ghc and the build.log. Reproducible: Always
Created attachment 323212 [details] emerge --info
Created attachment 323214 [details] build.log
Created attachment 339146 [details] ghc-7.4.2 build.log I get a similar error on a fresh ~ppc64 install, this time it is: /var/tmp/portage/dev-lang/ghc-7.4.2/temp/ghc29476_0/ghc29476_0.c:4:17: fatal error: ffi.h: No such file or directory compilation terminated. make[1]: *** [libraries/ghc-prim/dist-install/build/GHC/Types.p_o] Error 1
Current workaroung is to use USE=ghcmakebinary. The trouble is our gentoo's libffi patch, which works only on registerised bings with native codegen. Sorry.
I hope to get proper fix upstream around 7.8.1 as a part of https://ghc.haskell.org/trac/ghc/ticket/8748 We can even get ghci working on ppc64 (current state on ghc-7.8.1_rc1 in ::gentoo-haskell overlay).
Fixed upstream. Will be fine for ghc-7.8+. Available in overlay as: dev-lang/ghc-7.8.2::gentoo-haskell