|
Boost-Build : |
From: Rob Desbois (rob.desbois_at_[hidden])
Date: 2008-04-02 11:16:54
--- snip ---
> > My user-config.jam contained the line:
> > using gcc :: arm-none-linux-gnueabi-gcc ;
>
> Per Boost.Build documentation, this should be
>
> using gcc :: arm-none-linux-gnueabi-g++ ;
>
> Can you make such a change, and do
>
> bjam -a --with-regex --with-serialization --with-thread stage
>
> to rebuild everything?
--- snip---
Oops...sorry, silly mistake there. I recompiled like that but no difference.
--- snip ---
> > As far as I could ascertain this has something to do with compiling
> > for the incorrect architecture/cpu. I can't find out how to build the
> > libraries for my architecture/cpu - none of the possible architecture
> > or instruction-set values seem appropriate for what I want.
>
> You can pass the right -mcpu values using the <cxxflags> and <linkflags>
> features.
>
--- snip ---
Hmmm I tried this too -- for the building of boost, and linking
against it, but get the same result.
> I've just spoken with an ARM expert here at CodeSourcery, who tells me that
> the atomic builtins, including __sync_fetch_and_add, are not supported
> by GCC on ARM.
>
> What happens is that boost/detail/sp_counted_base.hpp has this code:
>
> #elif defined(__GNUC__) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 )
>
> # include <boost/detail/sp_counted_base_sync.hpp>
>
> and sp_counted_base_sync.hpp has this:
>
> inline void atomic_increment( sp_int32_t * pw )
> {
> __sync_fetch_and_add( pw, 1 );
> }
>
> and while this apparent compiles, it does not work. I suggest you report this
> problem on the C++ Boost developers mailing list -- I think the #elif condition
> need to explicitly check for ARM.
Many thanks -- that's extremely helpful! I'd never have tracked it
down myself...
I will take this to the CS dev list.
Thanks again :-)
--rob
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk