The libstdc++ ABI break poses a challenge for mason (#155) as we see more use of gcc/libstdc++ >= 5.1.
This affects any library that exports a symbol that uses an ABI-tagged type -- e.g. a function returning std::string.
As I understand it, if mason wants to package libraries of this type, then the choices are:
- Require downstream consumers to compile everything with libstdc++ < 5.1, or with
-D_GLIBCXX_USE_CXX11_ABI=0. This is the status quo.
- Require downstream consumers to compile everything with libstdc++ >= 5.1 and
-D_GLIBCXX_USE_CXX11_ABI=1. This is the "force everyone to upgrade" option.
- Provide dual-ABI symbols in each library itself. This is the "provide backward compatibility by copying what libstdc++ itself does" option. It's probably infeasible due to the amount of work on 3rd party libraries that would be required.
- Start embedding the ABI setting in the mason platform slug (e.g.
linux-x86-cxx03abi vs linux-x86-cxx11abi). Build all libraries for both ABIs.
- Start embedding the ABI setting in the mason package slug (e.g.
gtest-1.7.0-cxx03abi vs gtest-1.7.0-cxx11abi). Build all libraries that export ABI-tagged symbols for both ABIs.
I currently favor the last option but would like to hear other opinions.
cc @springmeyer @tmpsantos
Dropping a link to https://llvm.org/bugs/show_bug.cgi?id=23529 here as well. I don't fully understand the implications there, but it sounds like we may be stuck using GLIBCXX_USE_CXX11_ABI=0 if compiling with clang.
The libstdc++ ABI break poses a challenge for mason (#155) as we see more use of gcc/libstdc++ >= 5.1.
This affects any library that exports a symbol that uses an ABI-tagged type -- e.g. a function returning
std::string.As I understand it, if mason wants to package libraries of this type, then the choices are:
-D_GLIBCXX_USE_CXX11_ABI=0. This is the status quo.-D_GLIBCXX_USE_CXX11_ABI=1. This is the "force everyone to upgrade" option.linux-x86-cxx03abivslinux-x86-cxx11abi). Build all libraries for both ABIs.gtest-1.7.0-cxx03abivsgtest-1.7.0-cxx11abi). Build all libraries that export ABI-tagged symbols for both ABIs.I currently favor the last option but would like to hear other opinions.
cc @springmeyer @tmpsantos
Dropping a link to https://llvm.org/bugs/show_bug.cgi?id=23529 here as well. I don't fully understand the implications there, but it sounds like we may be stuck using
GLIBCXX_USE_CXX11_ABI=0if compiling with clang.