How to manage the GCC >= 5 ABI¶
In version 5.1, GCC released libstdc++, which introduced a
new library ABI that includes new implementations of
std::list. These changes were necessary to conform to the 2011 C++ standard which forbids Copy-On-Write strings
and requires lists to keep track of their size.
You can choose which ABI to use in your Conan packages by adjusting the
- libstdc++: Old ABI.
- libstdc++11: New ABI.
When Conan creates the default profile the first time it runs, it adjusts the
compiler.libcxx setting to
libstdc++ for backwards
compatibility. However, if you are using GCC >= 5 your compiler is likely to be using the new CXX11 ABI by default (libstdc++11).
This can be checked with the following command:
$ gcc -v 2>&1 | sed -n 's/.*\(--with-default-libstdcxx-abi=new\).*/\1/p' --with-default-libstdcxx-abi=new
If you want Conan to use the new ABI, edit the default profile at
or override this setting in the profile you are using.