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 Thanks Phil
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 don't know about Random and uBlas specifically, but as for Asio and most of other libs, they used to build with Android NDK toolchains w/o any special issue. The only issue I remember of is the lack of wchar_t related functions in the past version of the NDK (don't know whether this's fixed in the recent one).
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
See the following link: http://stackoverflow.com/questions/17667978/using-boost-in-android-ndk-with-... (Some compiler flags are unneeded now, but in general it should work.)
-----Original Message----- From: Boost-users [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Philipp Kraus Sent: 22 March 2014 18:52 To: boost-users@lists.boost.org 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? Paul Paul A. Bristow Prizet Farmhouse Kendal UK LA8 8AB +44 01539 561830 07714330204
Am 23.03.2014 um 18:31 schrieb Paul A. Bristow
-----Original Message----- From: Boost-users [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Philipp Kraus Sent: 22 March 2014 18:52 To: boost-users@lists.boost.org 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-... 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
The important thing is specifying the ARM architecture. The fact that the chip is running Android is not that important for native code.
On Mar 23, 2014, at 1:22 PM, Philipp Kraus
wrote: Am 23.03.2014 um 18:31 schrieb Paul A. Bristow
: -----Original Message----- From: Boost-users [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Philipp Kraus Sent: 22 March 2014 18:52 To: boost-users@lists.boost.org 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-...
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 mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On Monday, March 24, 2014 04:22 AM, Philipp Kraus wrote:
Am 23.03.2014 um 18:31 schrieb Paul A. Bristow
mailto:pbristow@hetp.u-net.com>: -----Original Message----- From: Boost-users [mailto:boost-users-bounces@lists.boost.org mailto:users-bounces@lists.boost.org] On Behalf Of Philipp Kraus Sent: 22 March 2014 18:52 To: boost-users@lists.boost.org mailto:boost-users@lists.boost.org 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-...
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.
You might try adding the android toolchain to user_config.jam and specifying it as a toolchain is easier: user_config.jam: # ---------------------- # Android configuration. # ---------------------- local AndroidToolchainRoot = /Applications/Android/NDK/android-ndk-r9d/toolchains/arm-linux-androideabi-4.8 ; using gcc : androidR9 : $(AndroidToolchainRoot)/bin/arm-linux-androideabi-g++ ; ./b2 toolset=gcc-androidR9 link=static threading=multi variant=release install --layout=tagged --prefix=/Applications/Android/Boost/1.55.0/$TOOLCHAIN/ Ben
2014-03-22 22:52 GMT+04:00 Philipp Kraus
Hello,
I would like to use Boost on Nexus tablets.
I've been successfully using Boost libraries On Android. Take a look at this link: https://github.com/MysticTreeGames/Boost-for-Android There you'll find build scripts, instructions and patches for Boost. Trunk and upcoming 1.56 versions of Boost build on Android without patches. Earlier versions require patches from the link above. -- Best regards, Antony Polukhin
participants (6)
-
Antony Polukhin
-
Ben Pope
-
Igor R
-
Lindley French
-
Paul A. Bristow
-
Philipp Kraus