首页 PaddleOCR 帖子详情
移动端移植进有OpenCV的例程起冲突
收藏
快速回复
PaddleOCR 问答OCR 1034 1
移动端移植进有OpenCV的例程起冲突
收藏
快速回复
PaddleOCR 问答OCR 1034 1

移动端自带了OpenCV库,官方样例没有问题,但移植进了有OpenCV的工程就报以下错误:

 

* What went wrong:
Execution failed for task ':app:externalNativeBuildDebug'.
> Build command failed.
Error while executing process D:\02-Android-Resource\Android-sdk\cmake\3.10.2.4988404\bin\ninja.exe with arguments {-C D:\02-Android-Resource\Android-Project\5-CarDemo\8_Car2021_Example_v1.1\app\.cxx\cmake\debug\arm64-v8a Native}
ninja: Entering directory `D:\02-Android-Resource\Android-Project\5-CarDemo\8_Car2021_Example_v1.1\app\.cxx\cmake\debug\arm64-v8a'
[1/11] Building CXX object CMakeFiles/Native.dir/predictor_input.cpp.o
[2/11] Building CXX object CMakeFiles/Native.dir/predictor_output.cpp.o
[3/11] Building CXX object CMakeFiles/Native.dir/ppredictor.cpp.o
[4/11] Building CXX object CMakeFiles/Native.dir/ocr_db_post_process.cpp.o
[5/11] Building CXX object CMakeFiles/Native.dir/ocr_clipper.cpp.o
[6/11] Building CXX object CMakeFiles/Native.dir/preprocess.cpp.o
[7/11] Building CXX object CMakeFiles/Native.dir/ocr_cls_process.cpp.o
[8/11] Building CXX object CMakeFiles/Native.dir/ocr_crnn_process.cpp.o
[9/11] Building CXX object CMakeFiles/Native.dir/ocr_ppredictor.cpp.o
[10/11] Building CXX object CMakeFiles/Native.dir/native.cpp.o
[11/11] Linking CXX shared library D:\02-Android-Resource\Android-Project\5-CarDemo\8_Car2021_Example_v1.1\app\build\intermediates\cmake\debug\obj\arm64-v8a\libNative.so
FAILED: D:/02-Android-Resource/Android-Project/5-CarDemo/8_Car2021_Example_v1.1/app/build/intermediates/cmake/debug/obj/arm64-v8a/libNative.so
cmd.exe /C "cd . && D:\02-Android-Resource\android-ndk-r20b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linux-android23 --gcc-toolchain=D:/02-Android-Resource/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=D:/02-Android-Resource/android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -frtti -fexceptions -Wno-format -ffast-math -Ofast -Os -fvisibility=hidden -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -O0 -fno-limit-debug-info -fno-experimental-isel -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments -Wl,-z,noexecstack -Wl,--gc-sections -Wl,-z,nocopyreloc -shared -Wl,-soname,libNative.so -o D:\02-Android-Resource\Android-Project\5-CarDemo\8_Car2021_Example_v1.1\app\build\intermediates\cmake\debug\obj\arm64-v8a\libNative.so @CMakeFiles/Native.rsp && cmd.exe /C "cd /D D:\02-Android-Resource\Android-Project\5-CarDemo\8_Car2021_Example_v1.1\app\.cxx\cmake\debug\arm64-v8a && D:\02-Android-Resource\Android-sdk\cmake\3.10.2.4988404\bin\cmake.exe -E copy D:/02-Android-Resource/Android-Project/5-CarDemo/8_Car2021_Example_v1.1/app/src/main/cpp/../../../PaddleLite/cxx/libs/arm64-v8a/libc++_shared.so D:\02-Android-Resource\Android-Project\5-CarDemo\8_Car2021_Example_v1.1\app\build\intermediates\cmake\debug\obj\arm64-v8a/libc++_shared.so && cd /D D:\02-Android-Resource\Android-Project\5-CarDemo\8_Car2021_Example_v1.1\app\.cxx\cmake\debug\arm64-v8a && D:\02-Android-Resource\Android-sdk\cmake\3.10.2.4988404\bin\cmake.exe -E copy D:/02-Android-Resource/Android-Project/5-CarDemo/8_Car2021_Example_v1.1/app/src/main/cpp/../../../PaddleLite/cxx/libs/arm64-v8a/libpaddle_light_api_shared.so D:\02-Android-Resource\Android-Project\5-CarDemo\8_Car2021_Example_v1.1\app\build\intermediates\cmake\debug\obj\arm64-v8a/libpaddle_light_api_shared.so && cd /D D:\02-Android-Resource\Android-Project\5-CarDemo\8_Car2021_Example_v1.1\app\.cxx\cmake\debug\arm64-v8a && D:\02-Android-Resource\Android-sdk\cmake\3.10.2.4988404\bin\cmake.exe -E copy D:/02-Android-Resource/Android-Project/5-CarDemo/8_Car2021_Example_v1.1/app/src/main/cpp/../../../PaddleLite/cxx/libs/arm64-v8a/libhiai.so D:\02-Android-Resource\Android-Project\5-CarDemo\8_Car2021_Example_v1.1\app\build\intermediates\cmake\debug\obj\arm64-v8a/libhiai.so && cd /D D:\02-Android-Resource\Android-Project\5-CarDemo\8_Car2021_Example_v1.1\app\.cxx\cmake\debug\arm64-v8a && D:\02-Android-Resource\Android-sdk\cmake\3.10.2.4988404\bin\cmake.exe -E copy D:/02-Android-Resource/Android-Project/5-CarDemo/8_Car2021_Example_v1.1/app/src/main/cpp/../../../PaddleLite/cxx/libs/arm64-v8a/libhiai_ir.so D:\02-Android-Resource\Android-Project\5-CarDemo\8_Car2021_Example_v1.1\app\build\intermediates\cmake\debug\obj\arm64-v8a/libhiai_ir.so && cd /D D:\02-Android-Resource\Android-Project\5-CarDemo\8_Car2021_Example_v1.1\app\.cxx\cmake\debug\arm64-v8a && D:\02-Android-Resource\Android-sdk\cmake\3.10.2.4988404\bin\cmake.exe -E copy D:/02-Android-Resource/Android-Project/5-CarDemo/8_Car2021_Example_v1.1/app/src/main/cpp/../../../PaddleLite/cxx/libs/arm64-v8a/libhiai_ir_build.so D:\02-Android-Resource\Android-Project\5-CarDemo\8_Car2021_Example_v1.1\app\build\intermediates\cmake\debug\obj\arm64-v8a/libhiai_ir_build.so""
D:/02-Android-Resource/Android-Project/5-CarDemo/8_Car2021_Example_v1.1/app/OpenCV/sdk/native/staticlibs/arm64-v8a/libopencv_videoio.a: file not recognized: File truncated
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

0
收藏
回复
全部评论(1)
时间顺序
划飞桨的Daniel
#2 回复于2021-06

应该还是opencv的版本的问题,尽可能和官方案例对齐

0
回复
需求/bug反馈?一键提issue告诉我们
发现bug?如果您知道修复办法,欢迎提pr直接参与建设飞桨~
在@后输入用户全名并按空格结束,可艾特全站任一用户