Ask Your Question
4

Missing tbb lib for armeabi in 2.4.3 for Android?

asked 2012-11-14 02:55:53 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

Hi,

I'm trying to compile a native application with OpenCV 2.4.3 for Android. I have no problem compiling and linking for armeabi-v7a since the lib libtbb.a is present under sdk/native/3rdparty/libs/armeabi-v7a.

However, this lib is not present under sdk/native/3rdparty/libs/armeabi and thus, I'm getting linkage errors such as : undefined reference to 'vtable for tbb::task'.

Is this lib really missing or am I missing something? Can I simply use the same lib as for armeabi-v7a?

Guillaume

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
6

answered 2012-11-16 01:07:28 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

  1. As I know, there is no armeabi (arm-v5 and arm-v6) processors with more then one core, that is used in Android devices. So, libtbb is not added to sdk because it is useless. OpenCV for armeabi does not use libtbb at all.
  2. No, you cannot use armeabi-v7a library on armeabi devices. This architectures has different instruction set.
  3. If you want to build libtbb and enable TBB support in OpenCV you need to rebuild library from source code. Add -DWITH_TBB=ON to cmake options to enable it.
  4. Also I have found a mistake in OpenCV.mk file. In case of static linking, it tries to link binaries against libtbb for all architectures even for armeabi and mips. The temporary work around for armeabi build is to remove libtbb from 3rd party library list in sdk/native/jni/OpenCV.mk. Line 32 must be:

    OPENCV_3RDPARTY_COMPONENTS:= libjpeg libpng libtiff libjasper IlmImf

I have added issue on bug tracker.

edit flag offensive delete link more

Comments

Thanks for the answer. Where can I enable the "WITH_TBB=ON" in OpenCV AndroidSDK. Can you give me the steps to build the android OpenCV SDK with TBB enabled?

karthi gravatar imagekarthi ( 2013-06-22 07:36:38 -0600 )edit
0

answered 2012-11-16 09:09:33 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

Thanks for the explanations Alexander! I figured it out before seeing your answer and modified OpenCV.mk with the following lines so that it's compatible with armeabi and armeabi-v7a:

ifeq ($(TARGET_ARCH_ABI),armeabi)
    OPENCV_3RDPARTY_COMPONENTS:=libjpeg libpng libtiff libjasper IlmImf
endif
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
    OPENCV_3RDPARTY_COMPONENTS:=tbb libjpeg libpng libtiff libjasper IlmImf
endif
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-11-14 02:55:53 -0600

Seen: 2,721 times

Last updated: Nov 16 '12