14

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?

Dipak D Desai
  • 867
  • 1
  • 8
  • 20
  • 1
    [google ltib boost.spec](https://www.google.ca/#q=ltib+boost.spec). What have you tried? After you 'compile' boost, you need to link to it. Why don't you search out a 'filesystem builder'? There are many options. Certain versions of boost have issues with different gcc versions. In many cases, you don't need the boost library and can just include the headers. They are templates which just get expanded inline. – artless noise Mar 13 '15 at 18:01

1 Answers1

33

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

S.S. Anne
  • 15,171
  • 8
  • 38
  • 76
Dipak D Desai
  • 867
  • 1
  • 8
  • 20
  • I follow your instructions, but I get this error "provided command 'arm-none-linux-gnueabi-g++' not found" I thought I installed the cross compiler correctly... – Darksaint2014 Jun 04 '15 at 14:39
  • Have you use this? Using gcc : arm : arm-linux-gnueabihf-g++ ; or Using gcc : arm : arm-none-linux-gnueabi-g++ ; ? – Dipak D Desai Jun 05 '15 at 04:19
  • Yes I have tried both of those. I did get boost to work, it will actually build on the ARM platform I'm using. I am now stuck on ffmpeg, if you have any experience with compiling/using ffmpeg on ARM boards please do let me know. Thanks for the help! – Darksaint2014 Jun 05 '15 at 11:44
  • Have you installed "arm-linux-gnueabihf-g++ " toolchain ? – Dipak D Desai Jun 05 '15 at 11:45
  • Yes I have, I determined that the standard ffmpeg ubuntu install walkthrough works for this platform as well. Again thank you for the continued help. – Darksaint2014 Jun 05 '15 at 15:52
  • @Darksaint2014 you're probably missing a symlink, as that is not the true name of the compiler. – rivanov Mar 14 '16 at 03:37
  • 1
    `./bjam install` produces error, but without install builds fine. – kyb Mar 06 '19 at 13:54