I had a similar issue that maybe I didn't resolve completely: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52015 I added a patch to gcc48: patch-libstdc++-v3_include_bits_basic__string.h Maybe there are more parts I missed.