I have a stripped down simple program with a static variable (\'abc.cpp\'):
#include
int main(int, char**)
{
static const std::string a(\
The libstdc++6
package you have installed is not even in Ubuntu!
ii libstdc++6:amd64 5-20150329-1ubuntu11 amd64 GNU Standard C++ Library v3
From packages.ubuntu.com:
trusty (14.04LTS) (libs): GNU Standard C++ Library v3
4.8.2-19ubuntu1: amd64 i386
utopic (libs): GNU Standard C++ Library v3
4.9.1-16ubuntu6: amd64 i386
vivid (libs): GNU Standard C++ Library v3
4.9.2-10ubuntu13: amd64 i386
I would recommend checking your /etc/apt/sources.list
and removing the line that caused installation of the package. I think it may be ppa:ubuntu-toolchain-r/test, a PPA for "Toolchain test builds"...
Then you can try to downgrade your libstdc++6
package to get back to a sane version (appropriate for the Ubuntu version you have installed). While you are at it, you should carefully check if other packages are affected as well. You don't want to run your system on test-builds of your core libraries.
By the way, that also explains why gdb
did not find the debug symbols, they were for another version of the library.