Boost logo

Boost Users :

Subject: Re: [Boost-users] Need help with errors while building boost for clang on android NDK
From: Edward Diener (eldiener_at_[hidden])
Date: 2016-09-26 11:42:08


On 9/26/2016 10:37 AM, Robert Dailey wrote:
> Is there no possibility of getting help on this?

Thwe first problem is a boost build issue and the second problem is a
context lib issue. Separating these into separate posts might be
helpful, with the first going to the build mailing list and the second
having [context] start its subject line.

>
> On Fri, Sep 23, 2016 at 10:37 AM, Robert Dailey
> <rcdailey.lists_at_[hidden]> wrote:
>> 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':
>>
>> clang-linux.archive
>> bin.v2\libs\container\build\clang-linux-android\release\link-static\runtime-link-static\target-os-linux\threading-multi\libboost_container-clang-mt-s-1_61.a
>> '"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:
>>
>> clang-linux.compile.asm
>> bin.v2\libs\context\build\clang-linux-android\release\link-static\runtime-link-static\target-os-linux\threading-multi\asm\make_i386_ms_pe_gas.o
>> 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++ :
>> <compileflags>--sysroot=$(androidNDKRoot)/platforms/android-15/arch-arm
>> <compileflags>-Os
>> <compileflags>-fno-strict-aliasing
>> <compileflags>-O2
>> <compileflags>-DNDEBUG
>> <compileflags>-g
>> <compileflags>-I$(androidNDKRoot)/sources/cxx-stl/llvm-libc++abi/libcxxabi/include
>> <compileflags>-I$(androidNDKRoot)/sources/cxx-stl/llvm-libc++/libcxx/include
>> <compileflags>-I$(androidNDKRoot)/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a
>> <compileflags>-I$(androidNDKRoot)/sources/android/support/include
>> <compileflags>-DANDROID
>> <compileflags>-D__ANDROID__
>> <compileflags>-D__arm__
>> <compileflags>-D_REENTRANT
>> ;


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net