
Andreas Wehrmann wrote:
Boost is now using gcc atomics, but it assumes them to be available everywhere, which is not the case. Adding
define=BOOST_SP_DISABLE_THREADS
or
define=BOOST_SP_USE_PTHREADS
to build command should fix this error (at the price of either thread safety or performance)
I tried BOOST_SP_USE_PTHREADS and BOOST_SP_USE_SPINLOCK of which neither one works. I am not willing to pay the price for losing thread safety, which is why I haven't tried the other define.
Btw. I'm also using boost version 1.38 in another project (but on the same platform). My compiler is g++ version 4.2.0 20070318 (prerelease) (Sourcery G++ Lite 4.2-35). That's pretty old compiler, our current lite releases are 4.4-*. However, upgrading is not likely to fix your immediate issue.
- Volodya
I know, we upgraded to the 4.4 version once and had nothing but problems which is why we reverted to 4.2.
Thanks for your hints thus far, do you have any idea of why BOOST_SP_USE_PTHREADS doesn't work?
What is sgu_loopback_timer.o? If this is your file, it also should be compiled with that define. If you're using 1.38, it might have a bug whereby define=XXX is not respected on the command line. Hacking boost/smart_ptr/detail/sp_counted_base.hpp may be more reliable. I am not entirely sure whether hacking user.hpp will work or not. HTH, Volodya