Re: [Boost-bugs] [Boost C++ Libraries] #9848: flyweight: hidden dependency on pthread

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9848: flyweight: hidden dependency on pthread
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-04-08 15:42:21


#9848: flyweight: hidden dependency on pthread
-------------------------------+-----------------------
  Reporter: akim@… | Owner: joaquin
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: flyweight
   Version: Boost 1.55.0 | Severity: Problem
Resolution: invalid | Keywords:
-------------------------------+-----------------------

Comment (by akim@…):

 Hi Joaquin,

 Thanks for the quick response.

 Actually, I already use no_locking in my project. Here is a small
 example:

 {{{
 [forge_at_prague tmp]$ cat foo.cc
 #include <boost/flyweight.hpp>
 #include <boost/flyweight/no_tracking.hpp>

 using string = boost::flyweight<std::string,
 boost::flyweights::no_tracking>;

 int main()
 {
   string h{"Hello, World!"};
 }
 [forge_at_prague tmp]$ clang++-3.4 -std=c++11 foo.cc
 /tmp/foo-856a4c.o:foo.cc:function
 boost::flyweights::detail::recursive_lightweight_mutex::recursive_lightweight_mutex():
 error: undefined reference to 'pthread_mutexattr_init'
 /tmp/foo-856a4c.o:foo.cc:function
 boost::flyweights::detail::recursive_lightweight_mutex::recursive_lightweight_mutex():
 error: undefined reference to 'pthread_mutexattr_settype'
 /tmp/foo-856a4c.o:foo.cc:function
 boost::flyweights::detail::recursive_lightweight_mutex::recursive_lightweight_mutex():
 error: undefined reference to 'pthread_mutexattr_destroy'
 clang: error: linker command failed with exit code 1 (use -v to see
 invocation)
 }}}

 Sure, it works with BOOST_DISABLE_THREADS, but then again, I have seen
 nothing about this in the documentation. A section on the dependencies
 would be helpful imho.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9848#comment:3>
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:16 UTC