Boost logo

Boost Users :

Subject: Re: [Boost-users] undefined reference to `__sync_fetch_and_add_4'
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2009-04-24 13:30:12


Peter Dimov wrote:

> Vladimir Prus:
>> Peter Dimov wrote:
>
> ...
>
>>> 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.
>>
>> Or probably by the fact that -m32 was not, in fact, passed to compiler
>> when building boost.
>
> The original post stated:
>
>> I built boost 1.38 as so:
>>
>> bjam architecture=x86 address-model=32 --stagedir=stage32
>> --with-filesystem --with-thread --with-signals --with-serialization
>> --with-system --with-program_options --with-date_time stage
>
> so I assumed that address-model=32 does pass -m32 to g++.

It should, but I don't have any other theory why -march=i686 might
have changed anything. Maybe, an obsolete Boost.Build version was
installed on machine -- and does not ever pass -m32 explicitly.

        bjam -n -a <other option>

will tell for sure.

- Volodya


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