Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost] Going insane trying to build boost for android
From: Robert Dailey (rcdailey.lists_at_[hidden])
Date: 2017-03-27 12:38:00


On Mon, Mar 27, 2017 at 2:42 AM, John Maddock via Boost-users
<boost-users_at_[hidden]> wrote:
>
>
> On 26/03/2017 21:14, Richard Hodges via Boost-users wrote:
>
>> With the -d2 option added, this is what I see:
>>
>>
>>
>> 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
>> -IC:/android/ndk/sources/cxx-stl/llvm-libc++abi/include
>> -IC:/android/ndk/sources/cxx-stl/llvm-libc++/include
>> -IC:/android/ndk/sources/android/support/include -std=c++14
>> -fno-strict-aliasing -D__GLIBC__ -DANDROID -D__ANDROID__
>> -D_GLIBCXX__PTHREADS -D__arm__ -D_REENTRANT -O2 -DNDEBUG
>> -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"
>>
>> 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;
>> ~~^
>> 4 errors generated.
>>
>>
>
> Those errors are all from <cstdlib> and therefore outside our control -
> suggest you try getting a hello-world app that includes <cstdlib> compiling
> before tackling Boost? A quick Google didn't help with those errors
> unfortunately, but they do look like a clang setup or misconfiguration
> issue.

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.

Because of these compiler errors, I'm assuming I'm missing some
include paths but I'm not sure what I'm missing. Clang annoyingly
doesn't say when includes can't be found, instead it just says it
can't find symbols (I find this horrible).

Hoping someone with experience using NDK can give me some pointers here.

My concern with the cxx tests not working is that it may disable C++14
features of boost when I build it. Isn't that the whole point of
testing for those features, so that bjam can programmatically disable
them when building? I just want to make sure of that... if that's not
what they're for, then I honestly don't see a point in them.

Also there used to be CMake support for building boost a few years
ago, but I think the project is dead. Would be nice if boost
developers used CMake instead of this niche build system. If it was
using CMake I'd already be done.


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