joyycom / VNN

VNN是由欢聚集团(Joyy Inc.)推出的高性能、轻量级神经网络部署框架。目前已为Hago、VOO、VFly、马克相机等App提供20余种AI能力的支持,覆盖直播、短视频、视频编辑等泛娱乐场景和工程场景
Other
1.02k stars 206 forks source link

Android demo is giving issue at compiling #5

Closed soham24 closed 2 years ago

soham24 commented 2 years ago

/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

mrbrantofgithub commented 2 years ago

cmake: 3.6.4111459, ndk: 21.3.6528147

soham24 commented 2 years ago

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 functionJava_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 functionJava_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 functionJava_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.

soham24 commented 2 years ago

I am building this on Linux machine / ubuntu

soham24 commented 2 years ago

https://we.tl/t-XudCZpAQD1

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

@mrbrantofgithub

mrbrantofgithub commented 2 years ago

Sorry! Because of some mistakes, android so files are not newest. Now you can update so files, and try to build again.

soham24 commented 2 years ago

@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.