IBM's XL compiler can't build c++11 with xlC_r

Description

The XL compiler's standard front-end xlC doesn't support enough c++11 features to build ICU anymore.
Support for c+11 and c14 is in the "clang" front end, so switching to 'xlclang' and 'xlclang+' should work.

Currently with XL C/C++ 16.1.0 on AIX 7.1
```
(python-env-ordos7) robb@ordos7:/raid/proj/procyon/checkouts-procyon/robb/icu-build$ /home/robb/OpenSource/icu/icu4c/source/runConfigureICU AIX
which: 0652-141 There is no xlc_r in /raid/proj/procyon/checkouts-procyon/robb/apdfl-18box/python-env-ordos7/bin /usr/bin /etc /usr/sbin /usr/ucb /usr/bin/X11 /sbin /usr/java5/jre/bin /usr/java5/bin /opt/git-2.11/bin /opt/cmake-3.18/bin /opt/cmake-3.17/bin /home/robb/tools/bin /opt/Python-3.8/bin /opt/valgrind/bin /opt/langtools/bin usr/local/bin /opt/IBM/xlC/13.1.3/bin /usr/java6/bin /bin /usr/bin /usr/lpp/X11/bin /opt/freeware/bin /usr/ccs/bin /bin /usr/bin/X11 /usr/openwin/bin /opt/csw/bin /sbin /usr/sbin /opt/developerstudio12.6/bin /home/robb/bin.
which: 0652-141 There is no xlC_r in /raid/proj/procyon/checkouts-procyon/robb/apdfl-18box/python-env-ordos7/bin /usr/bin /etc /usr/sbin /usr/ucb /usr/bin/X11 /sbin /usr/java5/jre/bin /usr/java5/bin /opt/git-2.11/bin /opt/cmake-3.18/bin /opt/cmake-3.17/bin /home/robb/tools/bin /opt/Python-3.8/bin /opt/valgrind/bin /opt/langtools/bin usr/local/bin /opt/IBM/xlC/13.1.3/bin /usr/java6/bin /bin /usr/bin /usr/lpp/X11/bin /opt/freeware/bin /usr/ccs/bin /bin /usr/bin/X11 /usr/openwin/bin /opt/csw/bin /sbin /usr/sbin /opt/developerstudio12.6/bin /home/robb/bin.
export CPP= CC= CXX= CPPFLAGS= CFLAGS=-O2 -qmaxmem=-1 CXXFLAGS=-O2 -qmaxmem=-1 LDFLAGS= MAKE=
Running ./configure for AIX using xlC_r compiler

checking for ICU version numbers... release 68.1, library 68.1, unicode version 13.0
checking build system type... powerpc-ibm-aix7.1.4.0
checking host system type... powerpc-ibm-aix7.1.4.0
checking whether to build debug libraries... no
checking whether to build release libraries... yes
checking for clang... clang
checking whether the C compiler works... no
configure: error: in `/raid/proj/procyon/checkouts-procyon/robb/icu-build':
configure: error: C compiler cannot create executables
See `config.log' for more details
/home/robb/OpenSource/icu/icu4c/source/runConfigureICU: ./configure failed
(python-env-ordos7) robb@ordos7:/raid/proj/procyon/checkouts-procyon/robb/icu-build$ which xlclang
which: 0652-141 There is no xlclang in /raid/proj/procyon/checkouts-procyon/robb/apdfl-18box/python-env-ordos7/bin /usr/bin /etc /usr/sbin /usr/ucb /usr/bin/X11 /sbin /usr/java5/jre/bin /usr/java5/bin /opt/git-2.11/bin /opt/cmake-3.18/bin /opt/cmake-3.17/bin /home/robb/tools/bin /opt/Python-3.8/bin /opt/valgrind/bin /opt/langtools/bin usr/local/bin /opt/IBM/xlC/13.1.3/bin /usr/java6/bin /bin /usr/bin /usr/lpp/X11/bin /opt/freeware/bin /usr/ccs/bin /bin /usr/bin/X11 /usr/openwin/bin /opt/csw/bin /sbin /usr/sbin /opt/developerstudio12.6/bin /home/robb/bin.
(python-env-ordos7) robb@ordos7:/raid/proj/procyon/checkouts-procyon/robb/icu-build$ export PATH=/opt/IBM/xlC/16.1.0/bin:$PATH
(python-env-ordos7) robb@ordos7:/raid/proj/procyon/checkouts-procyon/robb/icu-build$ rm config.log
(python-env-ordos7) robb@ordos7:/raid/proj/procyon/checkouts-procyon/robb/icu-build$ /home/robb/OpenSource/icu/icu4c/source/runConfigureICU AIX
export CPP= CC=/opt/IBM/xlC/16.1.0/bin/xlc_r CXX=/opt/IBM/xlC/16.1.0/bin/xlC_r CPPFLAGS= CFLAGS=-O2 -qmaxmem=-1 CXXFLAGS=-O2 -qmaxmem=-1 LDFLAGS= MAKE=
Running ./configure for AIX using xlC_r compiler

checking for ICU version numbers... release 68.1, library 68.1, unicode version 13.0
checking build system type... powerpc-ibm-aix7.1.4.0
checking host system type... powerpc-ibm-aix7.1.4.0
checking whether to build debug libraries... no
checking whether to build release libraries... yes
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... no
checking whether /opt/IBM/xlC/16.1.0/bin/xlc_r accepts -g... yes
checking for /opt/IBM/xlC/16.1.0/bin/xlc_r option to accept ISO C89... none needed
checking whether we are using the GNU C++ compiler... no
checking whether /opt/IBM/xlC/16.1.0/bin/xlC_r accepts -g... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.20... yes
checking for ICULEHB... no
checking how to run the C preprocessor... /opt/IBM/xlC/16.1.0/bin/xlc_r -E
checking for a BSD-compatible install... /home/robb/OpenSource/icu/icu4c/source/install-sh -c
checking for python3... python3
checking for gmake... /opt/freeware/bin/gmake
checking for doxygen... no
checking checking for executable suffix...
checking whether strict compiling is on... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking size of void *... 4
checking whether runnable 64 bit binaries are built by default... no
checking which Makefile fragment to use for powerpc-ibm-aix7.1.4.0... mh-aix-va
checking for floor in -lm... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking whether to enable auto cleanup of libraries... no
checking whether to enable draft APIs... yes
checking for ranlib... ranlib
checking for a sed that does not truncate output... /opt/freeware/bin/sed
checking for ar... ar
checking whether to enable renaming of symbols... yes
checking whether to enable function and data tracing... no
checking elf.h usability... no
checking elf.h presence... no
checking for elf.h... no
checking whether to enable dynamic loading of plugins. Ignored if plugins disabled.... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for library containing dlopen... none required
checking for dlopen... yes
checking for gettimeofday... yes
checking if we have a C++ compiler... Good
checking for pthread_attr_init in -lpthread... yes
checking for mmap... yes
checking for genccode assembly...
checking for inttypes.h... (cached) yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking whether byte ordering is bigendian... yes
checking for nl_langinfo... yes
checking for nl_langinfo's argument to obtain the codeset... CODESET
checking for namespace support... yes
checking for properly overriding new and delete... yes
checking for placement new and delete... yes
checking for popen... yes
checking for tzset... yes
checking for tzname... yes
checking for timezone... yes
checking for strtod_l... no
checking for std::string_view... no
checking for int8_t... yes
checking for uint8_t... yes
checking for int16_t... yes
checking for uint16_t... yes
checking for int32_t... yes
checking for uint32_t... yes
checking for int64_t... yes
checking for uint64_t... yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking for library containing wcscpy... none required
checking size of wchar_t... 2
checking for UTF-16 string literal support... unknown
checking for a library suffix to use... none
CPPFLAGS= $(THREADSCPPFLAGS) -DU_HAVE_STRTOD_L=0
CFLAGS=-O2 -qmaxmem=-1 $(THREADSCFLAGS)
CXXFLAGS=-O2 -qmaxmem=-1 $(THREADSCXXFLAGS)
configure: creating ./config.status
config.status: creating icudefs.mk
config.status: creating Makefile
config.status: creating data/pkgdataMakefile
config.status: creating config/Makefile.inc
config.status: creating config/icu.pc
config.status: creating config/pkgdataMakefile
config.status: creating data/Makefile
config.status: creating stubdata/Makefile
config.status: creating common/Makefile
config.status: creating i18n/Makefile
config.status: creating layoutex/Makefile
config.status: creating io/Makefile
config.status: creating extra/Makefile
config.status: creating extra/uconv/Makefile
config.status: creating extra/uconv/pkgdataMakefile
config.status: creating extra/scrptrun/Makefile
config.status: creating tools/Makefile
config.status: creating tools/ctestfw/Makefile
config.status: creating tools/toolutil/Makefile
config.status: creating tools/makeconv/Makefile
config.status: creating tools/genrb/Makefile
config.status: creating tools/genccode/Makefile
config.status: creating tools/gencmn/Makefile
config.status: creating tools/gencnval/Makefile
config.status: creating tools/gendict/Makefile
config.status: creating tools/gentest/Makefile
config.status: creating tools/gennorm2/Makefile
config.status: creating tools/genbrk/Makefile
config.status: creating tools/gensprep/Makefile
config.status: creating tools/icuinfo/Makefile
config.status: creating tools/icupkg/Makefile
config.status: creating tools/icuswap/Makefile
config.status: creating tools/pkgdata/Makefile
config.status: creating tools/tzcode/Makefile
config.status: creating tools/gencfu/Makefile
config.status: creating tools/escapesrc/Makefile
config.status: creating test/Makefile
config.status: creating test/compat/Makefile
config.status: creating test/testdata/Makefile
config.status: creating test/testdata/pkgdataMakefile
config.status: creating test/hdrtst/Makefile
config.status: creating test/intltest/Makefile
config.status: creating test/cintltst/Makefile
config.status: creating test/iotest/Makefile
config.status: creating test/letest/Makefile
config.status: creating test/perf/Makefile
config.status: creating test/perf/collationperf/Makefile
config.status: creating test/perf/collperf/Makefile
config.status: creating test/perf/collperf2/Makefile
config.status: creating test/perf/dicttrieperf/Makefile
config.status: creating test/perf/ubrkperf/Makefile
config.status: creating test/perf/charperf/Makefile
config.status: creating test/perf/convperf/Makefile
config.status: creating test/perf/localecanperf/Makefile
config.status: creating test/perf/normperf/Makefile
config.status: creating test/perf/DateFmtPerf/Makefile
config.status: creating test/perf/howExpensiveIs/Makefile
config.status: creating test/perf/strsrchperf/Makefile
config.status: creating test/perf/unisetperf/Makefile
config.status: creating test/perf/usetperf/Makefile
config.status: creating test/perf/ustrperf/Makefile
config.status: creating test/perf/utfperf/Makefile
config.status: creating test/perf/utrie2perf/Makefile
config.status: creating test/perf/leperf/Makefile
config.status: creating test/fuzzer/Makefile
config.status: creating samples/Makefile
config.status: creating samples/date/Makefile
config.status: creating samples/cal/Makefile
config.status: creating samples/layout/Makefile
Spawning Python to generate data/rules.mk...
Spawning Python to generate test/testdata/rules.mk...

ICU for C/C++ 68.1 is ready to be built.
=== Important Notes: ===
Data Packaging: library
This means: ICU data will be linked with ICU. A shared data library will be built.
To locate data: ICU will use the linked data library. If linked with the stub library located in stubdata/, the application can use udata_setCommonData() or set a data path to override.
Building ICU: Use a GNU make such as /opt/freeware/bin/gmake to build ICU.
checking the version of "/opt/freeware/bin/gmake"... 4.3 (we wanted at least 3.80)
ok

If the result of the above commands looks okay to you, go to the directory
source in the ICU distribution to build ICU. Please remember that ICU needs
GNU make to build properly...
(python-env-ordos7) robb@ordos7:/raid/proj/procyon/checkouts-procyon/robb/icu-build$ gmake
rebuilding config/icucross.mk
rebuilding config/icucross.inc
cd ./config; \
gmake -f pkgdataMakefile
gmake[1]: Entering directory '/raid/proj/procyon/checkouts-procyon/robb/icu-build/config'
rm -rf pkgdata.inc
gmake[1]: Leaving directory '/raid/proj/procyon/checkouts-procyon/robb/icu-build/config'
rm -rf config/icu-config
/home/robb/OpenSource/icu/icu4c/source/install-sh -c /home/robb/OpenSource/icu/icu4c/source/config/icu-config-top config/icu-config
chmod u+w config/icu-config
LC_ALL=C /opt/freeware/bin/sed -f /home/robb/OpenSource/icu/icu4c/source/config/make2sh.sed < ./config/Makefile.inc | grep -v '#M#' | uniq >> config/icu-config
LC_ALL=C /opt/freeware/bin/sed -f /home/robb/OpenSource/icu/icu4c/source/config/make2sh.sed < /home/robb/OpenSource/icu/icu4c/source/config/mh-aix-va | grep -v '#M#' | uniq >> config/icu-config
cat /home/robb/OpenSource/icu/icu4c/source/config/icu-config-bottom >> config/icu-config
chmod u-w config/icu-config
config/icu-uc.pc updated.
config/icu-i18n.pc updated.
config/icu-io.pc updated.
/bin/sh /home/robb/OpenSource/icu/icu4c/source/mkinstalldirs lib
mkdir lib
/bin/sh /home/robb/OpenSource/icu/icu4c/source/mkinstalldirs bin
mkdir bin
building tools/escapesrc (Needed for this platform with NEED_ESCAPING)
gmake[1]: Entering directory '/raid/proj/procyon/checkouts-procyon/robb/icu-build/tools/escapesrc'
generating dependency information for /home/robb/OpenSource/icu/icu4c/source/tools/escapesrc/escapesrc.cpp
gmake[1]: Warning: File 'escapesrc.d' has modification time 1.4 s in the future
/opt/IBM/xlC/16.1.0/bin/xlC_r -DU_HAVE_STRTOD_L=0 -I/home/robb/OpenSource/icu/icu4c/source/common -I/home/robb/OpenSource/icu/icu4c/source/tools/escapesrc/../toolutil -DU_ATTRIBUTE_DEPRECATED= -O2 -qmaxmem=-1 -qproto -qroconst -qrtti -qlanglvl=extended0x -c -o escapesrc.o /home/robb/OpenSource/icu/icu4c/source/tools/escapesrc/escapesrc.cpp
rm -f ../../bin/escapesrc ; /opt/IBM/xlC/16.1.0/bin/xlC_r -O2 -qmaxmem=-1 -qproto -qroconst -qrtti -qlanglvl=extended0x -o ../../bin/escapesrc escapesrc.o -lpthread -lm
gmake[1]: warning: Clock skew detected. Your build may be incomplete.
gmake[1]: Leaving directory '/raid/proj/procyon/checkouts-procyon/robb/icu-build/tools/escapesrc'
gmake[0]: Making `all' in `stubdata'
gmake[1]: Entering directory '/raid/proj/procyon/checkouts-procyon/robb/icu-build/stubdata'
generating dependency information for /home/robb/OpenSource/icu/icu4c/source/stubdata/stubdata.cpp
gmake[1]: Warning: File 'stubdata.d' has modification time 1.4 s in the future
escapesrc: /home/robb/OpenSource/icu/icu4c/source/stubdata/stubdata.cpp -> _stubdata.cpp
/opt/IBM/xlC/16.1.0/bin/xlC_r -DU_HAVE_STRTOD_L=0 -I/home/robb/OpenSource/icu/icu4c/source/common -DU_ATTRIBUTE_DEPRECATED= -O2 -qmaxmem=-1 -qproto -qroconst -qrtti -qlanglvl=extended0x -c -o stubdata.o _stubdata.cpp
"/home/robb/OpenSource/icu/icu4c/source/common/unicode/localpointer.h", line 224.41: 1540-0063 (S) The text "noexcept" is unexpected.
"/home/robb/OpenSource/icu/icu4c/source/common/unicode/localpointer.h", line 399.37: 1540-0063 (S) The text "noexcept" is unexpected.
"/home/robb/OpenSource/icu/icu4c/source/common/unicode/udata.h", line 434.1: 1540-0063 (S) The text "noexcept" is unexpected.
gmake[1]: *** /home/robb/OpenSource/icu/icu4c/source/config/mh-aix-va:137: stubdata.o Error 1
rm _stubdata.cpp
gmake[1]: Leaving directory '/raid/proj/procyon/checkouts-procyon/robb/icu-build/stubdata'
gmake: *** [Makefile:152: all-recursive] Error 2
```

Activity

Show:
Yoshito Umaoka
December 9, 2020, 6:57 PM

Now AIX uses xlc with clang.

Fixed
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Yoshito Umaoka

Reporter

Robert Boehne

Components

Priority

major

Fix versions