[tlbuild] ICU build failures
Mojca Miklavec
mojca.miklavec.lists at gmail.com
Mon Jan 15 22:07:51 CET 2018
On 13 January 2018 at 21:29, Apostolos Syropoulos wrote:
> 2018-01-13 21:20 GMT+02:00 Richard Koch <koch at uoregon.edu>:
>>
>> Later it says "C++11 defines char16_t as bit-compatible with uint16_t, but
>> as a distinct type." Then it says "On macOS, char16_t is not available
>> because the uchar.h standard header is missing."
>
> This is exactly the problem:
>
> https://www.gnu.org/software/gnulib/manual/html_node/uchar_002eh.html
>
> As this page says:
>
> This header file is missing on all non-glibc platforms: glibc 2.15, Mac OS X
> 10.5, FreeBSD 6.4, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 7.1, HP-UX
> 11.31,
> IRIX 6.5, OSF/1 5.1, Solaris 11 2011-11, Cygwin, mingw, MSVC 9, Interix 3.5,
> BeOS.
>
> File ource/libs/icu/icu-src/source/common/unicode/umachine.h says
>
> * UChar is configurable by defining the macro UCHAR_TYPE
> * on the preprocessor or compiler command line:
> * -DUCHAR_TYPE=uint16_t or -DUCHAR_TYPE=wchar_t (if U_SIZEOF_WCHAR_T==2)
> etc.
> * (The UCHAR_TYPE can also be #defined earlier in this file, for outside
> the ICU library code.)
>
> By doing a "dirty hack" icu compiles just fine.
>
> CONFIG_SHELL=/bin/bash CC="gcc64 -D_XOPEN_SOURCE=600 -Dchar16_t=uint16_t
> -std=c99" CXX="g++64 -std=c++11" ./Build --host=x86_64-pc-solaris2.11 \
> --build=x86_64-pc-solaris2.11 -enable-luajittex --enable-mfluajit
> --enable-xindy CLISP=$clisp_builddir/clisp
>
> Tomorrow I will try to continue.
The problem is indeed that ICU is built without the -std=c++11. Some
newer compiler and Apple in particular simply apply that by default
somehow.
On the Solaris box that I use:
> g++ test.cpp -o test
test.cpp: In function 'int main()':
test.cpp:2:10: error: 'char16_t' does not name a type
typedef char16_t UChar;
^
> g++ -std=c++11 test.cpp -o test
> g++ --version
g++ (GCC) 5.5.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The proper fix for TL would be to always make sure that C++11 is set
explicitly whenever needed.
Mojca
More information about the tlbuild
mailing list