'bits/c++config.h' not found when cross-compiling boost 1.60.0 for android

249 views
Skip to first unread message

Peter Gusev

unread,
Sep 25, 2017, 11:37:00 AM9/25/17
to android-ndk
Trying to cross-compile boost for android. Using stand-alone toolchain, generated as:

    make_standalone_toolchain.py --arch arm64 --api 21 --unified-headers --install-dir ~/Documents/Work/ndnrtc-android/toolchain --force


However, when building boost, I'm getting lots of errors like:

    /toolchain/include/c++/4.9.x/cstddef:44:10: fatal error: 'bits/c++config.h' file not found

    #include <bits/c++config.h>

             ^

    1 error generated.


This file is indeed absent from the toolchain's include path, I'm wondering, however, why other files still reference it and how one may fix it?

AppCoder

unread,
Sep 26, 2017, 1:51:54 PM9/26/17
to android-ndk
I'm guessing that you deleted the ~/Documents/Work/ndnrtc-android/toolchain
prefix from the error (and it's not really trying to read files from the
root /toolchain/include, if not, that might be a hint.)

NDK version would be handy, and your host os.  Also the bjam file, and b2
command options are other places that issues can slip in with the wrong
include paths.

As an "it's not impossible" type of encouragement, I've got boost 1.62.0 building
with a standalone clang from NDK 13.1.3345770.   I'm not using the unified
headers stuff (so that might be the version issue)...  

Alex Cohn

unread,
Sep 27, 2017, 3:57:49 PM9/27/17
to android-ndk
I believe this is NDK r15. The standalone toolchain has 'bits/c++config.h' file in 


include/c++/4.9.x/aarch64-linux-android


Maybe you must add this directory to include path manually.

BR,
Alex

Dan Albert

unread,
Sep 27, 2017, 4:06:37 PM9/27/17
to android-ndk
Maybe you must add this directory to include path manually.

Shouldn't need to, and I'm fairly sure we do test the cross product of ABI * toolchain * STL for this.

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+unsubscribe@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/c8bd83dd-7eb7-4ff5-ad83-bd2fabccd5bc%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages