[Haskell-cafe] digest and zlib on Windows

Tillmann Rendel rendel at cs.au.dk
Tue Mar 10 14:38:32 EDT 2009

Hi Eugene,

I run into some troubles with the digest package on Windows.

On unix, digest binds to zlib, but on Windows, the relevant c files from 
zlib are included. However, in digest-, two header files were 
missing which were needed for compilation on my machine. With these 
header files added (from digits-, digest compiles fine.

Unfortunately, the zlib package has the same approach of including c 
files from zlib on Windows. That means that I could not use both zlib 
and digest together, because they contained conflicting symbols. 
Unfortunately, pandoc requires both zlib and digest.

I solved the problem by removing the cbits from digest, and instead 
require the zlib on Windows. In other words, I deleted the cbits 
subdirectory, and changed the last few lines of digest.cabal from

   if !os(windows)
     extra-libraries: z
     c-sources:     cbits/adler32.c cbits/crc32.c
     include-dirs:  cbits
     install-includes: zlib.h

to the following:

   if !os(windows)
     extra-libraries: z
     build-depends: zlib

With this change, everything seems to work fine for me.


More information about the Haskell-Cafe mailing list