Building 'text-icu-0.1' on Windows

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 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
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
After downloading and untaring "text-icu-0.1", I tried to configure, typing in: 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

On Wed, May 13, 2009 at 12:54 AM, Serge LE HUITOUZE
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
header, you may << need to edit the typedefs below. */ << #if U_HAVE_INTTYPES_H << #include << #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

On Wed, May 13, 2009 at 4:46 PM, Alexander Dunlap < alexander.dunlap@gmail.com> wrote:
This isn't really helpful, but I received similar errors when trying to build icu-text on Windows
If one of you has the time to dig into this and send a patch that corrects the problem, I'd welcome the help. As I'm sure you can tell, I developed text-icu on Unix, and I don't have regular enough Windows access to make debugging this a quick and easy matter. Thanks, B.

On Thu, May 14, 2009 at 10:18 AM, Bryan O'Sullivan
If one of you has the time to dig into this and send a patch that corrects the problem, I'd welcome the help. As I'm sure you can tell, I developed text-icu on Unix, and I don't have regular enough Windows access to make debugging this a quick and easy matter.
By the way, if you run into problems building or using text or text-icu,
please file a ticket here: http://trac.haskell.org/text/newticket

On Thu, May 14, 2009 at 10:25 AM, Bryan O'Sullivan
On Thu, May 14, 2009 at 10:18 AM, Bryan O'Sullivan
wrote: If one of you has the time to dig into this and send a patch that corrects the problem, I'd welcome the help. As I'm sure you can tell, I developed text-icu on Unix, and I don't have regular enough Windows access to make debugging this a quick and easy matter.
By the way, if you run into problems building or using text or text-icu, please file a ticket here: http://trac.haskell.org/text/newticket
Hi, I've attached a patch that fixes the build on Windows. It also doesn't seem to break the build on my Linux box. However, the patch basically consists of removing an #include statement and removing some library dependencies (which for some reason don't exist in the Windows distribution of ICU), so I don't know if it would break something else. The library compiles without warnings with the patch applied, though. Maybe Serge could test the patch on his machine? Thanks, Alex
participants (3)
-
Alexander Dunlap
-
Bryan O'Sullivan
-
Serge LE HUITOUZE