24 Apr
2009
24 Apr
'09
4:49 p.m.
Birju Prajapati:
g++ -m32 [...]
/usr/local/lib32/libboost_serialization-gcc43-mt.so: undefined reference to `__sync_fetch_and_add_4'
This is weird. __sync_fetch_and_add is used by shared_ptr and atomic_count, but in both places, the earlier #elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) ) takes precedence, and I have verified that g++ -m32 does indeed define __i386__. This could be caused by an issue we've identified recently of libstdc++ standard headers using __sync_fetch_and_add as part of their reference counted implementation of std::string and std::locale.