Saturday, March 29, 2014

tutorial: cross compile libboost 1.49/1.55 for ARM Linux (ardrone)

Tutorial completo para compilar a lib Boost para ardrone v1.




1) Download boost 1.49 / 1.55 

http://www.boost.org/
http://www.boost.org/users/history/version_1_55_0.html
http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.7z/download

2) Bootstrap build system - 1.55
* Visual Studio 2013 must be installed before.
* Sourcery G++ Lite for ARM GNU Linux 2009q1-203 must be installed before.

C:\ARM-murix\boost_1_55_0>bootstrap.bat
Building Boost.Build engine

Bootstrapping is done. To build, run:

    .\b2

To adjust configuration, edit 'project-config.jam'.
Further information:

    - Command line help:
    .\b2 --help

    - Getting started guide:
    http://boost.org/more/getting_started/windows.html

    - Boost.Build documentation:
    http://www.boost.org/boost-build2/doc/html/index.html

C:\ARM-murix\boost_1_55_0>

3) Bootstrap build system - 1.49

C:\ARM-murix\boost_1_49_0>bootstrap.bat
Building Boost.Build engine
cl : Command line warning D9035 : option 'GZ' has been deprecated and will be re
moved in a future release
cl : Command line warning D9036 : use 'RTC1' instead of 'GZ'
cl : Command line warning D9002 : ignoring unknown option '/MLd'

Bootstrapping is done. To build, run:

    .\b2

To adjust configuration, edit 'project-config.jam'.
Further information:

    - Command line help:
    .\b2 --help

    - Getting started guide:
    http://boost.org/more/getting_started/windows.html

    - Boost.Build documentation:
    http://www.boost.org/boost-build2/doc/html/index.html

C:\ARM-murix\boost_1_49_0>


4) Configuração do build system
O arquivo user-config.jam deve ser criado antes de iniciar o build com a ferramenta bjam

user-config.jam
deve ser salvo do diretório home do usuário,
e as barras sempre devem ser assim /, não use barras assim \ 

5) bjam Boost 1.49 

bjam toolset=gcc-arm target-os=linux link=static --without-python threadapi=pthread

...updated 363 targets...
The Boost C++ Libraries were successfully built!
The following directory should be added to compiler include paths:
    C:/ARM-murix/boost_1_49_0
The following directory should be added to linker library paths:
    C:\ARM-murix\boost_1_49_0\stage\lib
C:\ARM-murix\boost_1_49_0>

6) bjam Boost 1.55 

bjam toolset=gcc-arm target-os=linux link=static --without-python --without-context  --without-log threadapi=pthread

...failed updating 2 targets...

...skipped 3 targets...
C:\ARM-murix\boost_1_55_0>

7) Considerações finais

Se for utilizada alguma biblioteca que faça uso do é necessário, incluir no projeto o caminho: 
C:\ARM-murix\armgcc-2009q1-ardrone\arm-none-linux-gnueabi\libc\usr\include
pois a implementação do GCC 4.3.3 não possui a implementação completa deste arquivo,
mas a libc incluída do no Sourcery G++ Lite for ARM possui a versão completa que vai eliminar todos os erros de compilação.







No comments:

Post a Comment