RFC/patch: compile boost on Android for platform development
Hi, We are evaluating the pros and cons of using Boost for platform development on Android. We have successfully built and run Asio's "chat" server and client examples on an Android device running Lollipop. The C++ support seems to have been greatly improved since KitKat. Even though it is still early to say that all of Boost runs ok, all the Asio unit tests passed with "*** No errors detected" except the multicast test. I've attached a patch that adds Android makefiles to relevant libraries for compiling Boost.Asio. It's a first draft and it doesn't use the git submodules. The development of this patch has been made on top of the 1.56.0 tag. Platform development on android is different than native development ("NDK", used for JNI libraries). There seem to have been several efforts made for Boost support on NDK but we haven't found any for platform development (which is aimed at device support, e.g., HAL development, native tools). Is there an interest for maintaining a set of Android makefiles on vanilla Boost ? I understand someone would need to run the regression tests on Android; is there any other such requirement ? Kind Regards, -- David Wagner Intel Corp. --------------------------------------------------------------------- Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris, 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 4,572,000 Euros This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
2014-11-12 17:30 GMT+04:00 Wagner, David
Hi,
We are evaluating the pros and cons of using Boost for platform development on Android. We have successfully built and run Asio's "chat" server and client examples on an Android device running Lollipop.
I've been using Boost on Andriod for a long time and can tell you that the major part of Boost libraries work perfectly on Android platforms, even on the ancient ones (like 2.3). I've been doing some work to run all the regression tests on Andriod, see https://github.com/apolukhin/regression_android But unfortunately I had not enough time to finish the work. That repo could be a good point to start with. Running regression tests is essential for a formal support of Android platform. You may also take a look at this thread, it describes the situation with android http://lists.boost.org/Archives/boost/2014/01/210885.php
The C++ support seems to have been greatly improved since KitKat. Even though it is still early to say that all of Boost runs ok, all the Asio unit tests passed with "*** No errors detected" except the multicast test.
I've attached a patch that adds Android makefiles to relevant libraries for compiling Boost.Asio. It's a first draft and it doesn't use the git submodules. The development of this patch has been made on top of the 1.56.0 tag.
Platform development on android is different than native development ("NDK", used for JNI libraries). There seem to have been several efforts made for Boost support on NDK but we haven't found any for platform development (which is aimed at device support, e.g., HAL development, native tools).
Is there an interest for maintaining a set of Android makefiles on vanilla Boost ? I understand someone would need to run the regression tests on Android; is there any other such requirement ?
I'll help you as much as I can, but you have to stick to the current Boost build system, which is Bjam. -- Best regards, Antony Polukhin
On 13/11/2014 07:33, Antony Polukhin wrote:
2014-11-12 17:30 GMT+04:00 Wagner, David
: Hi,
We are evaluating the pros and cons of using Boost for platform development on Android. We have successfully built and run Asio's "chat" server and client examples on an Android device running Lollipop.
I've been using Boost on Andriod for a long time and can tell you that the major part of Boost libraries work perfectly on Android platforms, even on the ancient ones (like 2.3).
I've been doing some work to run all the regression tests on Andriod, see https://github.com/apolukhin/regression_android But unfortunately I had not enough time to finish the work. That repo could be a good point to start with. Running regression tests is essential for a formal support of Android platform.
You may also take a look at this thread, it describes the situation with android http://lists.boost.org/Archives/boost/2014/01/210885.php
According to the readme on your github repository and the mail you pointed me to, this is intended for Native development using the NDK (libraries to be used by Android applications). What I'm talking about is Platform development (below the Android framework level); if you'd look at the Android architecture diagram [1], this would be the green part whereas NDK is the topmost part. The environment for Platform development is sometimes referred to as "PDK" and the makefiles in this environment have their own flavor (they look like the ones in the NDK but the build system is different). While you could theoretically call bjam in these makefiles, the common practice is to rewrite the makefiles in the Android flavor. For instance, if boost is ever to be officially integrated in the PDK, I highly doubt that using bjam would be an option for Google. A common pattern used by Google in projects part of the PDK is to drop a stable version of the code into a new git repository and develop android-specific patches such as the Android makefile on top of it. See the ping6 utility git history in android [3] as an example. Also, they are using there own "git repository aggregation" tool, called "repo". This tool uses an XML file mapping remote git repositories to locations in the filesystem. Adding boost in its current modular form would mean adding 110+ projects to the manifest which may be a bit hard to swallow. These are the reasons why I wrote the makefiles attached in the original post. One last thing: you don't have access to the GNU stl in the PDK. Before Lollipop you only had "STLPort" [2] which isn't maintained upstream anymore and C++03; with Lollipop you now have clang's stl and C++11 :) David [1] http://commons.wikimedia.org/wiki/File:Android-System-Architecture.svg#media... [2] http://www.stlport.org/ [3] https://android.googlesource.com/platform/external/ping6/ -- David Wagner PEG->IPG->EIG->Audio CoE complex != complicated --------------------------------------------------------------------- Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris, 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 4,572,000 Euros This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
participants (2)
-
Antony Polukhin
-
Wagner, David