Le 21/01/14 20:21, Antony Polukhin a écrit :
2014/1/21 Vicente J. Botet Escriba
Hi,
I see that there are some trouble with Boost and Android:
https://svn.boost.org/trac/boost/ticket/9082
http://www.boost.org/development/tests/develop/developer/output/apolukhin-An...
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 possible. 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.
Should the user build with NDK r8e?
Android NDK gives an ability to compile for different Android API. Android API is Linux kernel functions + libc functions + Java methods. So the comment to the ticket ( https://svn.boost.org/trac/boost/ticket/9082#comment:1) is absolutely right. User must compile for at least android-9 API.
NDK versions mainly differ in bugfixes and support for new Android API levels. android-9 API is pretty old, so there must be no problems even with older NDKs.
Does bjam supports a specific android platform?
Yes and no. Static libraries can be easily build (just a correctly setupped user-config.jam required). To build dynamic libraries bjam must be updated (Android has no librt, librt is a part of libc in Android).
Boost.Chrono has this on the buil <target-os>linux:<linkflags>"-lrt -lpthread" Is there a specific target for Android I can use?
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: https://github.com/apolukhin/regression_android
Would your scripts take care of -lrt? What about -lpthread?
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 issues)
Have you requested the needed features already? Best, Vicente