Ask Your Question

Revision history [back]

Build failure with android ndk r13b and c++_shared

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" )

to:

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 configure the build:

cmake_android_arm.sh -DANDROID_STL=c++_shared -DBUILD_SHARED_LIBS=YES -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_ZLIB=ON -DANDROID_NATIVE_API_LEVEL=9

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 find some information that changing the math.h imports to cmath should fix the error. We tried this but hat 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.

Build failure with android ndk r13b and c++_shared

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" )

to:

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 configure the build:

cmake_android_arm.sh -DANDROID_STL=c++_shared -DBUILD_SHARED_LIBS=YES -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_ZLIB=ON -DANDROID_NATIVE_API_LEVEL=9

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 find found some information that changing the math.h imports to cmath should fix the error. We tried this but hat 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

Build failure with android ndk r13b and c++_shared

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" )

to:

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 configure the build:

cmake_android_arm.sh -DANDROID_STL=c++_shared -DBUILD_SHARED_LIBS=YES -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_ZLIB=ON -DANDROID_NATIVE_API_LEVEL=9

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;

Build failure with android ndk r13b and c++_shared

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" )

to:

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 configure the build:

cmake_android_arm.sh -DANDROID_STL=c++_shared -DBUILD_SHARED_LIBS=YES -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_ZLIB=ON -DANDROID_NATIVE_API_LEVEL=9

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?