[Haskell-cafe] haskell zlib on win32
newsham at lava.net
Fri Mar 2 17:54:48 EST 2007
Building haskell's zlib library for win32 is not trivial since
it relies on an external C library. Most of the required tools
are shipped with the ghc binary distribution though. I finally
bit the bullet and jumped through the build hoops to install
it. My notes are attached below.
The build could be nicer if it was more cabalized -- ie. have
the cabal file directly reference the zlib-1.2.3 sources and
headers.. Problems are possible reliance on particular versions,
duplicating already installed code (although in this case its
pretty small), and possibly figuring out how to perform the
"configuration" process without a shell.... Any opinions on
--- WIN32 BUILD INSTRUCTIONS ----
I built from cygwin. Probably a little easier if you have
I have ghc-6.6 installed in /c/ghc/ghc-6.6
(/c is a mount point for c:\ "mount c:\\ /c").
$ darcs get http://haskell.org/~duncan/zlib
$ cd zlib
$ wget http://www.zlib.net/zlib-1.2.3.tar.gz
$ tar -xzf zlib-1.2.3.tar.gz
Prefer ghc's gcc (mingwin) rather than cygwins.
$ export PATH=/c/ghc/ghc-6.6:/c/ghc/ghc-6.6/bin:$PATH
Build zlib C code
$ ./configure --prefix=/c/ghc/ghc-6.6 --libdir=/c/ghc/ghc-6.6
$ make install
build haskell zlib
$ cd ..
$ runhaskell Setup.py configure
$ runhaskell Setup.hs build
$ runhaskell Setup.hs install
More information about the Haskell-Cafe