Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

Compiling TBB with Android NDK r9c in Windows 7

Alex_H_
Beginner
829 Views

Hi,

My working platform:

WIndows 7 + Android NDK r9c + Cygwin installed

I download Intel TBB (tbb42_20131118oss), and trying to compile it for arm/x86, what I did is

in Windows command box, change to the top-level directory of Intel TBB source tree, then give the command

ndk-build target=android tbb

The error I got are:

src/Makefile:29: ../build common.inc: No such file or directory

c:/android/android-ndk-r9c/build/core/build-all.mk:89: Android NDK: WARNING: There are no modules to build in this project!

make.exe: *** No rule to make target '../build/common.inc'. Stop.

in TBB source tree, .\build\index.html, it seems that it is for Linux? 

Should I build TBB for Android only in Linux box, or anything I did wrong? 

Thanks.

Alex

0 Kudos
1 Solution
Vladimir_P_1234567890
829 Views

Hello, try  the follwing command

ndk-build target=android tbb -C c:\program_code\tbb42_20131118oss\jni tbb_os=windows

ndk-build needs to be run from jni folder in this case.

--Vladimir

View solution in original post

0 Kudos
6 Replies
Vladimir_P_1234567890
829 Views

Somehow it did not recognize that this is a windows build.

pls try the following command

ndk-build target=android tbb tbb_os=windows

--Vladimir

0 Kudos
Alex_H_
Beginner
829 Views

Hi Valdimir,

Thanks for reply. I tried your solution, but still no luck. I append a "-d" flag in my command line 

Here the output with this command line

ndk-build target=android tbb -C c:\program_code\tbb42_20131118oss -d tbb_os=windows

the output is attached to this message, seems that it always working with ../src/Makefile, but not the top-level Makefile, is that the problem? Thanks for your time.

Alex

 

0 Kudos
Alex_H_
Beginner
829 Views

Hi Valdimir,

I finally gave up in Windows 7, and turn to Ubuntu box. The first tries still failed, so I tried to get into ".\src" folder, then run ndk-build, this time, everything just goes well. Not yet tested these binary files in Android App, will tried later. 

I still got one question is, anything I did wrong in Windows platform? or, you suggest that we do this compilation in Linux in the future?

Thanks.

--------------------------------

In Windows 7, I tested several other way, the only way I can get a bit closer is:

1. use bash shell

2. enter ".\src" folder of tbb source tree

3. run command line

ndk-build target=android tbb

4. it starts compiling, but complaining a lot of file (header files) missing, for example "../../include/tbb/tbb_staddef.h"

also, there is an error that says

getconf: Unrecognized variable 'GNU_LIBC_VERSION'

maybe that is the problem in windows that can not find gcc

 

----------------

 

0 Kudos
Vladimir_P_1234567890
830 Views

Hello, try  the follwing command

ndk-build target=android tbb -C c:\program_code\tbb42_20131118oss\jni tbb_os=windows

ndk-build needs to be run from jni folder in this case.

--Vladimir

0 Kudos
Alex_H_
Beginner
829 Views

Hi Vladimir,

That was it. I can make it in Windows 7 in the way you provide. x86 and arm are fine.

Thank you very much. 

Alex

0 Kudos
Vladimir_P_1234567890
829 Views

Great, we'll try to add more diagnostics to android makefile files.

--Vladimir

0 Kudos
Reply