Subject: Re: [boost] Support for Android
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2014-01-22 01:15:25
2014/1/21 Vicente J. Botet Escriba <vicente.botet_at_[hidden]>
> Le 21/01/14 20:21, Antony Polukhin a écrit :
> 2014/1/21 Vicente J. Botet Escriba <vicente.botet_at_[hidden]>
>>> I see that there are some trouble with Boost and Android:
>>> I'm the Android tests runner from the second link. Let me describe the
>> situation with Android.
> Hi Antony,
>> Could someone state what is the Boost approach to support Android?
>> As far as I know the Boost approach is to support as many platforms as
> My concern was more how to support this platform. For the answer to the
> next question I suspect that Boost can support Android only if the user
> uses NDK.
NDK is required for build.
Most users will need an Android SDK too, to be able to use the libraries in
their projects on non rooted devices, test code on virtual devices and to
communicate with Java.
> Boost.Chrono has this on the buil
> <target-os>linux:<linkflags>"-lrt -lpthread"
> Is there a specific target for Android I can use?
No, there is no such target. I'm thinking of a more generic solution to
this issue. For example Google can add empty librt.a and libpthread.a to
NDK. This will fix a lot of build scripts all around the internet, not just
the Boost's build.
> Currently I'm fixing scripts that run tests on Android emulator. This is
>> required for regression testing only, at work we successfully use Boost on
>> Android for more than a year. All the major patches for Android were
>> already applied to Boost libraries in last year. Scripts and
>> user-config.jam for regression testings can be found here:
> Would your scripts take care of -lrt?
> What about -lpthread?
No. No. This must be fixed by bjam or Google (preferable).
> Nearest plans (for a month or two):
>> * finish the work with scripts
>> * successfully run tests on Android
>> * update the regression testing docs, adding a section about cross
>> compiling and running tests on emulator/remote device
>> * find someone who will agree to update bjam (there is a bunch of minor
>> Have you requested the needed features already?
I've mention the issues in this letter (it also contains some useful
information about Android platform and tests):
Since then run.py became broken on Windows (now it always complains "fatal
error: boost/config/user.hpp: No such file or directory"), so now I'm
making scripts for Linux while Windows is not fixed.
Before requesting features, regression testing on Windows must be fixed and
run-on-android scripts must be stabilized.
-- Best regards, Antony Polukhin
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk