#3858 closed discussion (fixed)
G++ Application Binary Interface (ABI)
Reported by: | Rüdiger Franke | Owned by: | Rüdiger Franke |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Cpp Run-time | Version: | |
Keywords: | Cc: |
Description (last modified by )
Gcc 5 introduced a new C++ ABI to conform with the 2011 standard, in particular for strings and lists. This causes linker errors when mixing the old and the new ABI.
6f37672/OMCompiler introduced the compiler flag
-D_GLIBCXX_USE_CXX11_ABI=0
to be able to already use gcc5 on systems that still were based on gcc4 and the old ABI.
Meanwhile gcc5 is becoming the standard compiler and recent binary distributions of boost 1.58 finally require the new ABI. f0613dd/OMCompiler accounts for this.
The change works on systems with the old ABI and on systems with the new ABI, provided the default system compiler is used for the Cpp runtime.
Linker errors can generally be avoided when using the same compiler for boost and for the Cpp runtime.
Change History (6)
comment:1 by , 9 years ago
Description: | modified (diff) |
---|
comment:2 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
follow-up: 5 comment:4 by , 9 years ago
An alternative would be to use -static-libstdc++ -static-libgcc
, I suppose.
comment:5 by , 9 years ago
Replying to sjoelund.se:
An alternative would be to use
-static-libstdc++ -static-libgcc
, I suppose.
We do link C++ FMUs with these static libs already, in order to minimize dependencies in the target system. Nevertheless the i686-w64-mingw32 target requires the old ABI under Xenial -- somehow Canonical forgot to recompile these packages when upgrading to gcc 5.3.
ade6473/OMCompiler re-introduces the use of the old ABI for FMI export. This is possible because FMUs don't link against boost libs. It is needed as libstdc++ of cross compilation targets might not be upgraded to the new ABI yet.
Consider Debian 8 Jessie as example:
Consider Ubuntu 16.04 Xenial LTS as example: