[Haskell-cafe] building "encoding" on Windows?

Stephen Tetley stephen.tetley at gmail.com
Mon Mar 29 15:10:41 EDT 2010


Hello

Building this on widows might be a bit of a challenge...

Generally I'd be advise building with "runhaskell Setup.hs ..." from
MinGW, the first step of which would be something like:

> runhaskell Setup.hs configure --extra-include-dirs=C:\\msys\\1.0\\home\\stephen\\encoding-0.6.3 --extra-lib-dirs=C:\\msys\\1.0\\home\\stephen\\encoding-0.6.3

Above should be all one line - no doubt it will get split somewhere.
Paths are separated with double slash, they don't need to be in double
quotes.

On my system, even though the path supplied via the --extra-*
directives was correct Cabal was telling me:

Configuring encoding-0.6.3...
Setup.hs: Missing dependency on a foreign library:
* Missing header file: system_encoding.h
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.

This is actually due to a missing header file included *by*
system_encoding.h rather than Cabal not finding system_encoding.h. It
took to me a while to spot that one! [note to self - always check for
this in future].

The missing header is <langinfo.h> - where it originates I don't know,
as I don't have it with either Msys/MinGW or Cygwin and my Cygwin is
pretty large these days.

Best wishes

Stephen


More information about the Haskell-Cafe mailing list