[GHC] #9720: libffi compilation does not use bundled g++ on Windows
GHC
ghc-devs at haskell.org
Fri Oct 24 09:43:59 UTC 2014
#9720: libffi compilation does not use bundled g++ on Windows
-------------------------------------+-------------------------------------
Reporter: gintas | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Build System | Version: 7.8.3
Keywords: | Operating System: Windows
Architecture: Unknown/Multiple | Type of failure:
Difficulty: Unknown | None/Unknown
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Building GHC fails on Windows (at least on mingw32) if there is no host
g++ compiler available. The cause seems to be that configure script looks
for a C++ compiler and fails to find one.
Here's the invocation of the libffi configure script from the main build:
cd libffi && \
\
cd build && \
CC=C:/Users/Gintas/Downloads/msys32/home/Gintas/ghc/inplace/mingw/bin/gcc.exe
\
LD=C:/Users/Gintas/Downloads/msys32/home/Gintas/ghc/inplace/mingw/bin/ld.exe
\
AR=/usr/bin/ar \
NM=C:/Users/Gintas/Downloads/msys32/home/Gintas/ghc/inplace/mingw/bin/nm.exe
\
RANLIB=C:/Users/Gintas/Downloads/msys32/home/Gintas/ghc/inplace/mingw/bin/ranlib.exe
\
CFLAGS=" -U__i686 -march=i686 -fno-stack-protector -w" \
LDFLAGS=" -w" \
"/bin/sh" ./configure \
--prefix=C:/Users/Gintas/Downloads/msys32/home/Gintas/ghc/libffi/build/inst
\
--libdir=C:/Users/Gintas/Downloads/msys32/home/Gintas/ghc/libffi/build/inst/lib
\
--enable-static=yes \
--enable-shared=no \
--host=i386-unknown-mingw32
Note that CC is overridden, but CXX is not. The configure script then
looks for a C++ compiler and finds KCC, which is not even a compiler but a
kerberos tool:
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... KCC
checking whether we are using the GNU C++ compiler... no
checking whether KCC accepts -g... no
checking dependency style of KCC... none
This causes the configure script to fail later on.
g++ is not actually used in the build (looks like it's only needed for one
test case), passing in gcc for CXX seems to work fine.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9720>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list