Open themikan opened 1 year ago
up,您好,参考readme做法,我在完成第二步,将ncnn20220729-android-vulkan替换到jni目录,并同步修改cmakeLists.txt后,直接在Android studio中编译本项目app,提示以下报错,麻烦帮忙看看。
./gradlew :app:assembleDebug Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/0 Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/ 01 Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01 Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/ 01 Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/0 Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/ 01 Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01 Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/ 01 Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01 Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/ 01 Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01 Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/ 01 Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01 Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/ 01 Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Task :app:externalNativeBuildDebug FAILED Build mobilenetssdncnn_armeabi-v7a ninja: Entering directory E:\Code_open\ncnn\exampleProj\ncnn-android-mobilenetssd\app\.cxx\cmake\debug\armeabi-v7a' [1/2] Building CXX object CMakeFiles/mobilenetssdncnn.dir/mobilenetssdncnn_jni.cpp.o [2/2] Linking CXX shared library E:\Code_open\ncnn\exampleProj\ncnn-android-mobilenetssd\app\build\intermediates\cmake\debug\obj\armeabi -v7a\libmobilenetssdncnn.so Build mobilenetssdncnn_arm64-v8a ninja: Entering directoryE:\Code_open\ncnn\exampleProj\ncnn-android-mobilenetssd\app.cxx\cmake\debug\arm64-v8a' [1/1] Linking CXX shared library E:\Code_open\ncnn\exampleProj\ncnn-android-mobilenetssd\app\build\intermediates\cmake\debug\obj\arm64-v 8a\libmobilenetssdncnn.so FAILED: E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/build/intermediates/cmake/debug/obj/arm64-v8a/libmobilenetssdncnn.so
E:\Code_open\ncnn\exampleProj\ncnn-android-mobilenetssd\app\.cxx\cmake\debug\armeabi-v7a' [1/2] Building CXX object CMakeFiles/mobilenetssdncnn.dir/mobilenetssdncnn_jni.cpp.o [2/2] Linking CXX shared library E:\Code_open\ncnn\exampleProj\ncnn-android-mobilenetssd\app\build\intermediates\cmake\debug\obj\armeabi -v7a\libmobilenetssdncnn.so Build mobilenetssdncnn_arm64-v8a ninja: Entering directory
cmd.exe /C "cd . && C:\Android\sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linux- android24 --gcc-toolchain=C:/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Android/sdk/ndk/21.4.7075 529/toolchains/llvm/prebuilt/windows-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-prote ctor-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -O0 -fno-limit-debug-info -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,libmobilenetssdncnn.so -o E:\Code_open\ncnn\exampleProj\ncnn-android-mobilenetssd\app\b uild\intermediates\cmake\debug\obj\arm64-v8a\libmobilenetssdncnn.so CMakeFiles/mobilenetssdncnn.dir/mobilenetssdncnnjni.cpp.o E:/Code open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libncnn.a -ljnigraphics -fop enmp -static-openmp C:/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/24/lib vulkan.so E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libglslang .a E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libSPIRV.a E:/Cod e_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libMachineIndependent.a E: /Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libOGLCompiler.a E:/Co de_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libOSDependent.a -pthread E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libGenericCodeGen.a -landroid -ljnigraphics -llog -latomic -lm && cd ." E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libncnn.a(gpu.cpp.o) : In function ncnn::VulkanDevicePrivate::destroy_dummy_buffer_image()': gpu.cpp:(.text._ZN4ncnn19VulkanDevicePrivate26destroy_dummy_buffer_imageEv+0x20): undefined reference toaarch64_ldadd4_acq_rel' gpu.cpp:(.text._ZN4ncnn19VulkanDevicePrivate26destroy_dummy_buffer_imageEv+0x74): undefined reference to __aarch64_ldadd4_acq_rel' gpu.cpp:(.text._ZN4ncnn19VulkanDevicePrivate26destroy_dummy_buffer_imageEv+0xc4): undefined reference toaarch64_ldadd4_acq_rel' E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libncnn.a(gpu.cpp.o) : In function ncnn::VulkanDevicePrivate::~VulkanDevicePrivate()': gpu.cpp:(.text._ZN4ncnn19VulkanDevicePrivateD2Ev[_ZN4ncnn19VulkanDevicePrivateD2Ev]+0x28): undefined reference to__aarch64_ldadd4acq rel' gpu.cpp:(.text._ZN4ncnn19VulkanDevicePrivateD2Ev[_ZN4ncnn19VulkanDevicePrivateD2Ev]+0x78): undefined reference to __aarch64_ldadd4_acq_ rel' E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libncnn.a(gpu.cpp.o) :gpu.cpp:(.text._ZN4ncnn19VulkanDevicePrivateD2Ev[_ZN4ncnn19VulkanDevicePrivateD2Ev]+0xc8): more undefined references to__aarch64_ldad d4_acq_rel' follow clang++: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed.
ncnn::VulkanDevicePrivate::destroy_dummy_buffer_image()': gpu.cpp:(.text._ZN4ncnn19VulkanDevicePrivate26destroy_dummy_buffer_imageEv+0x20): undefined reference to
__aarch64_ldadd4_acq_rel' gpu.cpp:(.text._ZN4ncnn19VulkanDevicePrivate26destroy_dummy_buffer_imageEv+0xc4): undefined reference to
ncnn::VulkanDevicePrivate::~VulkanDevicePrivate()': gpu.cpp:(.text._ZN4ncnn19VulkanDevicePrivateD2Ev[_ZN4ncnn19VulkanDevicePrivateD2Ev]+0x28): undefined reference to
__aarch64_ldadd4_acq_ rel' E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libncnn.a(gpu.cpp.o) :gpu.cpp:(.text._ZN4ncnn19VulkanDevicePrivateD2Ev[_ZN4ncnn19VulkanDevicePrivateD2Ev]+0xc8): more undefined references to
FAILURE: Build failed with an exception.
Build command failed. Error while executing process C:\Android\sdk\cmake\3.10.2.4988404\bin\ninja.exe with arguments {-C E:\Code_open\ncnn\exampleProj\ncnn- android-mobilenetssd\app.cxx\cmake\debug\arm64-v8a mobilenetssdncnn} ninja: Entering directory E:\Code_open\ncnn\exampleProj\ncnn-android-mobilenetssd\app\.cxx\cmake\debug\arm64-v8a' [1/1] Linking CXX shared library E:\Code_open\ncnn\exampleProj\ncnn-android-mobilenetssd\app\build\intermediates\cmake\debug\obj\arm64 -v8a\libmobilenetssdncnn.so FAILED: E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/build/intermediates/cmake/debug/obj/arm64-v8a/libmobilenetssdncnn. so cmd.exe /C "cd . && C:\Android\sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linu x-android24 --gcc-toolchain=C:/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Android/sdk/ndk/21.4.70 75529/toolchains/llvm/prebuilt/windows-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-pro tector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -O0 -fno-limit-debug-info -Wl,--exclude-lib s,libgcc.a -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libatomic.a -static-libstdc++ -Wl,--build-id -Wl,--fatal-warnings -Wl,--n o-undefined -Qunused-arguments -shared -Wl,-soname,libmobilenetssdncnn.so -o E:\Code_open\ncnn\exampleProj\ncnn-android-mobilenetssd\app \build\intermediates\cmake\debug\obj\arm64-v8a\libmobilenetssdncnn.so CMakeFiles/mobilenetssdncnn.dir/mobilenetssdncnn_jni.cpp.o E:/Cod e_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libncnn.a -ljnigraphics -f openmp -static-openmp C:/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/24/l ibvulkan.so E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libglsla ng.a E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libSPIRV.a E:/C ode_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libMachineIndependent.a E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libOGLCompiler.a E:/ Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libOSDependent.a -pthre ad E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libGenericCodeGen .a -landroid -ljnigraphics -llog -latomic -lm && cd ." E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libncnn.a(gpu.cpp. o): In functionncnn::VulkanDevicePrivate::destroy_dummy_buffer_image()': gpu.cpp:(.text._ZN4ncnn19VulkanDevicePrivate26destroy_dummy_buffer_imageEv+0x20): undefined reference to __aarch64_ldadd4_acq_rel' gpu.cpp:(.text._ZN4ncnn19VulkanDevicePrivate26destroy_dummy_buffer_imageEv+0x74): undefined reference toaarch64_ldadd4_acq_rel' gpu.cpp:(.text._ZN4ncnn19VulkanDevicePrivate26destroy_dummy_buffer_imageEv+0xc4): undefined reference to __aarch64_ldadd4_acq_rel' E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libncnn.a(gpu.cpp. o): In functionncnn::VulkanDevicePrivate::~VulkanDevicePrivate()': gpu.cpp:(.text._ZN4ncnn19VulkanDevicePrivateD2Ev[_ZN4ncnn19VulkanDevicePrivateD2Ev]+0x28): undefined reference to __aarch64_ldadd4_ac q_rel' gpu.cpp:(.text._ZN4ncnn19VulkanDevicePrivateD2Ev[_ZN4ncnn19VulkanDevicePrivateD2Ev]+0x78): undefined reference toaarch64_ldadd4_ac q_rel' E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libncnn.a(gpu.cpp. o):gpu.cpp:(.text._ZN4ncnn19VulkanDevicePrivateD2Ev[_ZN4ncnn19VulkanDevicePrivateD2Ev]+0xc8): more undefined references to `__aarch64_ld add4_acq_rel' follow clang++: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed.
E:\Code_open\ncnn\exampleProj\ncnn-android-mobilenetssd\app\.cxx\cmake\debug\arm64-v8a' [1/1] Linking CXX shared library E:\Code_open\ncnn\exampleProj\ncnn-android-mobilenetssd\app\build\intermediates\cmake\debug\obj\arm64 -v8a\libmobilenetssdncnn.so FAILED: E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/build/intermediates/cmake/debug/obj/arm64-v8a/libmobilenetssdncnn. so cmd.exe /C "cd . && C:\Android\sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linu x-android24 --gcc-toolchain=C:/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Android/sdk/ndk/21.4.70 75529/toolchains/llvm/prebuilt/windows-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-pro tector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -O0 -fno-limit-debug-info -Wl,--exclude-lib s,libgcc.a -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libatomic.a -static-libstdc++ -Wl,--build-id -Wl,--fatal-warnings -Wl,--n o-undefined -Qunused-arguments -shared -Wl,-soname,libmobilenetssdncnn.so -o E:\Code_open\ncnn\exampleProj\ncnn-android-mobilenetssd\app \build\intermediates\cmake\debug\obj\arm64-v8a\libmobilenetssdncnn.so CMakeFiles/mobilenetssdncnn.dir/mobilenetssdncnn_jni.cpp.o E:/Cod e_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libncnn.a -ljnigraphics -f openmp -static-openmp C:/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/24/l ibvulkan.so E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libglsla ng.a E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libSPIRV.a E:/C ode_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libMachineIndependent.a E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libOGLCompiler.a E:/ Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libOSDependent.a -pthre ad E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libGenericCodeGen .a -landroid -ljnigraphics -llog -latomic -lm && cd ." E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libncnn.a(gpu.cpp. o): In function
__aarch64_ldadd4_acq_rel' gpu.cpp:(.text._ZN4ncnn19VulkanDevicePrivate26destroy_dummy_buffer_imageEv+0x74): undefined reference to
__aarch64_ldadd4_acq_rel' E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libncnn.a(gpu.cpp. o): In function
__aarch64_ldadd4_ac q_rel' gpu.cpp:(.text._ZN4ncnn19VulkanDevicePrivateD2Ev[_ZN4ncnn19VulkanDevicePrivateD2Ev]+0x78): undefined reference to
up,您好,参考readme做法,我在完成第二步,将ncnn20220729-android-vulkan替换到jni目录,并同步修改cmakeLists.txt后,直接在Android studio中编译本项目app,提示以下报错,麻烦帮忙看看。
./gradlew :app:assembleDebug Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/0 Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/ 01 Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01 Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/ 01 Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/0 Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/ 01 Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01 Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/ 01 Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01 Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/ 01 Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01 Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/ 01 Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01 Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/ 01 Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/reposito ry2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
cmd.exe /C "cd . && C:\Android\sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linux- android24 --gcc-toolchain=C:/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Android/sdk/ndk/21.4.7075 529/toolchains/llvm/prebuilt/windows-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-prote ctor-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -O0 -fno-limit-debug-info -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,libmobilenetssdncnn.so -o E:\Code_open\ncnn\exampleProj\ncnn-android-mobilenetssd\app\b uild\intermediates\cmake\debug\obj\arm64-v8a\libmobilenetssdncnn.so CMakeFiles/mobilenetssdncnn.dir/mobilenetssdncnnjni.cpp.o E:/Code open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libncnn.a -ljnigraphics -fop enmp -static-openmp C:/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/24/lib vulkan.so E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libglslang .a E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libSPIRV.a E:/Cod e_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libMachineIndependent.a E: /Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libOGLCompiler.a E:/Co de_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libOSDependent.a -pthread E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libGenericCodeGen.a -landroid -ljnigraphics -llog -latomic -lm && cd ." E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libncnn.a(gpu.cpp.o) : In function
ncnn::VulkanDevicePrivate::destroy_dummy_buffer_image()': gpu.cpp:(.text._ZN4ncnn19VulkanDevicePrivate26destroy_dummy_buffer_imageEv+0x20): undefined reference to
aarch64_ldadd4_acq_rel'gpu.cpp:(.text._ZN4ncnn19VulkanDevicePrivate26destroy_dummy_buffer_imageEv+0x74): undefined reference to
__aarch64_ldadd4_acq_rel' gpu.cpp:(.text._ZN4ncnn19VulkanDevicePrivate26destroy_dummy_buffer_imageEv+0xc4): undefined reference to
aarch64_ldadd4_acq_rel'E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libncnn.a(gpu.cpp.o) : In function
ncnn::VulkanDevicePrivate::~VulkanDevicePrivate()': gpu.cpp:(.text._ZN4ncnn19VulkanDevicePrivateD2Ev[_ZN4ncnn19VulkanDevicePrivateD2Ev]+0x28): undefined reference to
__aarch64_ldadd4acq rel' gpu.cpp:(.text._ZN4ncnn19VulkanDevicePrivateD2Ev[_ZN4ncnn19VulkanDevicePrivateD2Ev]+0x78): undefined reference to__aarch64_ldadd4_acq_ rel' E:/Code_open/ncnn/exampleProj/ncnn-android-mobilenetssd/app/src/main/jni/ncnn-20220729-android-vulkan/arm64-v8a/lib/libncnn.a(gpu.cpp.o) :gpu.cpp:(.text._ZN4ncnn19VulkanDevicePrivateD2Ev[_ZN4ncnn19VulkanDevicePrivateD2Ev]+0xc8): more undefined references to
__aarch64_ldad d4_acq_rel' follow clang++: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed.FAILURE: Build failed with an exception.