Thank you, but that caused the compiler to complain about an unknown option.

However, it succeeds if I replace BUILD_CXX=arm-linux-gnueabihf-gcc with BUILD_CXX=arm-linux-gnueabihf-g++.

Now I realize I don't understand the building process of boost. The result of running bootstrap.sh is some jam config files and an executable called b2, not the actual boost libraries.
The resulting b2, unsurprisingly, is an ARM executable for the target platform, and can't run on the intel machine, which defeats my purpose of cross compiling in the first place (since it was b2 that caused the out of memory condition on the ARM).

So I ran bootstrap.sh _without_ the cross compiler settings and got a b2 for intel x86-64. Now I have to make b2 use the ARM toolchain (or it will build for Intel). However I can't figure out what and how to pass the cross compiler settings to b2, because it seems to expect them in a different way than bootstrap.sh did.
Running ./b2 --help only offers this hint about cross compiling:

Properties:

  toolset=toolset         Indicate the toolset to build with.

I tried passing toolset=arm-linux-gnueabihf but that caused an error too:

arm.jam: No such file or directory
/home/ubuntu/arm-toolkit/boost_1_71_0/tools/build/src/build/toolset.jam:44: in toolset.using
ERROR: rule "arm.init" unknown in module "toolset".

Does anyone know how to tell b2 to use a specific toolchain? Or what I'm doing wrong.


On Sunday, August 25, 2019, 2:29:13 AM MST, Marko Stanisic <sankerspace@gmail.com> wrote:


Try to compile it with that compiler settings:


g++ –std=c++14 -pthread 


Hint comes from here:

Sent from my iPhone

On 24.08.2019, at 20:05, Adrian C via Boost-users <boost-users@lists.boost.org> wrote:

undefined reference to `std::thread::hardware_concurrency()'