On Mon, Mar 27, 2017 at 11:54 AM, John Maddock
That won't do me any good because I'm already using this toolchain perfectly fine via CMake and ndk-build. bjam isn't working, maybe because I haven't set up the config.jam file properly. I'm not sure at this point. Boost is the only thing not working here.
Then if you compare the compilation command line generated when building under b2 and when building under cmake the error should be obvious?
I took your advice and compared a real build that worked using CMake (using a simple test cpp file) and what I got from b2. Here is the command line used to build the sample app using CMake. Note that the compilation succeeded: C:\android\ndk\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-g++.exe --sysroot=C:/android/ndk/platforms/android-15/arch-arm -Dndk_test_EXPORTS -isystem C:/android/ndk/sources/cxx-stl/llvm-libc++/include -isystem C:/android/ndk/sources/android/support/include -isystem C:/android/ndk/sources/cxx-stl/llvm-libc++abi/include -isystem C:/android/ndk/platforms/android-15/arch-arm/usr/include -march=armv7-a -mthumb -mfpu=vfpv3-d16 -mfloat-abi=softfp -funwind-tables -no-canonical-prefixes -fexceptions -frtti -g -fPIC -std=gnu++14 -MD -MT CMakeFiles/ndk_test.dir/main.cpp.o -MF CMakeFiles\ndk_test.dir\main.cpp.o.d -o CMakeFiles/ndk_test.dir/main.cpp.o -c ../main.cpp And here is the command line from b2: "C:/android/ndk/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++" -c -x c++ -O3 -Wno-inline -Wall --sysroot=C:/android/ndk/platforms/android-15/arch-arm -isystem C:/android/ndk/sources/cxx-stl/llvm-libc++/include -isystem C:/android/ndk/sources/android/support/include -isystem C:/android/ndk/sources/cxx-stl/llvm-libc++abi/include -isystem C:/android/ndk/platforms/android-15/arch-arm/usr/include -std=c++14 -fno-strict-aliasing -D__GLIBC__ -DANDROID -D__ANDROID__ -D_GLIBCXX__PTHREADS -D__arm__ -D_REENTRANT -O2 -DNDEBUG -H -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_SOURCE -DBOOST_ATOMIC_STATIC_LINK=1 -DNDEBUG -I"." -o "bin.v2\libs\atomic\build\clang-linux-android\release\link-static\target-os-android\threadapi-pthread\threading-multi\lockpool.o" "libs\atomic\src\lockpool.cpp" The build for boost still fails. Note I also passed the -H option, so I could see the include searches performed by clang as it was building boost. The output is long, but I've included it below. Can anyone help me identify why boost still won't build? clang-linux.compile.c++.without-pth bin.v2\libs\atomic\build\clang-linux-android\release\link-static\target-os-android\threadapi-pthread\threading-multi\lockpool.o "C:/android/ndk/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++" -c -x c++ -O3 -Wno-inline -Wall --sysroot=C:/android/ndk/platforms/android-15/arch-arm -isystem C:/android/ndk/sources/cxx-stl/llvm-libc++/include -isystem C:/android/ndk/sources/android/support/include -isystem C:/android/ndk/sources/cxx-stl/llvm-libc++abi/include -isystem C:/android/ndk/platforms/android-15/arch-arm/usr/include -std=c++14 -fno-strict-aliasing -D__GLIBC__ -DANDROID -D__ANDROID__ -D_GLIBCXX__PTHREADS -D__arm__ -D_REENTRANT -O2 -DNDEBUG -H -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_SOURCE -DBOOST_ATOMIC_STATIC_LINK=1 -DNDEBUG -I"." -o "bin.v2\libs\atomic\build\clang-linux-android\release\link-static\target-os-android\threadapi-pthread\threading-multi\lockpool.o" "libs\atomic\src\lockpool.cpp" . C:/android/ndk/sources/cxx-stl/llvm-libc++/include\\cstddef .. C:/android/ndk/sources/cxx-stl/llvm-libc++/include\\__config .. C:\\android\\ndk\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\..\\lib64\\clang\\3.8.275480\\include\\stddef.h ... C:\\android\\ndk\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\..\\lib64\\clang\\3.8.275480\\include/__stddef_max_align_t.h .. C:/android/ndk/sources/cxx-stl/llvm-libc++/include\\__nullptr . .\\boost/config.hpp .. .\\boost/config/user.hpp .. .\\boost/config/select_compiler_config.hpp .. .\\boost/config/compiler/clang.hpp .. .\\boost/config/select_stdlib_config.hpp .. .\\boost/config/stdlib/libcpp.hpp .. .\\boost/config/select_platform_config.hpp .. .\\boost/config/platform/linux.hpp ... C:/android/ndk/sources/cxx-stl/llvm-libc++/include\\cstdlib .... C:/android/ndk/sources/cxx-stl/llvm-libc++/include\\stdlib.h ..... C:/android/ndk/sources/android/support/include\\stdlib.h ...... C:/android/ndk/platforms/android-15/arch-arm/usr/include\\stdlib.h ....... C:/android/ndk/platforms/android-15/arch-arm/usr/include\\sys/cdefs.h ........ C:/android/ndk/platforms/android-15/arch-arm/usr/include\\sys/cdefs_elf.h ........ C:/android/ndk/platforms/android-15/arch-arm/usr/include\\android/api-level.h ....... C:/android/ndk/sources/cxx-stl/llvm-libc++/include\\stddef.h ........ C:\\android\\ndk\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\..\\lib64\\clang\\3.8.275480\\include\\stddef.h ....... C:/android/ndk/sources/cxx-stl/llvm-libc++/include\\stddef.h ........ C:\\android\\ndk\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\..\\lib64\\clang\\3.8.275480\\include\\stddef.h ....... C:/android/ndk/sources/cxx-stl/llvm-libc++/include\\string.h ........ C:/android/ndk/sources/android/support/include\\string.h ......... C:/android/ndk/platforms/android-15/arch-arm/usr/include\\string.h .......... C:/android/ndk/sources/cxx-stl/llvm-libc++/include\\stddef.h .......... C:/android/ndk/platforms/android-15/arch-arm/usr/include\\malloc.h ........... C:/android/ndk/sources/cxx-stl/llvm-libc++/include\\stddef.h ....... C:/android/ndk/platforms/android-15/arch-arm/usr/include\\alloca.h ....... C:/android/ndk/platforms/android-15/arch-arm/usr/include\\strings.h ........ C:/android/ndk/platforms/android-15/arch-arm/usr/include\\sys/types.h ......... C:/android/ndk/sources/cxx-stl/llvm-libc++/include\\stddef.h .......... C:\\android\\ndk\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin\\..\\lib64\\clang\\3.8.275480\\include\\stddef.h ......... C:/android/ndk/sources/android/support/include\\stdint.h .......... C:/android/ndk/platforms/android-15/arch-arm/usr/include\\stdint.h ........... C:/android/ndk/sources/cxx-stl/llvm-libc++/include\\stddef.h ........... C:/android/ndk/platforms/android-15/arch-arm/usr/include\\sys/_types.h ............ C:/android/ndk/platforms/android-15/arch-arm/usr/include\\machine/_types.h ......... C:/android/ndk/platforms/android-15/arch-arm/usr/include\\linux/posix_types.h .......... C:/android/ndk/platforms/android-15/arch-arm/usr/include\\linux/stddef.h ........... C:/android/ndk/platforms/android-15/arch-arm/usr/include\\linux/compiler.h .......... C:/android/ndk/platforms/android-15/arch-arm/usr/include\\asm/posix_types.h ......... C:/android/ndk/platforms/android-15/arch-arm/usr/include\\asm/types.h ......... C:/android/ndk/platforms/android-15/arch-arm/usr/include\\linux/types.h ......... C:/android/ndk/platforms/android-15/arch-arm/usr/include\\machine/kernel.h ......... C:/android/ndk/platforms/android-15/arch-arm/usr/include\\sys/sysmacros.h ....... C:/android/ndk/platforms/android-15/arch-arm/usr/include\\memory.h In file included from libs\atomic\src\lockpool.cpp:16: In file included from .\boost/config.hpp:57: In file included from .\boost/config/platform/linux.hpp:15: C:/android/ndk/sources/cxx-stl/llvm-libc++/include\cstdlib:108:9: error: no member named 'strtold' in the global namespace using ::strtold; ~~^ C:/android/ndk/sources/cxx-stl/llvm-libc++/include\cstdlib:126:9: error: no member named '_Exit' in the global namespace using ::_Exit; ~~^ C:/android/ndk/sources/cxx-stl/llvm-libc++/include\cstdlib:149:9: error: no member named 'at_quick_exit' in the global namespace using ::at_quick_exit; ~~^ C:/android/ndk/sources/cxx-stl/llvm-libc++/include\cstdlib:150:9: error: no member named 'quick_exit' in the global namespace using ::quick_exit; ~~^