Build system adds conflicting flags to CXXFLAGS. ... checking whether C++ compiler accepts -fsanitize=address... yes checking whether C++ compiler accepts -fsanitize=integer... no checking whether C++ compiler accepts -fsanitize=thread... yes checking whether C++ compiler accepts -fsanitize=memory... no checking whether C++ compiler accepts -fsanitize=alignment... no checking whether C++ compiler accepts -fsanitize=bool... no checking whether C++ compiler accepts -fsanitize=bounds... no checking whether C++ compiler accepts -fsanitize=enum... no checking whether C++ compiler accepts -fsanitize=float-cast-overflow... no checking whether C++ compiler accepts -fsanitize=float-divide-by-zero... no checking whether C++ compiler accepts -fsanitize=integer-divide-by-zero... no checking whether C++ compiler accepts -fsanitize=null... no checking whether C++ compiler accepts -fsanitize=object-size... no checking whether C++ compiler accepts -fsanitize=return... no checking whether C++ compiler accepts -fsanitize=shift... no checking whether C++ compiler accepts -fsanitize=signed-integer-overflow... no checking whether C++ compiler accepts -fsanitize=unreachable... no checking whether C++ compiler accepts -fsanitize=unsigned-integer-overflow... no checking whether C++ compiler accepts -fsanitize=vla-bound... no checking whether C++ compiler accepts -fsanitize=vptr... no ... CXXLD libtest/abort ... x86_64-pc-linux-gnu-g++: error: -fsanitize=address is incompatible with -fsanitize=thread make[1]: *** [libtest/abort] Error 1
There is a pacth file from Arch Linux, I have tested on my amd64 machine, and it fixed the bug, please check: https://projects.archlinux.org/svntogit/community.git/tree/trunk/gcc-4.8.patch?h=packages/libmemcached
patched 1.0.17-r1