Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Chen_T_
Beginner
452 Views

Can I build TBB44 for ios arm64

Jump to solution

hello,

      I have built TBB44 for IOS with armv7 architecture,but I can not find corresponding header file in ../include/tbb/machine. Where can I get the header file for arm64 architecture? Thanks.

 

0 Kudos
1 Solution
452 Views

hello Chen,

macos_common.h is used there. you need to take one of the latest updates, for example update 5 of 4.4

simple `make arch=arm64 target=ios` command should work there.

--Vladimir

View solution in original post

12 Replies
453 Views

hello Chen,

macos_common.h is used there. you need to take one of the latest updates, for example update 5 of 4.4

simple `make arch=arm64 target=ios` command should work there.

--Vladimir

View solution in original post

Chen_T_
Beginner
452 Views

Thanks a lot.I will have a try right away.

Chen_T_
Beginner
452 Views

hello Vladimir,

I build with the command " make arch=arm64 target=ios", and use the release version. 

but unlike armv7 library, I ran my app on IPAD mini with this library will encounter "dyld: Library not loaded: @rpath/libtbb.dylib   Reason: no suitable image found"

Do you have any suggestion about that? 

 

Chen Tao

452 Views

I have a few questions that can help with diagnostics:

1. have you set up "Runpath Search Path" to this library or/and have you built fat library (arm+arm64)?
2. in general you can check "Log Dinamic Linker API Usage" and "Log Library Loads" checkboxes on Diagnostics page of current Scheme and you will get most of the diagnostics info in the output window. 

--Vladimir

Chen_T_
Beginner
452 Views

hello Vladimir Polin,

       Thanks for your advise.By now I have two app ,one used armv7 library ran on iphone5 which can ran correctly,the other use arm64 library ran on ipad mini and will have the above mentioned problem. By checking  "Log Dinamic Linker API Usage" and "Log Library Loads" , I found the log is different for two app, especially the log of  wrong app show that the app packge and 2 system dylib   will be unloaded after  first loaded. I will trace this and hope can find the root cause, any suggestion is welcome. Thank you very much for your fast and efficient help.

ChenTao

Chen_T_
Beginner
452 Views

hello Vladimir Polin,

        I found that the problem is the arm64 dynamic library can not be loaded by dyld program correctly. I trace in dyld source file and find it is too complicated for me to trace the root cause in short time. 

        I only use "make arch=arm64 target=ios" to generate dylib files, is it enough? Do you have any built arm64 dylib libraries I can download to have a try? Thanks a lot.

 

Chentao 

       

452 Views

Hello Chentao,

have you signed the binary? usually such errors can apper in case signature of binary is different from signature of application.

security unlock-keychain
codesign -f -s "<your iPhone Developer certificate>" <build_ios_path>/libtbb.dylib

could you attach the log? you can drop a private message if you want. 
--Vladimir

Chen_T_
Beginner
452 Views

Hello Vladimir Polin,

        It works.!!!! Thank you very much. I will use tbb on android in the near future, hope need not bother you again :)

 

Chentao

452 Views

Hello Chentao,

thank you for letting us know that the issue is resolved.

--Vladimir

Chen_T_
Beginner
452 Views

hello Vladimir,

       I use "ndk-build target=android arch=arm64" it can output corresponding .so file. yet I try "armeabi-v7a" it will have problem, the log info is as follows, can you give me some suggestion? Thanks.

[chentao@localhost tbb44_20160526oss]$ ndk-build target=android arch=armeabi-v7a
build/android.linux.inc:36: "NDK version r11b"
/home/chentao/work/android-ndk-r11b/build/core/build-all.mk:89: Android NDK: WARNING: There are no modules to build in this project!    
Created ./build/linux_armeabi-v7a_gcc_android_cc4.9_NDKr11b_version_android-21_release directory
/usr/bin/make -C "./build/linux_armeabi-v7a_gcc_android_cc4.9_NDKr11b_version_android-21_release"  -r -f ../../build/Makefile.tbb cfg=release
make[1]: 进入目录“/home/chentao/work/tbb44_20160526oss/build/linux_armeabi-v7a_gcc_android_cc4.9_NDKr11b_version_android-21_release”
../../build/android.linux.inc:36: "NDK version r11b"
../../build/Makefile.tbb:31: CONFIG: cfg=release arch=armeabi-v7a compiler=gcc target=android runtime=android_cc4.9_NDKr11b_version_android-21
/home/chentao/work/android-ndk-r11b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -o concurrent_hash_map.o -c -MMD -O2 -DUSE_PTHREAD -D_GLIBCXX_HAVE_FENV_H --sysroot=/home/chentao/work/android-ndk-r11b/platforms/android-21/arch-arm -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor    -I../../src -I../../src/rml/include -I../../include ../../src/tbb/concurrent_hash_map.cpp
In file included from ../../include/tbb/tbb_machine.h:247:0,
                 from ../../include/tbb/spin_rw_mutex.h:25,
                 from ../../include/tbb/concurrent_hash_map.h:43,
                 from ../../src/tbb/concurrent_hash_map.cpp:21:
../../include/tbb/machine/gcc_armv7.h:31:2: error: #error compilation requires an ARMv7-a architecture.
 #error compilation requires an ARMv7-a architecture.

 

 

452 Views

hello,

just use arm:

ndk-build target=android arch=arm 

it calls -march=armv7-a compiler option underneath

--Vladimir

Chen_T_
Beginner
452 Views

hello Vladimir,

Thanks a lot, it did work.

Is the corresponding relationship  as follows ??

arch=arm                              ------>  armeabi-v7a

arch=arm64                          -------> arm64-v8a

 

Is there any command for armeabi architecture then?

Reply