Trying compile any program using boost::serialization
text or binary archive with string or file stream I have segmentation fault error. Even for the simple code like:
#include <boost/archive/binary_oarchive.hpp>
#include <boost/archive/binary_iarchive.hpp>
#include <sstream>
int main()
{
std::stringstream ss;
{
try
{
boost::archive::binary_oarchive oa(ss);
}
catch(...) {}
}
}
Error:
received signal SIGSEGV, Segmentation fault.
In ?? () ()
#1 0x00007ffff79ad770 in sputn (__n=8, __s=0x7fffffffd990 "\026", this=<optimized out>) at /usr/include/c++/4.8/streambuf:451
/usr/include/c++/4.8/streambuf:451:15915:beg:0x7ffff79ad770
At /usr/include/c++/4.8/streambuf:451
#1 0x00007ffff79ad770 in sputn (__n=8, __s=0x7fffffffd990 "\026", this=<optimized out>) at /usr/include/c++/4.8/streambuf:451
/usr/include/c++/4.8/streambuf:451:15915:beg:0x7ffff79ad770
Boost 1.59 installed on Ubuntu trusty as
./bootstrap.sh -prefix=/usr
sudo ./b2 install
Why it can be so?