I have gcc 8.3.0-6 installed on both an AIX 7.1 and AIX 7.2 system. On the AIX 7.1 system everything compiles fine. On the AIX 7.2 system, most things compile, but if a program is including <math.h> then I get compile errors like this:
$ gmakeg++ -o obj/adf_extract.o -fPIC -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -Isrc -I. -MMD -I ~db2dev/sqllib/include -O2 -funsigned-char -maix64 -c src/adf_extract.cppIn file included from /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8/include/c++/math.h:36,from src/InsertText.h:20,from src/MpUpdateRequests.h:10,from src/MergeElement.h:13,from src/MergeControl.h:12,from src/adf_extract.cpp:6:/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8/include/c++/cmath:83:11: error: '::acos' has not been declaredusing ::acos;^~~~/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8/include/c++/cmath:102:11: error: '::asin' has not been declaredusing ::asin;^~~~/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8/include/c++/cmath:121:11: error: '::atan' has not been declaredusing ::atan;^~~~and on and on.
I compared the files /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8/include/c++/cmath and /opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8/include/c++/cmath and they have the same checksum. Same for
/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8/include/c++/math.h.
I compared the environments and don't see anything different.
$ oslevel -s
7100-05-02-1810
$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/opt/freeware/libexec/gcc/powerpc-ibm-aix7.1.0.0/8/lto-wrapper
Target: powerpc-ibm-aix7.1.0.0
Configured with: ../gcc-8.3.0/configure --prefix=/opt/freeware --mandir=/opt/freeware/man --infodir=/opt/freeware/info --with-local-prefix=/opt/freeware --with-as=/usr/bin/as --with-ld=/usr/bin/ld --enable-languages=c,c++,fortran,go --enable-version-specific-runtime-libs --disable-nls --enable-decimal-float=dpd --disable-libstdcxx-pch --enable-__cxa_atexit --disable-werror --enable-libstdcxx-filesystem-ts --with-gcc-major-version-only --program-suffix=-8 --disable-rpath --host=powerpc-ibm-aix7.1.0.0
Thread model: aix
gcc version 8.3.0 (GCC)
$ oslevel -s
7200-05-03-2148
$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/opt/freeware/libexec/gcc/powerpc-ibm-aix7.2.0.0/8/lto-wrapper
Target: powerpc-ibm-aix7.2.0.0
Configured with: ../gcc-8.3.0/configure --prefix=/opt/freeware --mandir=/opt/freeware/man --infodir=/opt/freeware/info --with-local-prefix=/opt/freeware --with-as=/usr/bin/as --with-ld=/usr/bin/ld --enable-languages=c,c++,fortran,go --enable-version-specific-runtime-libs --disable-nls --enable-decimal-float=dpd --disable-libstdcxx-pch --enable-__cxa_atexit --disable-werror --enable-libstdcxx-filesystem-ts --with-gcc-major-version-only --program-suffix=-8 --disable-rpath --host=powerpc-ibm-aix7.2.0.0
Thread model: aix
gcc version 8.3.0 (GCC)
Thanks,------------------------------
Adam Swartz
------------------------------
#AIXOpenSource