|
Boost : |
Subject: [boost] Going insane trying to build boost for android
From: Robert Dailey (rcdailey.lists_at_[hidden])
Date: 2017-03-24 02:14:11
How many months has it been of lost google searching, trying to beat
b2 into submission. I have no idea at this point how to build boost
for Android. Really hoping I get some help here...
So to start, here are the versions I'm using:
- Android NDK r14b
- Boost 1.63.0
I'm doing all of this on Windows 10, through command prompt.
I want to use clang and libc++ to build boost for API 15. I figure the
easiest way is to generate a standalone toolchain using the NDK, so I
did that first:
> %ANDROID_NDK%\build\tools\make_standalone_toolchain.py --arch arm --api 15 --stl libc++ "C:\android\_toolchains\arm-api-15"
This generated the appropriate toolchain (I think).
I then temporarily added this location to PATH:
> set PATH=C:\android\_toolchains\arm-api-15\bin;%PATH%
Then I ran bootstrap:
> bootstrap.bat --with-toolset=clang
Then I tried to build boost itself:
> b2 --toolset=clang cxxflags="-stdlib=libc++ -std=c++14" threadapi=pthread --prefix=..\boost_android_arm --builddir=./ target-os=linux define=BOOST_FILESYSTEM_VERSION=3 --without-python link=static runtime-link=shared threading=multi variant=release install -j8
However I get failures when it tries to run the clang command:
'C:\code\_third_party\boost_1_63_0\\clang38++.exe' is not recognized
as an internal or external command
I'm not sure why it's appending that absolute path (that's where my
current directory is set to, and where boost source is). It should
just be trying to use "clang++" but doesn't look like it is.
>From the output, it looks like it's trying to use clang correctly I think:
"clang++" -c -x c++ -stdlib=libc++ -std=c++14 -O3 -Wno-inline -Wall
-pthread -stdlib=libc++ -std=c++14 -DBOOST_ALL_NO_LIB=1
-DBOOST_FILESYSTEM_VERSION=3 -DBOOST_THREAD_USE_LIB=1 -DNDEBUG -I"."
-o "bin.v2\libs\wave\build\clang-linux-android\release\link-static\target-os-linux\threadapi-pthread\threading-multi\cpplexer\re2clex\aq.o"
"libs\wave\src\cpplexer\re2clex\aq.cpp"
Am I going about this all wrong? How in the heck can I build boost for
android using the settings I specified above?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk