Build failure with android ndk r13b and c++_shared [closed]

asked 2016-12-12 05:08:50 -0500

Arne Fischer gravatar image

updated 2017-03-06 04:18:03 -0500

Because of other dependencies we need to build openCV with ndk r13b and the stl c++_shared. We build on mac OSX.

First we had to fix a small thing in android.toolchain.cmake since apparently some header path did change in the ndk 13. We changed this:

set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/android/support/include" "${ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libcxx/include" "${ANDROID_NDK}/sources/cxx-stl/llvm-libc++abi/libcxxabi/include" )


set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/android/support/include" "${ANDROID_NDK}/sources/cxx-stl/llvm-libc++/include" "${ANDROID_NDK}/sources/cxx-stl/llvm-libc++abi/include" )

Removed libcxxabi und libcxx from path.


We also tried using a newer android version (21) but it results in the similar behaviour. Performing make results in the following error:

~/software/Android-NDK/ndk/sources/cxx-stl/llvm-libc++/include/cwctype:68:9: error: '::iswblank' has not been declared using ::iswblank;

Building with android version 21 results in a similar error somewhat later in the build:

~/software/Android-NDK/ndk/sources/cxx-stl/llvm-libc++/include/cmath:313:9: error: '::signbit' has not been declared using ::signbit;

When searching for the error we found some information that changing the math.h imports to cmath should fix the error. We tried this but had no success in finding a way to make the build work.

What can we do to get the build to work? If more information is needed I am happy to provide it.

EDIT 1: Spelling

EDIT 2: Again similar behaviour with the ndk r14-beta1. We receive the following error for the new beta sdk:

~/software/Android-NDK/ndk/sources/cxx-stl/llvm-libc++/include/cwctype:68:9: error: '::iswblank' has not been declared using ::iswblank;

EDIT 3: The issues persist with the released Version of the NDK 14. Is there any information if the android build with the c++_shared lib will be fixed for the newer NDK versions?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-09-06 10:12:41.970865


Is there any update if supporting newer versions of the ndk with c++_shared is planned? We are still running into this issue with the newest ndk r14. It is really hurting our development process since we need ndk r13 or newer to be able to use the gradle cmake build provided by android.

Arne Fischer gravatar imageArne Fischer ( 2017-05-22 10:15:35 -0500 )edit