[Boost-bugs] [Boost C++ Libraries] #1810: HP-UX, PA-RISC, GCC 4.1+ sp_counted_base.hpp

Subject: [Boost-bugs] [Boost C++ Libraries] #1810: HP-UX, PA-RISC, GCC 4.1+ sp_counted_base.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-04-10 20:56:09


#1810: HP-UX, PA-RISC, GCC 4.1+ sp_counted_base.hpp
-------------------------+--------------------------------------------------
 Reporter: Yves Pausch | Type: Bugs
   Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.35.0
 Severity: Problem | Keywords:
-------------------------+--------------------------------------------------
 Hi,
 I can't link executables or shared libs 'cause of the following dependency
 produced by sp_counted_base.hpp and friends:[[BR]]

 {{{
 /usr/ccs/bin/ld: Unsatisfied symbols:
 __sync_fetch_and_add_4 (first referenced in ...) (code)
 __sync_val_compare_and_swap_4 (first referenced in ...) (code)
 }}}

 One can simply reproduce this behavior building this sample:

 {{{
 #include <boost/shared_ptr.hpp>

 int main()
 {
         boost::shared_ptr<int> spi ;
 }
 }}}

 I don't know if this is a general solution but for me it helps to patch
 the mentioned file:[[BR]]

 {{{
 ...
 #elif defined(__GNUC__) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 )

 # include <boost/detail/sp_counted_base_sync.hpp>
 ...
 }}}

 {{{
 ...
 #elif defined(__GNUC__) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 ) &&
 !defined(__hpux)

 # include <boost/detail/sp_counted_base_sync.hpp>
 ...
 }}}
 After that, the compiler passes BOOST_HAS_PTHREADS section and includes
 sp_counted_base_pt.hpp which works.[[BR]]

 Thanks for considering to solve this issue.[[BR]]

 Cheers, Yves.

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1810>
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:49:57 UTC