[Boost-bugs] [Boost C++ Libraries] #7085: Boost pool library it not header only as claimed in documentation

Subject: [Boost-bugs] [Boost C++ Libraries] #7085: Boost pool library it not header only as claimed in documentation
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-07-05 12:21:20


#7085: Boost pool library it not header only as claimed in documentation
--------------------------------------------------+-------------------------
 Reporter: Roger Pawlowski <rppawlo@…> | Owner: cnewbold
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: pool
  Version: Boost 1.50.0 | Severity: Problem
 Keywords: pool header only |
--------------------------------------------------+-------------------------
 Hi,

 I have been trying to use the bool pool library out of the current release
 1.50.0. The documentation page claims the library is header only, but it
 pulls in the threads library which is not header only. You can reproduce
 this with the code:


 #include <boost/pool/pool_alloc.hpp>

 int main () {
   return 0;
 }

 I get the following error on gnu 4.3.5 compilers:

 Linking CXX executable Panzer_roger_junk.exe
 CMakeFiles/Panzer_roger_junk.dir/roger.cpp.o: In function
 `__static_initialization_and_destruction_0':
 /home/rppawlo/install_boost_1_50_0/include/boost/system/error_code.hpp:214:
 undefined reference to `boost::system::generic_category()'
 /home/rppawlo/install_boost_1_50_0/include/boost/system/error_code.hpp:215:
 undefined reference to `boost::system::generic_category()'
 /home/rppawlo/install_boost_1_50_0/include/boost/system/error_code.hpp:216:
 undefined reference to `boost::system::system_category()'
 collect2: ld returned 1 exit status

 The issue is that <boost/pool/pool_alloc.hpp> includes
 <boost/pool/poolfwd.hpp> which includes <boost/pool/detail/mutex.hpp>
 which includes <boost/thread/mutex.hpp> which includes
 <boost/thread/pthread/mutex.hpp> which includes
 <boost/thread/exceptions.hpp>

 The <boost/thread/exceptions.hpp> directly uses the boost system library
 which is not header only.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7085>
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