Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 13 build error #187

Open
JWChoi1996 opened this issue Jun 6, 2023 · 3 comments
Open

Android 13 build error #187

JWChoi1996 opened this issue Jun 6, 2023 · 3 comments

Comments

@JWChoi1996
Copy link

Hi, I have a problem while building tflite-vx-delegate for Android 13.

I entered the below code,
cmake .. -DCMAKE_TOOLCHAIN_FILE=$NDK_PATH/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=33 -DANDROID_ABI=arm64-v8a -DCONFIG=vim3_android -DTIM_VX_INSTALL=$WORKSPACE/wksp/tim-vx -DFETCHCONTENT_SOURCE_DIR_TENSORFLOW=$TF_PATH

then, I got error messages.
[100%] Linking CXX shared library libvx_delegate.so ld: error: undefined symbol: tim::transform::LayoutInference(std::__ndk1::shared_ptr<tim::vx::Graph> const&, std::__ndk1::shared_ptr<tim::vx::Context>&, std::__ndk1::map<std::__ndk1::shared_ptr<tim::vx::Tensor>, std::__ndk1::shared_ptr<tim::transform::IPermuteVector>, std::__ndk1::less<std::__ndk1::shared_ptr<tim::vx::Tensor> >, std::__ndk1::allocator<std::__ndk1::pair<std::__ndk1::shared_ptr<tim::vx::Tensor> const, std::__ndk1::shared_ptr<tim::transform::IPermuteVector> > > >) '>>> referenced by delegate_main.cc:640 (/home/jwchoi/Desktop/mobile_streaming/wksp/tflite-vx-delegate/delegate_main.cc:640) '>>> CMakeFiles/vx_delegate.dir/delegate_main.cc.o:(vx::delegate::Delegate::Invoke(vx::delegate::OpData const&, TfLiteContext*, TfLiteNode*)) ~~ ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors) clang++: error: linker command failed with exit code 1 (use -v to see invocation) CMakeFiles/vx_delegate.dir/build.make:243: recipe for target 'libvx_delegate.so' failed

I built tim-vx using below code.
cmake .. -DCONFIG=A311D

Did I do something wrong?

@sunshinemyson
Copy link
Contributor

@JWChoi1996 ,

For android build, it take some efforts. We do following steps:

  1. Make sure you have our OpenVX driver build properly with Android environment.
  2. Build tim-vx with NDK-toolchain and with the openvx driver build by step 1.
  3. Build vx-delegate with NDK-toolchain.

Thanks

@JWChoi1996
Copy link
Author

JWChoi1996 commented Jun 7, 2023

Thank you for your answer.
Oh, I didn't know i had to build an OpenVX driver with Android environment.
So, should i have to pre-build OpenVX driver for Android and move it to TARGET folder like 'arm_android9_A311D_6.4.3' for OXVDRV_LIBRARIES?

In addition, when i use -DCONFIG=vim3_android option for building tim-vx, i got below error.
ld: error: ../../arm_android9_A311D_6.4.3/lib/libCLC.so is incompatible with aarch64linux
ld: error: ../../arm_android9_A311D_6.4.3/lib/libGAL.so is incompatible with aarch64linux
ld: error: ../../arm_android9_A311D_6.4.3/lib/libOpenVX.so is incompatible with aarch64linux
ld: error: ../../arm_android9_A311D_6.4.3/lib/libOpenVXU.so is incompatible with aarch64linux
ld: error: ../../arm_android9_A311D_6.4.3/lib/libVSC.so is incompatible with aarch64linux
ld: error: ../../arm_android9_A311D_6.4.3/lib/libarchmodelSw.so is incompatible with aarch64linux
ld: error: ../../arm_android9_A311D_6.4.3/lib/libNNArchPerf.so is incompatible with aarch64linux

Your answer is that when i build OpenVX for android, these errors will be fixed, right?

Thanks.

@sunshinemyson
Copy link
Contributor

@JWChoi1996

Yes, you need to rebuild driver library with Android.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants