Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cross compile Boost 1.57.0 on ubuntu for arm

I am new into cross compile process. Need to cross compile boost library for arm. Please suggest step to cross-compile boost library. Is it possible to cross compile required feature of boost library?

like image 937
Dipak D Desai Avatar asked Mar 13 '15 10:03

Dipak D Desai


People also ask

Why is cross compiling so hard?

"building a cross-compiler is significantly harder than building a compiler that targets the platform it runs on." The problem exists due to the way libraries are built and accessed. In the normal situation all the libraries are located in a specific spot, and are used by all apps on that system.


1 Answers

You can cross-compile Boost using the following steps:

  1. Bootstrap the build system:

    ./bootstrap.sh
    
  2. Modify the configuration file (project-config.jam) to use the ARM toolchain by replacing the line with using gcc with:

    using gcc : arm : arm-linux-gnueabihf-g++ ;
    
  3. Build and install the library:

    ./bjam install toolset=gcc-arm --prefix=/usr/local/boost
    

Note: the toolchain must be in $PATH

like image 200
Dipak D Desai Avatar answered Sep 20 '22 00:09

Dipak D Desai