Need help with errors while building boost for clang on android NDK
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 ;
Is there no possibility of getting help on this?
On Fri, Sep 23, 2016 at 10:37 AM, Robert Dailey
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 ;
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
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 ;
2016-09-26 16:37 GMT+02:00 Robert Dailey
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
you try to build for i386 instead arm
On Mon, Sep 26, 2016 at 10:46 AM, Oliver Kowalke
2016-09-26 16:37 GMT+02:00 Robert Dailey
: 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
you try to build for i386 instead arm
How can I make it use arm instead?
2016-09-26 17:57 GMT+02:00 Robert Dailey
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
you try to build for i386 instead arm
How can I make it use arm instead?
I assume you try to cross compile : http://www.boost.org/doc/libs/1_61_0/libs/context/doc/html/context/architect...
On Mon, Sep 26, 2016 at 11:09 AM, Oliver Kowalke
2016-09-26 17:57 GMT+02:00 Robert Dailey
: 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
you try to build for i386 instead arm
How can I make it use arm instead?
I assume you try to cross compile : http://www.boost.org/doc/libs/1_61_0/libs/context/doc/html/context/architect...
I am indeed trying to cross compile, however I am not familiar with b2 nor do I much care to learn it (since it's a means to an end for me to build boost). Can you provide an example of how I can specify the documented settings to b2 for my build? Do I provide the values to those in my project-config file?
On Mon, Sep 26, 2016 at 11:55 AM, Robert Dailey
On Mon, Sep 26, 2016 at 11:09 AM, Oliver Kowalke
wrote: 2016-09-26 17:57 GMT+02:00 Robert Dailey
: 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
you try to build for i386 instead arm
How can I make it use arm instead?
I assume you try to cross compile : http://www.boost.org/doc/libs/1_61_0/libs/context/doc/html/context/architect...
I am indeed trying to cross compile, however I am not familiar with b2 nor do I much care to learn it (since it's a means to an end for me to build boost).
Can you provide an example of how I can specify the documented settings to b2 for my build? Do I provide the values to those in my project-config file?
Would really love help with this guys. I literally can't find info on this anywhere else. Surely someone has had success getting 1.61 building with NDK + ARM + Clang. I made a best-guess using the context cross compiling settings linked earlier. Does this seem correct? It doesn't build at the moment saying it can't find locale-related symbols. That doesn't help me at all so I guess I'm going to have to dig into the llvm STL code and find out what preprocessor flags I'm missing (assuming it's that simple). Also I still don't know how to specify 'ar' and 'ranlib' executables to boost from NDK. 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 <architecture>arm <address-model>32 <binary-format>pe <abi>aapcs ;
On Wed, Sep 28, 2016 at 10:49 AM, Robert Dailey
On Mon, Sep 26, 2016 at 11:55 AM, Robert Dailey
wrote: On Mon, Sep 26, 2016 at 11:09 AM, Oliver Kowalke
wrote: 2016-09-26 17:57 GMT+02:00 Robert Dailey
: > 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
you try to build for i386 instead arm
How can I make it use arm instead?
I assume you try to cross compile : http://www.boost.org/doc/libs/1_61_0/libs/context/doc/html/context/architect...
I am indeed trying to cross compile, however I am not familiar with b2 nor do I much care to learn it (since it's a means to an end for me to build boost).
Can you provide an example of how I can specify the documented settings to b2 for my build? Do I provide the values to those in my project-config file?
Would really love help with this guys. I literally can't find info on this anywhere else. Surely someone has had success getting 1.61 building with NDK + ARM + Clang.
I made a best-guess using the context cross compiling settings linked earlier. Does this seem correct? It doesn't build at the moment saying it can't find locale-related symbols. That doesn't help me at all so I guess I'm going to have to dig into the llvm STL code and find out what preprocessor flags I'm missing (assuming it's that simple). Also I still don't know how to specify 'ar' and 'ranlib' executables to boost from NDK.
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 <architecture>arm <address-model>32 <binary-format>pe <abi>aapcs ;
FYI: I still haven't gotten this working. Sorry to keep bumping this thread but I have absolutely zero options yet. I need help from the boost developers at this point, I think.
participants (3)
-
Edward Diener
-
Oliver Kowalke
-
Robert Dailey