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-22 22:13:42


#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 timblechmann):

 Replying to [comment:12 viboes]:
> > if the target platform is not supported natively by boost.atomic, it
 is using spinlocks, which are placed inside the shared library. in
 general, every user of boost.atomic should link with the library, no
 matter if cross-compiling or not.
>
> I believed that Boost.Atomic was header-only on most of the platforms. I
 don't want to force the user to link with boost_atomic when there is no
 need. Is there a macro that can be tested to know if Boost.Atomic is not
 header only?

 it really depends on the type ... e.g. i don't know if there is any
 platform with 256bit atomics.

 there are a few macros, check:
 http://www.boost.org/doc/libs/1_54_0/doc/html/atomic/interface.html#atomic.interface.feature_macros

 in general, one is better off with linking with boost.atomic (or with
 using std::atomic)

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