title: g++-4.9 on Raspberry Pi 2: undefined reference to `boost::atomics::detail::lockpool::get_lock_for when linking
body: <p>I used</p>
  
  <blockquote>
    <p>sudo apt-get install libboost1.55-all</p>
  </blockquote>
  
  <p>to install the boost library on a Raspberry Pi 2. When I try to link the object files of my application, I get the following error:</p>
  
  <blockquote>
    <p>In function `scoped_lock':
    /usr/include/boost/atomic/detail/lockpool.hpp:36: undefined reference to  boost::atomics::detail::lockpool::get_lock_for(void const volatile*)'</p>
  </blockquote>
  
  <p>I read that this is a bug and that there are patches available:
  <a href="https://svn.boost.org/trac/boost/ticket/9041" rel="nofollow">https://svn.boost.org/trac/boost/ticket/9041</a></p>
  
  <p>However, I don't really know how to apply the patch (a step by step explanation would be helpful, i tried "patch p0 &lt; ...") and whether there is a more "elegant" solution.</p>