--with-libffi-header=<value> is not propagated to compiler/ghci/LibFFI.hsc compilation
While experimenting with GHC HEAD compilation on Solaris 11 using system provided libffi I've noticed that actual value of configure parameter --with-libffi-includes is not propagated to compilation of compiler/ghci/LibFFI.hsc file. For example on Solaris 11 I'm configuring with this:
./configure --with-gmp-includes=/usr/include/gmp/ --with-system-libffi --with-ffi-includes=/usr/lib/libffi-3.0.9/include/ --with-nm=/usr/gnu/bin/nm
and the build fails with:
"inplace/bin/hsc2hs" --cc=/usr/bin/gcc --ld=/usr/bin/gcc --cross-safe --cflag=-fno-stack-protector -I/usr/include/gmp/ --cflag=-D__GLASGOW_HASKELL__=707 --cflag=-Di386_HOST_ARCH=1 --cflag=-Dsolaris2_HOST_OS=1 '--cflag=-fno-stack-protector' '--cflag=-Icompiler/../rts/dist/build' '--cflag=-Icompiler/stage2' '--cflag=-Icompiler/.' '--cflag=-Icompiler/parser' '--cflag=-Icompiler/utils' '--cflag=-DGHCI' '--cflag=-I/export/home/karel/vcs/ghc-src/ghc-head/libraries/process/include' '--cflag=-I/export/home/karel/vcs/ghc-src/ghc-head/libraries/directory/include' '--cflag=-I/export/home/karel/vcs/ghc-src/ghc-head/libraries/unix/include' '--cflag=-I/export/home/karel/vcs/ghc-src/ghc-head/libraries/time/include' '--cflag=-I/export/home/karel/vcs/ghc-src/ghc-head/libraries/containers/include' '--cflag=-I/export/home/karel/vcs/ghc-src/ghc-head/libraries/bytestring/include' '--cflag=-I/export/home/karel/vcs/ghc-src/ghc-head/libraries/array/include' '--cflag=-I/export/home/karel/vcs/ghc-src/ghc-head/libraries/base/include' '--cflag=-I/usr/include/gmp/' '--cflag=-I/export/home/karel/vcs/ghc-src/ghc-head/rts/dist/build' '--cflag=-I/export/home/karel/vcs/ghc-src/ghc-head/includes' '--cflag=-I/export/home/karel/vcs/ghc-src/ghc-head/includes/dist-derivedconstants/header' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-head/libraries/transformers/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-head/libraries/template-haskell/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-head/libraries/hpc/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-head/libraries/hoopl/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-head/libraries/bin-package-db/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-head/libraries/binary/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-head/libraries/Cabal/Cabal/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-head/libraries/process/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-head/libraries/pretty/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-head/libraries/directory/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-head/libraries/unix/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-head/libraries/time/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-head/libraries/old-locale/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-head/libraries/filepath/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-head/libraries/containers/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-head/libraries/bytestring/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-head/libraries/deepseq/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-head/libraries/array/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-head/libraries/base/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-head/libraries/integer-gmp/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-head/libraries/ghc-prim/dist-install/build' '--lflag=-L/export/home/karel/vcs/ghc-src/ghc-head/rts/dist/build' '--lflag=-lrt' '--lflag=-ldl' '--lflag=-lgmp' '--lflag=-lm' '--lflag=-lrt' '--lflag=-ldl' '--lflag=-lffi' --cflag=-Icompiler/stage2/build/autogen --cflag=-include --cflag=compiler/stage2/build/autogen/cabal_macros.h compiler/ghci/LibFFI.hsc -o compiler/stage2/build/LibFFI.hs
LibFFI.hsc:9:17: fatal error: ffi.h: No such file or directory
compilation terminated.
compiling compiler/stage2/build/LibFFI_hsc_make.c failed (exit code 1)
command was: /usr/bin/gcc -c compiler/stage2/build/LibFFI_hsc_make.c -o compiler/stage2/build/LibFFI_hsc_make.o -fno-stack-protector -I/export/home/karel/vcs/ghc-src/ghc-head/includes -fno-stack-protector -I/usr/include/gmp/ -D__GLASGOW_HASKELL__=707 -Di386_HOST_ARCH=1 -Dsolaris2_HOST_OS=1 -fno-stack-protector -Icompiler/../rts/dist/build -Icompiler/stage2 -Icompiler/. -Icompiler/parser -Icompiler/utils -DGHCI -I/export/home/karel/vcs/ghc-src/ghc-head/libraries/process/include -I/export/home/karel/vcs/ghc-src/ghc-head/libraries/directory/include -I/export/home/karel/vcs/ghc-src/ghc-head/libraries/unix/include -I/export/home/karel/vcs/ghc-src/ghc-head/libraries/time/include -I/export/home/karel/vcs/ghc-src/ghc-head/libraries/containers/include -I/export/home/karel/vcs/ghc-src/ghc-head/libraries/bytestring/include -I/export/home/karel/vcs/ghc-src/ghc-head/libraries/array/include -I/export/home/karel/vcs/ghc-src/ghc-head/libraries/base/include -I/usr/include/gmp/ -I/export/home/karel/vcs/ghc-src/ghc-head/rts/dist/build -I/export/home/karel/vcs/ghc-src/ghc-head/includes -I/export/home/karel/vcs/ghc-src/ghc-head/includes/dist-derivedconstants/header -Icompiler/stage2/build/autogen -include compiler/stage2/build/autogen/cabal_macros.h -I/export/home/karel/vcs/ghc-src/ghc-head/inplace/lib/include/
gmake[1]: *** [compiler/stage2/build/LibFFI.hs] Error 1
gmake: *** [all] Error 2
when I add appropriate --cflag=-I/usr/lib/libffi-3.0.9/include/ to the hsc2hs command line compilation went fine.
Trac metadata
Trac field | Value |
---|---|
Version | 7.7 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Build System |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | Solaris |
Architecture | x86 |