|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2008-04-02 07:04:59
On Wednesday 02 April 2008 13:50:42 Rob Desbois wrote:
> I've been trying to link against Boost libraries 1.35.0 built with
> CodeSourcery's ARM/GNU toolchain and have had no luck yet.
>
> 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?
> and I built the libraries with:
> bjam --with-regex --with-serialization --with-thread stage
>
> This worked fine, however when linking the test program from the
> 'Getting Started (Unix)' guide I get:
> $ arm-none-linux-gnueabi-g++ test-regex.cpp -I.
> stage/lib/libboost_regex-gcc42-mt-1_35.so
> /tmp/ccVow1Eq.o: In function `boost::detail::atomic_decrement(int*)':
> test-regex.cpp:(.text._ZN5boost6detail16atomic_decrementEPi[boost::detail::atomic_decrement(int*)]+0x18):
> undefined reference to `__sync_fetch_and_add_4'
> collect2: ld returned 1 exit status
>
> 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.
Aside from gcc vs. g++, I don't have any idea what can cause this problem.
If you're using Sourcery G++ Professional, you can use the support portal to
find the reason for this error. Otherwise, public discussion forum can
be helpful: http://www.codesourcery.com/archives/arm-gnu/maillist.html
- Volodya
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