Ask Your Question

BoiseBaked's profile - activity

2016-04-08 12:54:06 -0600 answered a question Need "How To" to Rebuild OpenCV v2.4.12 and v.3.1 for Android and NDK 11

The link error resulted from me fat fingering a change of an assign operator, ":=", to a plus-equal operator, "+=", in the OpenCV produced OpenCV.mk file for Android cross-compilation. But the overall problem with CMake generated build environments remain. That is the initial CMake configuration definition settings are only known to the CMake project author. This requires the CMake project author to correctly and clearly document the CMake definitions that will build the specific target, whether it is a cross-compiling build environment or a platform specific build environment. Without proper documentation, it's is very hard to reverse engineer the CMake project/script/package, whatever you call it, to figure how platform specific build configuration settings map to CMake configuration definitions.

2016-03-31 13:45:33 -0600 asked a question Need "How To" to Rebuild OpenCV v2.4.12 and v.3.1 for Android and NDK 11

I trying to rebuild OpenCV static libraries for the Android ABIs of: armeabi, armeabi-7a, mips, x86.

I'm using Android Studio (because Eclipse is deprecated) latest and greatest version on Mac OS X.

I using NDK 11 that recommends Clang3.8, GCC is deprecated. Use the APP_STL (Application.mk) of libc++ instead of libstdc++.

Threading Building Blocks (libtbb.a) support: clearly indicate or configure in CMake generator for Android on Mac OS X whether tbb is supported for one more of the Android ABIs.

My current problem is the following link error building a shared library for an Android APK where a static library created by the OpenCV Android armeabi-7a CMake build does not link with libtbb.a, that was created by the same build process:
.../libopencv_imgproc.a(histogram.cpp.o):
histogram.cpp:
function tbb::interface7::internal::auto_partition_type::auto_partition_type(tbb::auto_partitioner const&):
error: undefined reference to 'tbb::internal::get_initial_auto_partitioner_divisor()'
[Many more errors like this one...]

Here is my cmake command: cmake \
-DBUILD_PERF_TESTS=OFF \
-DBUILD_TESTS=OFF \
-DBUILD_WITH_DEBUG_INFO=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DWITH_TBB=ON \
-DENABLE_PRECOMPILED_HEADERS=OFF \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
-DCMAKE_C_FLAGS_RELEASE="-Os -DNDEBUG -fvisibility=hidden -ffunction-sections -fstack-protector-all" \
-DCMAKE_CXX_FLAGS_RELEASE="-Os -DNDEBUG -fvisibility=hidden -ffunction-sections -fstack-protector-all -fvisibility-inlines-hidden" \
-DANDROID_ABI=armeabi-v7a \
-DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.9 \
-DANDROID_STL=c++_static \
-DANDROID_NATIVE_API_LEVEL=android-15 \
-DCMAKE_TOOLCHAIN_FILE=../android/android.toolchain.cmake \
../..

2016-03-29 23:56:03 -0600 asked a question Looking for user Dodo to expand on how to rebuild libc++ OpenCV

Dodo, you commented on Stack Overflow about rebuilding OpenCV for clang, libc++ and c++11 and now for Android NDK 11. I can't comment on the Stack Overflow answer since I don't have enough points (GRRR!!!!). I wanted to ask you why the android.toolchain.cmake file you indicated to be changed out with the one here: https://dl.dropboxusercontent.com/u/2... was seemingly based on very old android.toolchain.cmake file version. Basically, I wanted to do a diff between the modified and the replaced android.toolchain.cmake files to see what changed (to better understand the process). But as it stands from the StackOverflow article, the differences are too many and it's very difficult to separate the insignificant from the significant.

http://stackoverflow.com/questions/27....

Many thanks BoiseBaked