Boost logo

Boost :

Subject: [boost] Need help with errors while building boost for clang on android NDK
From: Robert Dailey (rcdailey.lists_at_[hidden])
Date: 2016-09-23 11:37:10

I'm using NDK r11 and I'm setting up project-config.jam to build boost
using clang + llvm STL. I'm running into a few errors that I do not
know how to solve. I will post my config file at the bottom.

First problem is that boost does not know where to find tools 'ar' and 'ranlib':

'"ar"' is not recognized as an internal or external command,
operable program or batch file.
'"ranlib"' is not recognized as an internal or external command,
operable program or batch file.

How can I explicitly specify the NDK path to these executables?

Second problem is related to some assembler stuff, I think. I get
these errors while compiling boost thread:

libs\\context\\src\\asm\\make_i386_ms_pe_gas.asm:30:1: error: unknown directive
.def _make_fcontext; .scl 2; .type 32; .endef
libs\\context\\src\\asm\\make_i386_ms_pe_gas.asm:30:22: error: unknown directive
.def _make_fcontext; .scl 2; .type 32; .endef
libs\\context\\src\\asm\\make_i386_ms_pe_gas.asm:30:36: error:
expected identifier in directive
.def _make_fcontext; .scl 2; .type 32; .endef
libs\\context\\src\\asm\\make_i386_ms_pe_gas.asm:30:40: error: unknown directive
.def _make_fcontext; .scl 2; .type 32; .endef
libs\\context\\src\\asm\\make_i386_ms_pe_gas.asm:136:1: error: unknown directive
.def __exit; .scl 2; .type 32; .endef

How can I solve this? I have no idea at this point.

I'm invoking the build using:

b2 --without-python threading=multi link=static runtime-link=static
toolset=gcc-android target-os=linux threadapi=pthread
--stagedir=android stage

And my project-config.jam looks like:

import option ;

option.set keep-going : false ;

androidNDKRoot = E:/android/ndk ;
androidAbiVer = 4.9 ;
androidPlatform = windows-x86_64 ;

using clang : android :
    $(androidNDKRoot)/toolchains/llvm/prebuilt/$(androidPlatform)/bin/clang++ :

Boost list run by bdawes at, gregod at, cpdaniel at, john at