Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost and Android NDK
From: Philipp Kraus (philipp.kraus_at_[hidden])
Date: 2014-03-23 16:22:31


Am 23.03.2014 um 18:31 schrieb Paul A. Bristow <pbristow_at_[hidden]>:

>> -----Original Message-----
>> From: Boost-users [mailto:boost-users-bounces_at_[hidden]] On Behalf Of
>> Philipp Kraus
>> Sent: 22 March 2014 18:52
>> To: boost-users_at_[hidden]
>> Subject: [Boost-users] Boost and Android NDK
>>
>> Hello,
>>
>> I would like to use Boost on Nexus tablets. I have used Boost at the moment on
>> desktop systems (OSX, Linux, Windows), so my question can I use Boost e.g.
> random,
>> asio, ublas, . on a Nexus? I would like to build Boost myself, so imho I must
> build
>> Boost with the NDK compilers and linker, is this correct?
>> Can I build Boost libs in "one shot"? So the NDK has got tools for arm-linux,
> mipsel-
>> linux and so on. Does anybody can tell me any hopeful tips to use Boost with
> Android
>
> Before you start worrying about 'building Boost', are you certain you need/want
> Boost libraries that *must be built*, rather than just #include headers?

Does exist a official build option for Android NDK?
I have found http://stackoverflow.com/questions/17667978/using-boost-in-android-ndk-with-windows

and I use the current NDK r9d for OSX. The Android NDK defined these toolchains:

arm-linux-androideabi-4.6
arm-linux-androideabi-4.8
arm-linux-androideabi-clang3.3
arm-linux-androideabi-clang3.4
llvm-3.3
llvm-3.4
mipsel-linux-android-4.6
mipsel-linux-android-4.8
mipsel-linux-android-clang3.3
mipsel-linux-android-clang3.4
x86-4.6
x86-4.8
x86-clang3.3
x86-clang3.4

I use at the moment for the Nexus arm-linux-androideabi-4.8.
I have defined this for running

export NO_BZIP2=1
export NO_ZLIB=1
export AndroidNDKRoot="/Applications/Android/NDK/"
export TOOLCHAIN="arm-linux-androideabi-4.8"
export TARGETOS="arm-linux-androideabi-gcc"
export CXXPATH=$AndroidNDKRoot/toolchains/${TOOLCHAIN}/prebuilt/darwin-x86_64/bin
./b2 link=static threading=multi variant=release install --layout=tagged --prefix=/Applications/Android/Boost/1.55.0/$TOOLCHAIN/

So I get the error:

error: toolset gcc initialization:
error: version 'android' requested but 'g++-android' not found and version '4.2.1' of default 'g++' does not match

How can I get a working build configuration? I don't create a cross-compiling Boost lib, so it is my first try.

Thanks a lot

Phil



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