Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7045: Thread library does not automatically compile date_time
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-08-19 17:18:56
#7045: Thread library does not automatically compile date_time
-------------------------------+--------------------------------------------
Reporter: anonymous | Owner: viboes
Type: Bugs | Status: reopened
Milestone: To Be Determined | Component: thread
Version: Boost 1.50.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+--------------------------------------------
Comment (by anonymous):
Let me clarify the two remaining topics of this ticket:
1. Whenever the "thread" lib is requested to compile, e.g.
{{{
bjam toolset=msvc-10.0 --build-type=complete --with-thread --with-
date_time --stagedir=.\stage
}}}
always "date_time" should be selected, too. It's quite possible that the
"date_time" dependency is in fact an error, for example in GCC "thread"
does *not* require "date_time" for successful linkage.
In this case there are two options: I) The pragmatic: just compile
"date_time" whenever "thread" is requested when compiling for Visual
Studio or II) ideal: find out why "thread" depends on "date_time" on
visual studio (but not on GCC) and remove this dependency if possible.
The priority is "nice to have". I lost quite some time having to re-
compile boost after finding the "date_time" lib missing on VC, so this
improvement could save other user's time as well.
2. Only on Windows, Visual Studio: The auto-linker does not look for the
"chrono" libs, although they are in the linker search path in the example
of comment 23.
----
Regarding 1:
{{{
Boost.Thread include a DateTime? file that even if it is header only
}}}
I see "#include <boost/date_time/posix_time/conversion.hpp>" at the
beginning of file "boost\libs\thread\src\win32\thread.cpp". This is most
likely where the thread->datetime dependency is coming from. It should be
checked if this is really needed and removed if possible.
----
Regarding 2:
Also in "boost\libs\thread\src\win32\thread.cpp", line 334:
{{{
bool thread::try_join_until(const chrono::time_point<chrono::system_clock,
chrono::nanoseconds>& tp)
}}}
=> thread lib should add chrono to it's auto-linker. "chrono::time_point"
is exactly the symbol the linker is missing in "comment 23"
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7045#comment:34> 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:10 UTC