Undeclared "Uchar" and "char16_t" types

Issue #1153 new
Rafael Fontenelle
created an issue

Operating System: Arch Linux (64-bit)

Packages: cegui 0.8.7, icu 59.1, gcc 7.2.0

When trying to build cegui, it fails in CEGUILibXMLParser because of undeclared "Uchar" and "char16_t" types. See the fail output below, and full output as attachment.

Scanning dependencies of target CEGUILibXMLParser
[ 28%] Building CXX object cegui/src/XMLParserModules/Libxml2/CMakeFiles/CEGUILibXMLParser.dir/XMLParser.cpp.o
In file included from /usr/include/unicode/utypes.h:38:0,
                 from /usr/include/unicode/ucnv_err.h:88,
                 from /usr/include/unicode/ucnv.h:52,
                 from /usr/include/libxml2/libxml/encoding.h:31,
                 from /usr/include/libxml2/libxml/parser.h:810,
                 from /home/rffontenelle/builds/cegui/src/cegui/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp:34:
/usr/include/unicode/umachine.h:347:13: error: char16_t does not name a type; did you mean wchar_t?
     typedef char16_t UChar;
             ^~~~~~~~
             wchar_t
In file included from /usr/include/unicode/utypes.h:39:0,
                 from /usr/include/unicode/ucnv_err.h:88,
                 from /usr/include/unicode/ucnv.h:52,
                 from /usr/include/libxml2/libxml/encoding.h:31,
                 from /usr/include/libxml2/libxml/parser.h:810,
                 from /home/rffontenelle/builds/cegui/src/cegui/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp:34:
/usr/include/unicode/uversion.h:167:55: error: UChar does not name a type; did you mean UChar32?
 u_versionFromUString(UVersionInfo versionArray, const UChar *versionString);
                                                       ^~~~~
                                                       UChar32
In file included from /usr/include/unicode/ucnv.h:52:0,
                 from /usr/include/libxml2/libxml/encoding.h:31,
                 from /usr/include/libxml2/libxml/parser.h:810,
                 from /home/rffontenelle/builds/cegui/src/cegui/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp:34:
/usr/include/unicode/ucnv_err.h:198:11: error: UChar does not name a type; did you mean UChar32?
     const UChar *source;        /**< Pointer to the source source buffer. @stable ICU 2.0    */
           ^~~~~
           UChar32
/usr/include/unicode/ucnv_err.h:199:11: error: UChar does not name a type; did you mean UChar32?
     const UChar *sourceLimit;   /**< Pointer to the limit (end + 1) of source buffer. @stable ICU 2.0    */
           ^~~~~
           UChar32
/usr/include/unicode/ucnv_err.h:216:5: error: UChar does not name a type; did you mean UChar32?
     UChar *target;              /**< Pointer to the target buffer. @stable ICU 2.0    */
     ^~~~~
     UChar32
/usr/include/unicode/ucnv_err.h:217:11: error: UChar does not name a type; did you mean UChar32?
     const UChar *targetLimit;   /**< Pointer to the limit (end + 1) of target buffer. @stable ICU 2.0     */
           ^~~~~
           UChar32
/usr/include/unicode/ucnv_err.h:239:25: error: UChar does not name a type; did you mean UChar32?
                   const UChar* codeUnits,
                         ^~~~~
                         UChar32
/usr/include/unicode/ucnv_err.h:290:25: error: UChar does not name a type; did you mean UChar32?
                   const UChar* codeUnits,
                         ^~~~~
                         UChar32
/usr/include/unicode/ucnv_err.h:320:25: error: UChar does not name a type; did you mean UChar32?
                   const UChar* codeUnits,
                         ^~~~~
                         UChar32
/usr/include/unicode/ucnv_err.h:376:25: error: UChar does not name a type; did you mean UChar32?
                   const UChar* codeUnits,
                         ^~~~~
                         UChar32
In file included from /usr/include/unicode/ucnv.h:53:0,
                 from /usr/include/libxml2/libxml/encoding.h:31,
                 from /usr/include/libxml2/libxml/parser.h:810,
                 from /home/rffontenelle/builds/cegui/src/cegui/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp:34:
/usr/include/unicode/uenum.h:112:16: error: UChar does not name a type; did you mean UChar32?
 U_STABLE const UChar* U_EXPORT2
                ^~~~~
                UChar32
In file included from /usr/include/unicode/ucnv.h:53:0,
                 from /usr/include/libxml2/libxml/encoding.h:31,
                 from /usr/include/libxml2/libxml/parser.h:810,
                 from /home/rffontenelle/builds/cegui/src/cegui/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp:34:
/usr/include/unicode/uenum.h:190:41: error: UChar does not name a type; did you mean UChar32?
 uenum_openUCharStringsEnumeration(const UChar* const strings[], int32_t count,
                                         ^~~~~
                                         UChar32
In file included from /usr/include/libxml2/libxml/encoding.h:31:0,
                 from /usr/include/libxml2/libxml/parser.h:810,
                 from /home/rffontenelle/builds/cegui/src/cegui/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp:34:
/usr/include/unicode/ucnv.h:226:27: error: UChar does not name a type; did you mean UChar32?
                     const UChar* codeUnits,
                           ^~~~~
                           UChar32
/usr/include/unicode/ucnv.h:397:18: error: UChar does not name a type; did you mean UChar32?
 ucnv_openU(const UChar *name,
                  ^~~~~
                  UChar32
/usr/include/unicode/ucnv.h:669:27: error: UChar does not name a type; did you mean UChar32?
                     const UChar *s,
                           ^~~~~
                           UChar32
/usr/include/unicode/ucnv.h:707:23: error: UChar has not been declared
                       UChar *errUChars,
                       ^~~~~
/usr/include/unicode/ucnv.h:846:21: error: UChar has not been declared
                     UChar *displayName,
                     ^~~~~
/usr/include/unicode/ucnv.h:1147:25: error: UChar does not name a type; did you mean UChar32?
                   const UChar ** source,
                         ^~~~~
                         UChar32
/usr/include/unicode/ucnv.h:1148:25: error: UChar does not name a type; did you mean UChar32?
                   const UChar * sourceLimit,
                         ^~~~~
                         UChar32
/usr/include/unicode/ucnv.h:1214:16: error: UChar has not been declared
                UChar **target,
                ^~~~~
/usr/include/unicode/ucnv.h:1215:22: error: UChar does not name a type; did you mean UChar32?
                const UChar *targetLimit,
                      ^~~~~
                      UChar32
/usr/include/unicode/ucnv.h:1252:23: error: UChar does not name a type; did you mean UChar32?
                 const UChar *src, int32_t srcLength,
                       ^~~~~
                       UChar32
/usr/include/unicode/ucnv.h:1283:15: error: UChar has not been declared
               UChar *dest, int32_t destCapacity,
               ^~~~~
/usr/include/unicode/ucnv.h:1505:16: error: UChar has not been declared
                UChar *pivotStart, UChar **pivotSource,
                ^~~~~
/usr/include/unicode/ucnv.h:1505:35: error: UChar has not been declared
                UChar *pivotStart, UChar **pivotSource,
                                   ^~~~~
/usr/include/unicode/ucnv.h:1506:16: error: UChar has not been declared
                UChar **pivotTarget, const UChar *pivotLimit,
                ^~~~~
/usr/include/unicode/ucnv.h:1506:43: error: UChar does not name a type; did you mean UChar32?
                UChar **pivotTarget, const UChar *pivotLimit,
                                           ^~~~~
                                           UChar32
/usr/include/unicode/ucnv.h:1916:46: error: UChar has not been declared
 ucnv_fixFileSeparator(const UConverter *cnv, UChar *source, int32_t sourceLen);
                                              ^~~~~
make[2]: *** [cegui/src/XMLParserModules/Libxml2/CMakeFiles/CEGUILibXMLParser.dir/build.make:63: cegui/src/XMLParserModules/Libxml2/CMakeFiles/CEGUILibXMLParser.dir/XMLParser.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:441: cegui/src/XMLParserModules/Libxml2/CMakeFiles/CEGUILibXMLParser.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

Reproducibility: always

Steps to Reproduce: Build the cegui AUR package (see its build script)

Comments (4)

  1. Rafael Fontenelle reporter

    That's a good news. Since I don't use pacaur, I'm not able to try this way. I also tried exporting these variable-values pairs inside the PKGBUILD, but it introduced some new warnings and ended with error.

    Do you know how I could add it to the PKGBUILD, so cmake understand this?

  2. Log in to comment