[tlbuild] ICU build failures

Mojca Miklavec mojca.miklavec.lists at gmail.com
Mon Jan 15 22:24:26 CET 2018


On 15 January 2018 at 22:07, Mojca Miklavec wrote:
>
> 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

Well ... this could explain why (source/libs/icu/icu-src/source/configure.ac):

        OLD_CXXFLAGS="${CXXFLAGS}"
        CXXFLAGS="$CXXFLAGS -std=c++11"
        AC_MSG_CHECKING([[if we have a C++11 compiler]])
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[cxx11_okay=yes],[cxx11_okay=no])
        AC_MSG_RESULT($cxx11_okay)
        if [[ $cxx11_okay = yes ]]; then
            AC_MSG_NOTICE([Adding CXXFLAGS option -std=c++11])
            UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} -std=c++11"
        else
            CXXFLAGS="$OLD_CXXFLAGS"
        fi
        case "${host}" in
        *-*-solaris*)
            CXXFLAGS="$OLD_CXXFLAGS"
            ;;
        esac

I don't quite understand *why* on earth that code is there though. It
removes the -std=c++11 flag **just on Solaris**.

Mojca


More information about the tlbuild mailing list