haskell / text-icu

This package provides the Haskell Data.Text.ICU library, for performing complex manipulation of Unicode text.
BSD 2-Clause "Simplified" License
47 stars 41 forks source link

Build breaks with icu 68 #49

Closed WorldSEnder closed 3 years ago

WorldSEnder commented 3 years ago

Building on my system, errors with the following

text-icu> cbits/text_icu.c: In function '__hs_unorm_quickCheck':
text-icu> 
text-icu> /tmp/stack-56efa0379724b03c/text-icu-0.7.0.1/cbits/text_icu.c:265:5: error:
text-icu>      warning: 'unorm_quickCheck_68' is deprecated [-Wdeprecated-declarations]
text-icu>       265 |     return unorm_quickCheck(source, sourcelength, mode, status);
text-icu>           |     ^~~~~~
text-icu>     |
text-icu> 265 |     return unorm_quickCheck(source, sourcelength, mode, status);
text-icu>     |     ^
text-icu> In file included from /usr/include/unicode/platform.h:25,
text-icu>                  from /usr/include/unicode/ptypes.h:52,
text-icu>                  from /usr/include/unicode/umachine.h:46,
text-icu>                  from /usr/include/unicode/utypes.h:38,
text-icu>                  from include/hs_text_icu.h:5,
text-icu> 
text-icu> /tmp/stack-56efa0379724b03c/text-icu-0.7.0.1/                 from cbits/text_icu.c:1:0: error: 
text-icu> 
text-icu> /tmp/stack-56efa0379724b03c/text-icu-0.7.0.1//usr/include/unicode/unorm.h:244:1: error:
text-icu>      note: declared here
text-icu>       244 | unorm_quickCheck(const UChar *source, int32_t sourcelength,
text-icu>           | ^~~~~~~~~~~~~~~~
text-icu>     |
text-icu> 244 | unorm_quickCheck(const UChar *source, int32_t sourcelength,
text-icu>     | ^
text-icu> cbits/text_icu.c: In function '__hs_unorm_isNormalized':
text-icu> 
text-icu> /tmp/stack-56efa0379724b03c/text-icu-0.7.0.1/cbits/text_icu.c:272:5: error:
text-icu>      warning: 'unorm_isNormalized_68' is deprecated [-Wdeprecated-declarations]
text-icu>       272 |     return unorm_isNormalized(src, srcLength, mode, pErrorCode);
text-icu>           |     ^~~~~~
text-icu>     |
text-icu> 272 |     return unorm_isNormalized(src, srcLength, mode, pErrorCode);
text-icu>     |     ^
text-icu> In file included from /usr/include/unicode/platform.h:25,
text-icu>                  from /usr/include/unicode/ptypes.h:52,
text-icu>                  from /usr/include/unicode/umachine.h:46,
text-icu>                  from /usr/include/unicode/utypes.h:38,
text-icu>                  from include/hs_text_icu.h:5,
text-icu> 
text-icu> /tmp/stack-56efa0379724b03c/text-icu-0.7.0.1/                 from cbits/text_icu.c:1:0: error: 
text-icu> 
text-icu> /tmp/stack-56efa0379724b03c/text-icu-0.7.0.1//usr/include/unicode/unorm.h:291:1: error:
text-icu>      note: declared here
text-icu>       291 | unorm_isNormalized(const UChar *src, int32_t srcLength,
text-icu>           | ^~~~~~~~~~~~~~~~~~
text-icu>     |
text-icu> 291 | unorm_isNormalized(const UChar *src, int32_t srcLength,
text-icu>     | ^
text-icu> cbits/text_icu.c: In function '__hs_unorm_normalize':
text-icu> 
text-icu> /tmp/stack-56efa0379724b03c/text-icu-0.7.0.1/cbits/text_icu.c:280:5: error:
text-icu>      warning: 'unorm_normalize_68' is deprecated [-Wdeprecated-declarations]
text-icu>       280 |     return unorm_normalize(source, sourceLength, mode, options, result,
text-icu>           |     ^~~~~~
text-icu>     |
text-icu> 280 |     return unorm_normalize(source, sourceLength, mode, options, result,
text-icu>     |     ^
text-icu> In file included from /usr/include/unicode/platform.h:25,
text-icu>                  from /usr/include/unicode/ptypes.h:52,
text-icu>                  from /usr/include/unicode/umachine.h:46,
text-icu>                  from /usr/include/unicode/utypes.h:38,
text-icu>                  from include/hs_text_icu.h:5,
text-icu> 
text-icu> /tmp/stack-56efa0379724b03c/text-icu-0.7.0.1/                 from cbits/text_icu.c:1:0: error: 
text-icu> 
text-icu> /tmp/stack-56efa0379724b03c/text-icu-0.7.0.1//usr/include/unicode/unorm.h:218:1: error:
text-icu>      note: declared here
text-icu>       218 | unorm_normalize(const UChar *source, int32_t sourceLength,
text-icu>           | ^~~~~~~~~~~~~~~
text-icu>     |
text-icu> 218 | unorm_normalize(const UChar *source, int32_t sourceLength,
text-icu>     | ^
text-icu> cbits/text_icu.c: In function '__hs_u_strCompareIter':
text-icu> 
text-icu> /tmp/stack-56efa0379724b03c/text-icu-0.7.0.1/cbits/text_icu.c:308:43: error:
text-icu>      error: 'TRUE' undeclared (first use in this function)
text-icu>       308 |     return u_strCompareIter(iter1, iter2, TRUE);
text-icu>           |                                           ^~~~
text-icu>     |
text-icu> 308 |     return u_strCompareIter(iter1, iter2, TRUE);
text-icu>     |                                           ^
text-icu> 
text-icu> /tmp/stack-56efa0379724b03c/text-icu-0.7.0.1/cbits/text_icu.c:308:43: error:
text-icu>      note: each undeclared identifier is reported only once for each function it appears in
text-icu>     |
text-icu> 308 |     return u_strCompareIter(iter1, iter2, TRUE);
text-icu>     |                                           ^
text-icu> `gcc' failed in phase `C Compiler'. (Exit code: 1)

while the first few errors are mere deprecation warnings, the last error is due to icu not declaring TRUE and FALSE unless U_DEFINE_FALSE_AND_TRUE is set. See also the associated icu bug

WorldSEnder commented 3 years ago

Fixed with #48

njbart commented 3 years ago

pandoc currently cannot be built with icu support either because of the bug described in this thread.

pandoc with icu does build using an unofficial fork, e.g., https://github.com/WorldSEnder/text-icu/, but a timely official text-icu release fixing this would be much appreciated indeed!

prikhi commented 3 years ago

@bos Can you take a look at this and the fixes at #48 / #51?

andreasabel commented 3 years ago

@prikhi: I think @bos cannot hear you.

gbaz commented 3 years ago

Just ran into this as well, really need a new release.

gbaz commented 3 years ago

resolved by #52