Android demo is giving issue at compiling
soham24 opened this issue · 6 comments
/src/main/cpp/vnnjni.cpp:59: undefined reference to `VNN_Destroy_Face'
/src/main/cpp/vnnjni.cpp:1197: undefined reference to `VNN_Destroy_ObjCount'
./../src/main/cpp/vnnjni.cpp:1313: undefined reference to `VNN_Destroy_DocRect'
Can I know a specific version of the CMake tool and NDK version which is used at the time of compiling demos
cmake: 3.6.4111459, ndk: 21.3.6528147
Thanks @mrbrantofgithub
I have used the given config but error is same
let me give you the complete log.
> Build command failed. Error while executing process /home/user1/Android/Sdk/cmake/3.6.4111459/bin/cmake with arguments {--build /home/user1/Downloads/VNN-master/demos/Android/vnn_android_demo/vnnlib/.externalNativeBuild/cmake/release/arm64-v8a --target vnnjni} [1/2] Building CXX object CMakeFiles/vnnjni.dir/src/main/cpp/vnnjni.cpp.o [2/2] Linking CXX shared library ../../../../build/intermediates/cmake/release/obj/arm64-v8a/libvnnjni.so FAILED: : && /home/user1/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=aarch64-none-linux-android21 --gcc-toolchain=/home/user1/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64 --sysroot=/home/user1/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -std=c++11 -O2 -DNDEBUG -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libatomic.a -static-libstdc++ -Wl,--build-id -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments -shared -Wl,-soname,libvnnjni.so -o ../../../../build/intermediates/cmake/release/obj/arm64-v8a/libvnnjni.so CMakeFiles/vnnjni.dir/src/main/cpp/vnnjni.cpp.o /home/user1/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/21/liblog.so /home/user1/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/libdl.a /home/user1/Android/Sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/21/libandroid.so ../../../../src/main/cpp/libs/arm64-v8a/libvnn_core.so ../../../../src/main/cpp/libs/arm64-v8a/libvnn_kit.so ../../../../src/main/cpp/libs/arm64-v8a/libvnn_face.so ../../../../src/main/cpp/libs/arm64-v8a/libvnn_faceparser.so ../../../../src/main/cpp/libs/arm64-v8a/libvnn_stylizing.so ../../../../src/main/cpp/libs/arm64-v8a/libvnn_face_reenactment.so ../../../../src/main/cpp/libs/arm64-v8a/libvnn_gesture.so ../../../../src/main/cpp/libs/arm64-v8a/libvnn_objcount.so ../../../../src/main/cpp/libs/arm64-v8a/libvnn_objtracking.so ../../../../src/main/cpp/libs/arm64-v8a/libvnn_docrect.so ../../../../src/main/cpp/libs/arm64-v8a/libvnn_general.so ../../../../src/main/cpp/libs/arm64-v8a/libvnn_classifying.so -latomic -lm && : CMakeFiles/vnnjni.dir/src/main/cpp/vnnjni.cpp.o: In function
Java_com_duowan_vnnlib_VNN_destroyFace':
/home/user1/Downloads/VNN-master/demos/Android/vnn_android_demo/vnnlib/src/main/cpp/vnnjni.cpp:59: undefined reference to VNN_Destroy_Face' CMakeFiles/vnnjni.dir/src/main/cpp/vnnjni.cpp.o: In function
Java_com_duowan_vnnlib_VNN_destroyObjCount':
/home/user1/Downloads/VNN-master/demos/Android/vnn_android_demo/vnnlib/src/main/cpp/vnnjni.cpp:1197: undefined reference to VNN_Destroy_ObjCount' CMakeFiles/vnnjni.dir/src/main/cpp/vnnjni.cpp.o: In function
Java_com_duowan_vnnlib_VNN_destroyDocRect':
/home/user1/Downloads/VNN-master/demos/Android/vnn_android_demo/vnnlib/src/main/cpp/vnnjni.cpp:1313: undefined reference to VNN_Destroy_DocRect' clang++: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed.
I am building this on Linux machine / ubuntu
I have uploaded the demo project, (which is getting failed to build) on the above link.
this was the error: undefined reference to 'VNN_Destroy_DocRect'
I wonder why is this coming even when all files are properly provided in the path
Sorry! Because of some mistakes, android so files are not newest. Now you can update so files, and try to build again.
@mrbrantofgithub thank you so much for your quick response. it is working fine now.
You guys are doing very good work by open-sourcing this. much respect.