setup-msbuild
setup-msbuild copied to clipboard
大兄弟,可以更新ncnn的版本了,最新版本测试了一下,速度翻了一倍,实时检测毫无压力了...
Build command failed. Error while executing '/home/river/Android/Sdk/cmake/3.6.4111459/bin/cmake' with arguments {--build /home/river/AndroidStudioProjects/mtcnn_AS_1/app/.externalNativeBuild/cmake/debug/armeabi-v7a --target mtcnn} [1/3] Building CXX object CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn.cpp.o [2/3] Building CXX object CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn_jni.cpp.o [3/3] Linking CXX shared library ../../../../build/intermediates/cmake/debug/obj/armeabi-v7a/libmtcnn.so FAILED: : && /home/river/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/home/river/Android/Sdk/ndk-bundle/sysroot -fPIC -isystem /home/river/Android/Sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi -D__ANDROID_API__=17 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -fopenmp -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math -std=c++11 -frtti -fexceptions -O0 -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a --sysroot /home/river/Android/Sdk/ndk-bundle/platforms/android-17/arch-arm -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libmtcnn.so -o ../../../../build/intermediates/cmake/debug/obj/armeabi-v7a/libmtcnn.so CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn.cpp.o CMakeFiles/mtcnn.dir/src/main/cpp/mtcnn_jni.cpp.o ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a -ljnigraphics -lz /home/river/Android/Sdk/ndk-bundle/platforms/android-17/arch-arm/usr/lib/liblog.so -latomic -lm "/home/river/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/libgnustl_static.a" && : ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(mat.cpp.o):/home/nihui/osd/ncnn/src/mat.cpp:function ncnn::Mat::substract_mean_normalize(float const*, float const*): error: undefined reference to '__kmpc_fork_call' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(mat.cpp.o):/home/nihui/osd/ncnn/src/mat.cpp:function .omp_outlined.: error: undefined reference to '__kmpc_for_static_init_4' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(mat.cpp.o):/home/nihui/osd/ncnn/src/mat.cpp:function .omp_outlined.: error: undefined reference to '__kmpc_for_static_fini' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(mat.cpp.o):/home/nihui/osd/ncnn/src/mat.cpp:function .omp_outlined..1: error: undefined reference to '__kmpc_for_static_init_4' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(mat.cpp.o):/home/nihui/osd/ncnn/src/mat.cpp:function .omp_outlined..1: error: undefined reference to '__kmpc_for_static_fini' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(mat.cpp.o):/home/nihui/osd/ncnn/src/mat.cpp:function .omp_outlined..2: error: undefined reference to '__kmpc_for_static_init_4' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(mat.cpp.o):/home/nihui/osd/ncnn/src/mat.cpp:function .omp_outlined..2: error: undefined reference to '__kmpc_for_static_fini' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(mat.cpp.o):/home/nihui/osd/ncnn/src/mat.cpp:function ncnn::copy_make_border(ncnn::Mat const&, ncnn::Mat&, int, int, int, int, int, float): error: undefined reference to '__kmpc_fork_call' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(mat.cpp.o):/home/nihui/osd/ncnn/src/mat.cpp:function .omp_outlined..3: error: undefined reference to '__kmpc_for_static_init_4' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(mat.cpp.o):/home/nihui/osd/ncnn/src/mat.cpp:function .omp_outlined..3: error: undefined reference to '__kmpc_for_static_fini' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(mat.cpp.o):/home/nihui/osd/ncnn/src/mat.cpp:function ncnn::copy_cut_border(ncnn::Mat const&, ncnn::Mat&, int, int, int, int): error: undefined reference to '__kmpc_fork_call' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(mat.cpp.o):/home/nihui/osd/ncnn/src/mat.cpp:function ncnn::resize_bilinear(ncnn::Mat const&, ncnn::Mat&, int, int): error: undefined reference to '__kmpc_fork_call' ../../../../src/main/jniLibs/armeabi-v7a/libncnn.a(convolutiondepthwise.cpp.o):/home/nihui/osd/ncnn/src/layer/convolutiondepthwise.cpp:function .omp_outlined..1: error: undefined reference to '__kmpc_for_static_init_8' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed.
新版本编译出现这个错误, openmp的问题,你遇到没
gradle里配置的编译器把gcc修改为clang,arguments "-DANDROID_TOOLCHAIN=clang"
@abc1225 搞定了,非常感谢! 测试4线程时整体速度是提升了,但是单线程模式的速度感觉反而降低的,准备换手机测试看!
@rivercn 测完了告诉一下哈
之前尝试过更新版本的,新版需设置clang编译了,我这边尝试过,一直报下面这个错误,没找到解决方法,你们还修改过其他编译细节吗?或者是我需要更新软件某个版本?麻烦告知下; Error:cannot find -lomp Error:error: linker command failed with exit code 1 (use -v to see invocation)
@moli232777144 没其它细节了,仅替换了lib库和头文件,gcc修改为clang,你这个的只能是ndk版本导致的问题,ndk版本号: 15.1.4xxx
@abc1225 初步测试单线程是有上升,单张图片的时间跟视频的时间有差别,需要进一步验证
@rivercn thanks
更新了相关可调参数的接口和测试数据,个人机子上测试,速度反而没之前版本快;mtcnn通过框架提升速度的空间可能不大了,模型计算量并不大,波动反而可能更大;欢迎测试交流下;
@abc1225 ,已按照你说的修改,请问这个是什么原因 Information:Gradle tasks [:app:assembleDebug] Error:error: linker command failed with exit code 1 (use -v to see invocation)
@Roger8 升级ndk
ndk版本由17换为r15后编译成功,3q
有多快呢?我在Android上跑人脸检测,很不稳定,每帧耗时波动比较大
更新了相关可调参数的接口和测试数据,个人机子上测试,速度反而没之前版本快;mtcnn通过框架提升速度的空间可能不大了,模型计算量并不大,波动反而可能更大;欢迎测试交流下;
嗯,我这边测试也是,用ncnn官方编译库,20180427的库比20180830的库还要快一些
有多快呢?我在Android上跑人脸检测,很不稳定,每帧耗时波动比较大
我跑也有几十毫秒到上百毫秒的波动
我测下来线程越多,速度越慢....
之前尝试过更新版本的,新版需设置clang编译了,我这边尝试过,一直报下面这个错误,没找到解决方法,你们还修改过其他编译细节吗?或者是我需要更新软件某个版本?麻烦告知下; Error:cannot find -lomp Error:error: linker command failed with exit code 1 (use -v to see invocation)
openmp?