Subject: Re: [Boost-build] cross compiling linux boost libraries
From: Moritz Hassert (mhassert_at_[hidden])
Date: 2010-07-02 07:55:54
Madhukar Sandi wrote:
> I am able to cross compile using ./bjam --toolset=gcc-mips. But when im
> seeing in library that was build for intel only
> The following log
> [root_at_infba01388 lib]# file libboost_math_tr1l.so.1.43.0
> libboost_math_tr1l.so.1.43.0: ELF 32-bit LSB shared object, Intel 80386,
> version 1 (GNU/Linux), dynamically linked, not stripped [root_at_infba01388
> lib]# file libboost_thread.so.1.43.0
> libboost_thread.so.1.43.0: ELF 32-bit LSB shared object, Intel 80386,
> version 1 (GNU/Linux), dynamically linked, not stripped
The odd thing with boost-build is that it sometimes does not bail out with an
error when it can't fullfill your exact request. Instead it tries to something
that it considers 'a good alternative'. At least thats my experience.
In your case the toolset 'gcc-mips' is most likely not known to boost-build.
That is, it does not have a gcc with version 'mips' configured. But instead of
complaining it tries to auto-configure that compiler. And if it cannot find an
executable 'g++-mips' or something like that it will fall back to the default
command for toolset gcc, which is of cause 'g++'.
So what your really did was compiling with your standard host gcc.
To see what compiler tool is actually used run:
./bjam --toolset=gcc-mips -d+2
This lists all commands before executing them.
To see what compiler tools are configured run:
./bjam --toolset=gcc-mips --debug-configuration
My advice would be to specify an explicit version like I wrote in my last
Geschaeftsfuehrer: Dipl.-Inform. Christopher Asp
Amtsgericht Mannheim HRB 105845
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