Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-05-26 15:53:50


Rene Rivera wrote:
> Patrik Jonsson wrote:
>> Rene Rivera wrote:
>>
>>> Well that's a single threaded library, it would have
>>> "threading-multi" in the path if it was multi threaded.
>>>
>>>> ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_unlock
>>>> ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_lock
>>>> ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_init
>>>> ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_destroy
>>>
>>>
>>>
>>> It's likely that something other than Boost requires pthread. Could
>>> you find out what that is? It could be libstdc++, or something
>>> else..
>> It seems to be that boost/greg_month.hpp includes
>> boost/shared_ptr.hpp, which uses boost/detail/shared_count.hpp which
>> uses /boost/detail/lightweight_mutex.hpp. The pthread symbols are in
>> greg_month.o, so it looks like that library won't work without
>> threads or else something's supposed to turn threads off but isn't
>> working...
>
> Hmm... The only fix for this I can come up with is to add
> "<define>BOOST_LWM_USE_SPINLOCK", or probably more safely add
> "<linkflags>-pthread" to the BUILD.

No, it needs BOOST_DISABLE_THREADS; apparently BOOST_HAS_PTHREADS and
BOOST_HAS_THREADS are still being defined, even in a "single threaded"
build.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net