goldharv
goldharv

Reputation: 31

Trying to cross compile Boost 1.46.1 on Ubuntu 10.10 to Arm Linux

I've got a cross compile tool chain for the arm, and am successfully compiling a fairly large application with it on Ubuntu 10.10.

Now I'm trying to introduce boost 1.46.1. I have done what the boost cross compile directions say. Namely running bootstrap.sh, modifying user-config.jam to add the line:

using gcc : arm : /path/to/compiler/arm-none-linux-gnueabi-g++ ;

When I issue:

 ./bjam --toolchain=gcc-arm

bjam compiles boost, but when I do a:

 file ..../something.o

The output indicates an Intel 80386 ELF file, not an arm file. I've sanity checked with other application arm objects and the file command reports arm not 80386.

I have tried setting my PATH to put the cross compile binaries first and setting LD_LIBRARY_PATH to the arm compiler libraries, but nothing I've done seems to be able to keep bjam from compiling for Intel.

Upvotes: 2

Views: 2051

Answers (2)

Arvid
Arvid

Reputation: 11245

A very convenient way to debug issues with bjam is to include the -n argument. It will print all the command lines, instead of executing them. Then you'll see which g++ is actually being invoked.

If you already built everything, you might want to include -a as well, which means "rebuild everything from scratch"

Upvotes: 1

ildjarn
ildjarn

Reputation: 62975

Features do not begin with --, and toolchain is not a valid feature; make that:

bjam toolset=gcc-arm

Upvotes: 5

Related Questions