
#7979: ./configure script does not properly detect missing header files -----------------------------+---------------------------------------------- Reporter: jstolarek | Owner: Type: bug | Status: new Priority: normal | Component: Build System Version: 7.6.3 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Blockedby: Blocking: | Related: -----------------------------+---------------------------------------------- I was trying to compile GHC on a fresh installation of Debian Wheezy and I got this compilation error: {{{ CROSS_COMPILE="" "inplace/bin/ghc-cabal" configure --with-ghc="/dane/download/ghc-7.6.3/inplace/bin/ghc-stage1" --with-ghc-pkg="[9/1856] wnload/ghc-7.6.3/inplace/bin/ghc-pkg" --enable-library-profiling --enable-shared --enable-library-for-ghci --configure-option=CFLAGS=" -fno-stack-protector " --configure-option=LDFLAGS=" -Wl,--hash-size=31 -Wl,--reduce-memory-overheads " --configure-option=CPPFLAGS=" " --with-gcc="/usr/bin/gcc" --configure-option=--with-cc="/usr/bin/gcc" --with-ar="/usr/bin/ar" --with-ranlib="true" --with-alex="/usr /bin/alex" --with-happy="/usr/bin/happy" -- dist-install libraries/terminfo Configuring terminfo-0.3.2.4... configure: WARNING: unrecognized options: --with-compiler, --with-gcc checking for gcc... /usr/bin/gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether /usr/bin/gcc accepts -g... yes checking for /usr/bin/gcc option to accept ISO C89... none needed checking how to run the C preprocessor... /usr/bin/gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking ncurses.h usability... no checking ncurses.h presence... no checking for ncurses.h... no checking curses.h usability... no checking curses.h presence... no checking for curses.h... no configure: error: in `/dane/download/ghc-7.6.3/libraries/terminfo': configure: error: curses headers could not be found, so this package cannot be built See `config.log' for more details make[1]: *** [libraries/terminfo/dist-install/package-data.mk] Error 1 make: *** [all] Error 2 }}} Which means that `./configure` did not detect that ncurses header files are missing from the system. I think that in this situation `./configure` should fail and inform the user that required header files are missing. Also, I noticed that when Alex and Happy are missing from the system then `./configure` will also not complain. I admit I didn't try to build with these two binaries missing, but I suspect that building would fail. If so, then `./configure` script should also fail in this situation. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7979 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler