Boost logo

Boost Users :

Subject: Re: [Boost-users] Android: segfault while writing to archive during Serialization
From: Igor R (boost.lists_at_[hidden])
Date: 2013-02-20 02:51:52


> New to discussion, apologies in advance for any inadvertent misuse of
> terminology / standards. (also, I tried e-mailing this post directly last
> night, but it doesn't appear to have shown up, yet. double-apologies if
> double-post).
>
> I'm trying to port my project, which involves some serialization code, to
> Android. I followed instructions to build boost 1.49 found here:
>
> https://github.com/MysticTreeGames/Boost-for-Android
>
> and can successfully compile my application using crystax NDK r7 (gcc 4.5.3)
> , and link it to the Serialization library.

Perhaps, it's worth building the most recent boost version with the
latest NDK/toolchain?
FWIW, boost1.53 gets built with the standard NDK r8d flawlessly (at
least, the libs I need).
I'm using the following b2 line:
b2 release --with-serialization --with-thread --with-date_time
--with-system --with-filesystem --layout=system threading=multi
link=static runtime-link=static toolset=gcc-android target-os=linux
threadapi=pthread stage
and my user-config.jam is as follows (note that it uses gcc 4.7
toolchain, which is not the default in r8d):

import os ;

if [ os.name ] = CYGWIN || [ os.name ] = NT
 {
         androidPlatform = windows ;
 }
 else if [ os.name ] = LINUX
 {
         androidPlatform = linux-x86 ;
 }
 else if [ os.name ] = MACOSX
 {
         androidPlatform = darwin-x86 ;
 }

androidNDKRoot = C:/android-ndk-r8d ;
 using gcc : android :
         $(androidNDKRoot)/toolchains/arm-linux-androideabi-4.7/prebuilt/$(androidPlatform)/bin/arm-linux-androideabi-g++
:
     <compileflags>--sysroot=$(androidNDKRoot)/platforms/android-8/arch-arm
     <compileflags>-mthumb
     <compileflags>-Os
     <compileflags>-fno-strict-aliasing
     <compileflags>-O2
     <compileflags>-DNDEBUG
     <compileflags>-g
     <compileflags>-lstdc++
     <compileflags>-I$(androidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.7/include
     <compileflags>-I$(androidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi/include
     <compileflags>-D__GLIBC__
     <compileflags>-D_GLIBCXX__PTHREADS
     <compileflags>-D__arm__
     <compileflags>-D_REENTRANT
     <archiver>$(androidNDKRoot)/toolchains/arm-linux-androideabi-4.7/prebuilt/$(androidPlatform)/bin/arm-linux-androideabi-ar
     <ranlib>$(androidNDKRoot)/toolchains/arm-linux-androideabi-4.7/prebuilt/$(androidPlatform)/bin/arm-linux-androideabi-ranlib
         ;


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