Subject: [Boost-bugs] [Boost C++ Libraries] #6494: Using BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG flag ruins date_time library under MinGW
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-01-30 05:31:28
#6494: Using BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG flag ruins date_time library
under MinGW
-------------------------------------------------------------------+--------
Reporter: death.iron.bug@⦠| Owner: az_sw_dude
Type: Bugs | Status: new
Milestone: To Be Determined | Component: date_time
Version: Boost 1.49.0 | Severity: Problem
Keywords: BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG date_time MinGW |
-------------------------------------------------------------------+--------
I've built static boost libraries under windows (Win7 64) with MinGW 3.20
(32 bit, GCC 4.6.1) with '''BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG'''
option and threading=multi link=static runtime-link=static address-
model=32
Simple test like
{{{
#include <iostream>
#include <boost/thread/thread.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
using namespace std;
using namespace boost;
void func()
{
this_thread::sleep(boost::posix_time::milliseconds(5000));
}
int main()
{
thread trd(func);
trd.join();
cout << "wait ok" << endl;
return 0;
}
}}}
When built statically with '''date_time''' and '''thread''' libraries.
It fails with segfault in date_time library. That happens in ctor of
structure simple_time_rep, but I didn't dig too much. I guess the problem
is in date_time library.
Without flag '''BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG''' it's going all
right with timings and threads.
I also tried flags BOOST_HAS_WINTHREADS and _REENTRANT(for MinGW) - that
does not affect the case. BOOST_THREAD_USE_LIB was defined (to let it work
with static libs).
I've tested this for boost '''1.48.0''' and '''1.49.0-beta1'''. Neither
did work.
I asked about this problem in boost mailing lists but got no answer, so I
post it as a possible bug.
Sincerely, Yana A. Kireyonok
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6494> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:08 UTC