whwh
whwh

Reputation: 1

Why is Boost.log record_ostream.hpp failing (m_record != null) assertion in get_record()?

This is thrown when I try to run the binary. CMake and ninja builds just fine.

Exact error message:

Assertion failed: (m_record != __null), function get_record, file /usr/local/include/boost/log/sources/record_ostream.hpp, line 161.

Line causing the error:

BOOST_LOG_TRIVIAL(info) << "Started TCP server";

Current environment:

It is working fine on linux environment:

Using this combination of g++ and boost versions as there is some bug on Debian 12 where you can't compile Boost 1.74 with g++-12.

Update:

When I write a simple program,

#include <boost/log/trivial.hpp>

int main()
{
    BOOST_LOG_TRIVIAL(info) << "hello";
}

it throws

terminate called after throwing an instance of 'std::bad_cast'
  what():  std::bad_cast

Upvotes: 0

Views: 28

Answers (0)

Related Questions