-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Vladimir Prus Sent: 24 April 2009 18:30 To: boost-users@lists.boost.org Subject: Re: [Boost-users] undefined reference to `__sync_fetch_and_add_4'
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>
It was a bit of a long shot, I stumbled across these clues: http://archives.devshed.com/forums/development-94/new-undefined-referenc e-to-sync-fetch-and-add-4t-1971252.html http://www.mail-archive.com/users@lists.strongswan.org/msg00050.html http://markmail.org/message/dnxjspjzyrbwzqhm And looked into gcc.jam, which defaults to i386. So I realised that instead of passing -march=iN86 (where i> 3) to linking my app, I should try to pass it to bjam when building boost, namely 'instruction-set' By the way, my bjam version: birju@xx:~/Downloads/boost_1_38_0$ bjam --help Boost.Build V2 (Milestone 12) Boost.Jam 03.1.16 ....blah....
will tell for sure.
- Volodya
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Schneider Trading 4th Floor, 25 Copthall Avenue London EC2R 7BP -------------------------------------------------------- Message from: Birju.Prajapati@schneidertrading.com Message to: boost-users@lists.boost.org Attached files: 0 This e-mail and any files transmitted with it are confidential, may be legally privileged, and are for the sole use of the intended recipient. Copyright in this e-mail and any accompanying document created by us is owned by us. If you are not the intended recipient of this e-mail or any part of it please telephone our IT Department at the number shown above or by e-mail at info@schneidertrading.com. You should not use or disclose to any other person the contents of this e-mail or its attachments (if any), nor take copies. This e-mail is not a representation or warranty and is not intended nor should it be taken to create any legal relations, contractual or otherwise. Schneider Trading Associates Ltd (Registration No. 3692131) is incorporated in England and Wales and the registered office is at 25 Copthall Avenue, London EC2R 7BP. The company is authorised and regulated by the Financial Services Authority