
Bryce,
Which gcc version? __sync_fetch_and_add_4 is a gcc intrinsic, and it's never called directly by Boost code (__sync_fetch_and_add is call, gcc expands that to a macro which selects the right version of __sync_fetch_and_add to invoke).
interesting. I'm using gcc 4.4.4, that comes with Ubuntu 10.10
This sounds like a problem with your toolchain, not with Boost. You might be neglecting a flag to gcc to properly target 32bit.
this is what -m32 does. in fact, boost is compiled for 32 bit using the following flags: -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -march=i386 -pthread -m32 -DBOOST_SP_USE_PTHREADS -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_USE_LIB=1 -DNDEBUG from which -march=i686 and -m32 are the main points here. I tried to compile the sample code using the exact same flags, but to no avail. sample code that does not refer to libboost_regex compiles & links fine.
I could be mistaken about this - the only place in boost that __sync_fetch_and_add is called is in smart_ptr and interprocess, so I'm assuming that your problem is in one of those calls.
interesting. you're right, a sample code with a simple shared_ptr
reference also fails to link with the same error message, where the code
is the following:
#include