/lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by ./libQt3Something.so.4)
-
After upgrading our Jenkins build slave from Debian 8 (using g++ 4.9.2) to Debian 9 (using g++ 6.3.0), our Qt 4.8.7 based application that previously worked fine on Red Hat Enterprise Linux 7.2 (RHEL7.2) now fails with the error
[treality@redhatvbox bin]$ ./MyApplication ./MyApplication: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by ./libQt3Support.so.4) ./MyApplication: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by ./libQt3Support.so.4) ./MyApplication: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by ./libQtSql.so.4) ./MyApplication: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by ./libQtXml.so.4) ./MyApplication: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by ./libQtOpenGL.so.4) ./MyApplication: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by ./libQtOpenGL.so.4) ./MyApplication: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by ./libQtGui.so.4) ./MyApplication: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by ./libQtGui.so.4) ./MyApplication: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by ./libQtNetwork.so.4) ./MyApplication: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by ./libQtNetwork.so.4) ./MyApplication: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by ./libQtCore.so.4) ./MyApplication: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by ./libQtCore.so.4)
Note that we are also building Qt 4.8.7 from source.
For as far as I understand it, this is because our application is now built on Debian 9 using version 6.3.0 of g++ and libstdc++, while RHEL7.2 has libstdc++ 4.8.5 installed:
$ yum info libstdc++ Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager Installed Packages Name : libstdc++ Arch : x86_64 Version : 4.8.5 Release : 4.el7 Size : 1.0 M Repo : installed From repo : anaconda Summary : GNU Standard C++ Library URL : http://gcc.gnu.org License : GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD Description : The libstdc++ package contains a rewritten standard compliant GCC Standard : C++ Library.
which has the following
CXXABI
versions:$ strings /lib64/libstdc++.so.6 | grep CXXABI CXXABI_1.3 CXXABI_1.3.1 CXXABI_1.3.2 CXXABI_1.3.3 CXXABI_1.3.4 CXXABI_1.3.5 CXXABI_1.3.6 CXXABI_1.3.7 CXXABI_TM_1
On Debian 8, we have similar versions for
CXXABI
in/usr/lib/x86_64-linux-gnu/libstdc++.so.6
(only one extraCXXABI_1.3.8
):$ strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep CXXABI CXXABI_1.3 CXXABI_1.3.1 CXXABI_1.3.2 CXXABI_1.3.3 CXXABI_1.3.4 CXXABI_1.3.5 CXXABI_1.3.6 CXXABI_1.3.7 CXXABI_1.3.8 CXXABI_TM_1
but on Debian 9, in
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
theCXXABI
apparently also requiresCXXABI_1.3.9
,CXXABI_1.3.10
andCXXABI_FLOAT128
:$ strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep CXXABI CXXABI_1.3 CXXABI_1.3.1 CXXABI_1.3.2 CXXABI_1.3.3 CXXABI_1.3.4 CXXABI_1.3.5 CXXABI_1.3.6 CXXABI_1.3.7 CXXABI_1.3.8 CXXABI_1.3.9 CXXABI_1.3.10 CXXABI_TM_1 CXXABI_FLOAT128
In the past, we were able to solve a similar problem by using the
-static-libstdc++
linker flag when linking our application withg++
. However, for as far as I can see, we currently are using that same linker flag again when linking together all .o files into our main application. The link command starts with:g++ -Wl,--rpath . -ldl -static-libstdc++ ... and other stuff ...
So I'm a bit in the dark why this doesn't work. Could the problem be that we are currently indeed linking in libstdc++ statically when we link together our application, but that that didn't happen when we compiled Qt 4.8.7 from source? Am I thinking in the right direction if I think that we also need to link in libstdc++ statically when compiling Qt 4.8.7 from source?
Main question is thus: what can we do so that our Qt 4.8.7 application that we currently build on Debian 9 also works on an older Red Hat Enterprise Linux 7.2 system?
-
@Bart_Vandewoestyne said in /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by ./libQt3Something.so.4):
what can we do so that our Qt 4.8.7 application that we currently build on Debian 9 also works on an older Red Hat Enterprise Linux 7.2 system?
Build it on Red Hat Enterprise Linux 7.2