Boost logo

Boost Users :

Subject: [Boost-users] bjam cross compile linking with wrong libs
From: Mark Freeman (mark_at_[hidden])
Date: 2010-07-09 04:48:43


I'm trying to cross compile a simple program using libtorrent but
falling foul of some settings in the boost build system. I am totally
green at using boost so please excuse me if the answer is obvious.

The problem is that the link line emitted by the boost build system
appears to include a hard coded reference to a NATIVE lib (/usr/lib/ and not the one for the TARGET build system. Below is the
output from the bjam command:

BOOST_ROOT = /projects/externals/libtorrent/boost_1_43_0
OS = LINUX bin/gcc-arm/debug/boost-source/link-static/threading-multi/

     "${CROSS_COMPILE}gcc" -Wl,-R -Wl,"/usr/lib" -o "bin/gcc-arm/
debug/boost-source/link-static/threading-multi/enum_if" -Wl,--start-
group "bin/gcc-arm/debug/boost-source/link-static/threading-multi/
enum_if.o" "../bin/gcc-arm/debug/boost-source/link-static/threading-
multi/libtorrent.a" "/projects/externals/libtorrent/boost_1_43_0/
threading-multi/libboost_thread.a" "/projects/externals/libtorrent/
link-static/threading-multi/libboost_filesystem.a" "/projects/
debug/boost-source/link-static/threading-multi/libboost_system.a" "/
usr/lib/" -Wl,-Bstatic -lssl -lcrypto -Wl,-Bdynamic -lrt -
Wl,--end-group -g -pthread -export-dynamic

/usr/lib/ could not read symbols: File in wrong format
collect2: ld returned 1 exit status
...failed updating 1 target...

(CROSS_COMPILE has been set to the prefix for the toolset)

I did add a <linkflags> entry to the GCC entry in usr-config.jam and
sure enough this did appear in the emitted link line however /usr/lib
was still there too and seemed to take precedence. Does anyone know
what I have to do to remove this?



Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at