Re: [Boost-bugs] [Boost C++ Libraries] #8810: Link error on some platforms: undefined reference to `boost::atomics::detail::lockpool::get_lock_for(void const volatile*)'

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8810: Link error on some platforms: undefined reference to `boost::atomics::detail::lockpool::get_lock_for(void const volatile*)'
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-08-23 08:36:53


#8810: Link error on some platforms: undefined reference to
`boost::atomics::detail::lockpool::get_lock_for(void const volatile*)'
-----------------------------------------+--------------------------
  Reporter: Gennady Proskurin <gpr@…> | Owner: viboes
      Type: Bugs | Status: assigned
 Milestone: To Be Determined | Component: thread
   Version: Boost 1.54.0 | Severity: Problem
Resolution: | Keywords: get_lock_for
-----------------------------------------+--------------------------

Comment (by Gennady Proskurin <gpr@…>):

 a couple of my thoughts about the subject:
 * the bug is about boost_thread library, not boost_atomic. The problem is
 that boost_thread library sometimes (on some platforms) requires linking
 with boost_atomic. This requirement is internal implementation detail of
 boost_thread library, so I as application developer should not bother
 about boost_atomic if I do not use it. If boost_thread requires
 boost_atomic, it should itself be linked with boost_atomic. Something like
 it does for "pgi" and "vacpp"
 {{{
     if <toolset>pgi in $(properties) || <toolset>vacpp in $(properties)
     {
       result += <library>/boost/atomic//boost_atomic ;
     }
 }}}
 * For my application, I can write test for it's build system, which tries
 to link empty program with boost_thread (as in description), but such a
 test for application I consider as a workaround for this bug, not a
 solution. Such test can be performed during boost_thread library building
 (incorporated in boost build system), but I'm not sure it is good solution
 for boost library.
 * As about boost_atomic library. I do not use it directly, I use
 std::atomic for atomics. But if somebody uses boost::atomic directly, he
 should be ready to link with boost_atomic. It is not very bad, it just
 means that boost::atomic library is not always header-only.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8810#comment:14>
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:13 UTC