Boost logo

Boost Users :

Subject: Re: [Boost-users] Android: segfault while writing to archive during Serialization
From: wespaugh (wespaugh_at_[hidden])
Date: 2013-03-13 08:40:45


I've spent the last few weeks trying to work from this, but still keep
hitting roadblocks. Usually, these are to the tune of

./boost/..../XXX.hpp: fatal error: bits/c++config.h: No such file or
directory

Depending on the day, I might have been getting that error about
c++config.h, or locale, or cstddef, or stddef.h. The pattern has been "poke
at it until I get frustrated, then try from scratch again and get a
different file 'missing' ".

My user-config.jam is unchanged from what you provided for me:

import os ;

if [ os.name ] = CYGWIN || [ os.name ] = NT
 {
         androidPlatform = windows ;
 }

androidNDKRoot = /cygdrive/c/Android/android-ndk-r8d ;
cxxSource = /cygdrive/c/Android/boost-custom/boost_1_53_0/ndk-cxx ;

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
;

And I can see, in this case, c++config.h exists at bits/c++config.h under
the second directory in the provided search path. The 'No such file' error
has always been about a file that I've understood to be in the search path.

This is very probably just a gcc quirk I'm not understanding, and not
related to boost (sorry).

For reference, I'm trying to compile boost with the line:

b2 release --with-serialization --with-system --with-filesystem
--layout=system link=static runtime-link=static toolset=gcc-android
target-os=linux stage

Which I think is the subset of your example I need. It seems unlikely that
excluding libraries like date_time would be necessary or that threading
would be related, but I thought it worth mentioning.

One other thing that might be worth mentioning: sometimes the error has
been:

'CreateProcess: no such file or directory', which as far as I can tell,
isn't referring to a file. I've spent a few days googling that error, as
well, and the closest I got to anything resembling an answers was 'cygwin
memory problem'. I've adjusted my environment variables to give cygwin more
overhead. Haven't seen the problem since restarting my computer again this
morning, but I have still seen it since giving cygwin run of more memory.

If that could be related to boost, it might be very worth knowing.

--
View this message in context: http://boost.2283326.n4.nabble.com/Android-segfault-while-writing-to-archive-during-Serialization-tp4643096p4644078.html
Sent from the Boost - Users mailing list archive at Nabble.com.

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