[darcs-users] darcs build on win32 (msys/mingw) fails

Peter Strand peter at zarquon.se
Wed Mar 17 08:26:37 UTC 2004

David Roundy wrote:

>On Tue, Mar 16, 2004 at 03:29:59PM +0100, Gour wrote:
>>Trying to build latest darcs code (from the repo) on Win98 with MinGW
>>compiler in MSYS environment with ghc-6.2.1rc results in
>>c:/tmp/ghc-385293.hc:9:18: zlib.h: No such file or directory
>>make: *** [FastPackedString.o] Error 1
>>Any idea?
>It is possible that the default search path for header files is different
>in ghc than in gcc, in which case perhaps we need to be passing an -I flag
>into ghc (perhaps even an -optc-I flag).  The good news is that provided
>you do have zlib installed, this looks like a pretty easy problem (assuming
>once we get zlib.h included properly everything then works...).

ghc on win32 is shipped with its own version of gcc, which it uses for 
compilation of C files.
But the configure script uses whatever gcc found in the path to detect 
headers, and will thus find
a lot more than ghc can find. I usually configure with a few extra -I 
and -L flags, to make sure that
ghc's gcc finds relevant headers. Not completely correct since different 
compilers are used for
configuration and compilation, but it works as long as they are similar 
I think the correct way to do it is to either get ghc to use mingw's gcc 
(-pgmc /usr/bin/gcc ?), or
to get configure to use ghc's gcc. But I haven't tried either of these.

CPPFLAGS=-Ic:/mingw/include\ -Lc:/mingw/lib ./configure   <other flags>
works for me.


More information about the darcs-users mailing list