I use RHEL/Centos 8 to compile app/lib for RHEL/Centos 7.
Centos 7's stdlibc++ has maximum (old ABI):
- CXXABI_1.3.7
- GLIBCXX_3.4.19
I use CMake with -DCMAKE_CXX_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=0
to compile my libraries and my applications for the old ABI to be run on Centos 7.
Nevertheless, the application still requires upper versions: CXXABI_1.3.9
and GLIBCXX_3.4.21
.
- Why? How can I compile for the old ABI?
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 8.4.1 20200928 (Red Hat 8.4.1-1) (GCC)