[Haskell-cafe] Building 'text-icu-0.1' on Windows

Alexander Dunlap alexander.dunlap at gmail.com
Wed May 13 19:46:02 EDT 2009


On Wed, May 13, 2009 at 12:54 AM, Serge LE HUITOUZE
<slehuitouze at telisma.com> wrote:
> Hi there,
>
> I fail to build text-icu-0.1 on Windows, and would appreciate some help...
> Thanks in advance!
>
> Let me describe what I've done so for, and what results I got:
>
> First, I got a version of ICU on my machine, specifically unzipping the
> file "icu4c-4_0_1-Win32-msvc8.zip" from
> http://icu-project.org/download/4.0.html.
> This made me having ICU stuff at location "C:\HaskellStuff\icu\icu", as
> witnessed below:
>
>>> C:\HaskellStuff\icu\icu>dir
> << 30/04/2009  16:08    <REP>          .
> << 30/04/2009  16:08    <REP>          ..
> << 30/04/2009  16:51    <REP>          bin
> << 30/04/2009  16:08    <REP>          include
> << 30/04/2009  16:36    <REP>          lib
> << 14/01/2009  22:48             2 032 license.html
>
> After downloading and untaring "text-icu-0.1", I tried to configure, typing
> in:
>
>>> C:\HaskellStuff\pkg\text-icu-0.1>runhaskell Setup configure
> << Configuring text-icu-0.1...
> << Setup: Missing dependencies on foreign libraries:
> << * Missing C libraries: icui18n, icuuc, icudata
> << This problem can usually be solved by installing the system packages that
> << provide these libraries (you may need the "-dev" versions). If the
> libraries
> << are already installed but in a non-standard location then you can use the
> << flags --extra-include-dirs= and --extra-lib-dirs= to specify where they
> are.
>
> OK, let's restart with appropriate values for said flags!
>
>>> C:\HaskellStuff\pkg\text-icu-0.1>runhaskell Setup configure
>>>    --extra-include-dirs=C:\HaskellStuff\icu\icu\include
>>>    --extra-lib-dirs=C:\HaskellStuff\icu\icu\lib
> << Configuring text-icu-0.1...
>
> And then proceed with the building per se:
>
>>> C:\HaskellStuff\pkg\text-icu-0.1>runhaskell Setup build
> << Preprocessing library text-icu-0.1...
> << In file included from
> C:/HaskellStuff/icu/icu/include/unicode/umachine.h:47,
> <<                  from
> C:/HaskellStuff/icu/icu/include/unicode/utypes.h:36,
> <<                  from Data\Text\ICU\Error.hsc:148:
> << C:/HaskellStuff/icu/icu/include/unicode/pwin32.h:120:
> <<       error: redefinition of typedef 'int8_t'
> << C:/ghc/ghc-6.10.1/include/mingw/stdint.h:27:
> <<       error: previous declaration of 'int8_t' was here
> << ...
> << ... (a bunch of similar messages for other type aliases, e.g. 'uint8_t')
> << ...
> << compiling dist\build\Data\Text\ICU\Error_hsc_make.c failed
> << command was: C:\ghc\ghc-6.10.1\gcc.exe -c -BC:\ghc\ghc-6.10.1\gcc-lib
> <<                 -IC:\ghc\ghc-6.10.1\include\mingw
> -D__GLASGOW_HASKELL__=610
> <<                 -IC:\HaskellStuff\icu\icu\include
> <<                 -IC:\ghc\ghc-6.10.1\bytestring-0.9.1.4\include
> <<                 -IC:\ghc\ghc-6.10.1\base-4.0.0.0\include
> <<                 -IC:\ghc\ghc-6.10.1/include
> <<                 -IPAPI_INCLUDE_DIR
> dist\build\Data\Text\ICU\Error_hsc_make.c
> <<                 -o dist\build\Data\Text\ICU\Error_hsc_make.o
> <<
> << C:\HaskellStuff\pkg\text-icu-0.1>
>
> The "mingw/stdint.h" file contains a series of lines of this style:
> <<
> << typedef signed char int8_t;
>
> Whereas, the "unicode/pwin32.h" file contains contains stuff like:
> <<
> << /* Define whether inttypes.h is available */
> << #ifndef U_HAVE_INTTYPES_H
> << #define U_HAVE_INTTYPES_H 0
> << #endif
> << ...
> <<
> << /* Determines whether specific types are available */
> << #ifndef U_HAVE_INT8_T
> << #define U_HAVE_INT8_T U_HAVE_INTTYPES_H
> << #endif
> << ...
> <<
> << /* If your platform does not have the <inttypes.h> header, you may
> <<    need to edit the typedefs below. */
> << #if U_HAVE_INTTYPES_H
> << #include <inttypes.h>
> << #else /* U_HAVE_INTTYPES_H */
> <<
> << #if ! U_HAVE_INT8_T
> << typedef signed char int8_t;
> << #endif
> << ...
> << #endif
>
> So, do I need to explicitely change the icu include file?
> And in which way?
>
> Any other solution/suggestion?
>
> Best regards.
>
> --Serge
>

This isn't really helpful, but I received similar errors when trying
to build icu-text on Windows. It seemed like the problem was that
GHC's headers defined some of the symbols that were also defined in
ICU...I don't know how to fix this though.

Alex


More information about the Haskell-Cafe mailing list