hang245141253 / raspi4B_mask_detection_runtime

基于树莓派4B与Paddle-Lite实现的实时口罩识别
Apache License 2.0
48 stars 7 forks source link

Compile fail #1

Closed zhaochengwei closed 4 years ago

zhaochengwei commented 4 years ago

-- The C compiler identification is GNU 8.3.0 -- The CXX compiler identification is GNU 8.3.0 -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/g++ -- Check for working CXX compiler: /usr/bin/g++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- TARGET ARCH ABI: armv8 -- PADDLE LITE DIR: ../Paddle-Lite -- Found OpenMP_C: -fopenmp (found version "4.5") -- Found OpenMP_CXX: -fopenmp (found version "4.5") -- Found OpenMP: TRUE (found version "4.5") -- Found OpenMP 4.5 -- OpenMP C flags: -fopenmp -- OpenMP CXX flags: -fopenmp -- OpenMP OpenMP_CXX_LIB_NAMES: gomp;pthread -- OpenMP OpenMP_CXX_LIBRARIES: /usr/lib/gcc/arm-linux-gnueabihf/8/libgomp.so;/usr/lib/arm-linux-gnueabihf/libpthread.so -- Found OpenCV: /usr (found version "3.2.0") -- OpenCV library status: -- version: 3.2.0 -- libraries: opencv_calib3d;opencv_core;opencv_features2d;opencv_flann;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_shape;opencv_stitching;opencv_superres;opencv_video;opencv_videoio;opencv_videostab;opencv_viz;opencv_aruco;opencv_bgsegm;opencv_bioinspired;opencv_ccalib;opencv_datasets;opencv_dpm;opencv_face;opencv_freetype;opencv_fuzzy;opencv_hdf;opencv_line_descriptor;opencv_optflow;opencv_phase_unwrapping;opencv_plot;opencv_reg;opencv_rgbd;opencv_saliency;opencv_stereo;opencv_structured_light;opencv_surface_matching;opencv_text;opencv_ximgproc;opencv_xobjdetect;opencv_xphoto -- include path: /usr/include;/usr/include/opencv -- Configuring done -- Generating done -- Build files have been written to: /home/pi/raspi4B_mask_detection_runtime/code/build Scanning dependencies of target mask_detection [ 50%] Building CXX object CMakeFiles/mask_detection.dir/mask_detection.cc.o /home/pi/raspi4B_mask_detection_runtime/code/mask_detection.cc: In function ‘void neon_mean_scale(const float*, float*, int, std::vector<float>, std::vector<float>’: /home/pi/raspi4B_mask_detection_runtime/code/mask_detection.cc:50:3: error: ‘float32x4_t’ was not declared in this scope float32x4_t vmean0 = vdupq_n_f32(mean[0]); ^~~~~~~~~~~ /home/pi/raspi4B_mask_detection_runtime/code/mask_detection.cc:50:3: note: suggested alternative: ‘float_t’ float32x4_t vmean0 = vdupq_n_f32(mean[0]); ^~~~~~~~~~~ float_t /home/pi/raspi4B_mask_detection_runtime/code/mask_detection.cc:51:14: error: expected ‘;’ before ‘vmean1’ float32x4_t vmean1 = vdupq_n_f32(mean[1]); ^~~~~~~ ; /home/pi/raspi4B_mask_detection_runtime/code/mask_detection.cc:52:14: error: expected ‘;’ before ‘vmean2’ float32x4_t vmean2 = vdupq_n_f32(mean[2]); ^~~~~~~ ; /home/pi/raspi4B_mask_detection_runtime/code/mask_detection.cc:53:14: error: expected ‘;’ before ‘vscale0’ float32x4_t vscale0 = vdupq_n_f32(scale[0]); ^~~~~~~~ ; /home/pi/raspi4B_mask_detection_runtime/code/mask_detection.cc:54:14: error: expected ‘;’ before ‘vscale1’ float32x4_t vscale1 = vdupq_n_f32(scale[1]); ^~~~~~~~ ; /home/pi/raspi4B_mask_detection_runtime/code/mask_detection.cc:55:14: error: expected ‘;’ before ‘vscale2’ float32x4_t vscale2 = vdupq_n_f32(scale[2]); ^~~~~~~~ ; /home/pi/raspi4B_mask_detection_runtime/code/mask_detection.cc:63:5: error: ‘float32x4x3_t’ was not declared in this scope float32x4x3_t vin3 = vld3q_f32(din); ^~~~~~~~~~~~~ /home/pi/raspi4B_mask_detection_runtime/code/mask_detection.cc:63:5: note: suggested alternative: ‘float_t’ float32x4x3_t vin3 = vld3q_f32(din); ^~~~~~~~~~~~~ float_t /home/pi/raspi4B_mask_detection_runtime/code/mask_detection.cc:64:16: error: expected ‘;’ before ‘vsub0’ float32x4_t vsub0 = vsubq_f32(vin3.val[0], vmean0); ^~~~~~ ; /home/pi/raspi4B_mask_detection_runtime/code/mask_detection.cc:65:16: error: expected ‘;’ before ‘vsub1’ float32x4_t vsub1 = vsubq_f32(vin3.val[1], vmean1); ^~~~~~ ; /home/pi/raspi4B_mask_detection_runtime/code/mask_detection.cc:66:16: error: expected ‘;’ before ‘vsub2’ float32x4_t vsub2 = vsubq_f32(vin3.val[2], vmean2); ^~~~~~ ; /home/pi/raspi4B_mask_detection_runtime/code/mask_detection.cc:67:16: error: expected ‘;’ before ‘vs0’ float32x4_t vs0 = vmulq_f32(vsub0, vscale0); ^~~~ ; /home/pi/raspi4B_mask_detection_runtime/code/mask_detection.cc:68:16: error: expected ‘;’ before ‘vs1’ float32x4_t vs1 = vmulq_f32(vsub1, vscale1); ^~~~ ; /home/pi/raspi4B_mask_detection_runtime/code/mask_detection.cc:69:16: error: expected ‘;’ before ‘vs2’ float32x4_t vs2 = vmulq_f32(vsub2, vscale2); ^~~~ ; /home/pi/raspi4B_mask_detection_runtime/code/mask_detection.cc:70:24: error: ‘vs0’ was not declared in this scope vst1q_f32(dout_c0, vs0); ^~~ /home/pi/raspi4B_mask_detection_runtime/code/mask_detection.cc:70:5: error: ‘vst1q_f32’ was not declared in this scope vst1q_f32(dout_c0, vs0); ^~~~~~~~~ /home/pi/raspi4B_mask_detection_runtime/code/mask_detection.cc:70:5: note: suggested alternative: ‘strtof32’ vst1q_f32(dout_c0, vs0); ^~~~~~~~~ strtof32 /home/pi/raspi4B_mask_detection_runtime/code/mask_detection.cc:71:24: error: ‘vs1’ was not declared in this scope vst1q_f32(dout_c1, vs1); ^~~ /home/pi/raspi4B_mask_detection_runtime/code/mask_detection.cc:72:24: error: ‘vs2’ was not declared in this scope vst1q_f32(dout_c2, vs2); ^~~ make[2]: *** [CMakeFiles/mask_detection.dir/build.make:63: CMakeFiles/mask_detection.dir/mask_detection.cc.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/mask_detection.dir/all] Error 2 make: *** [Makefile:84: all] Error 2

hang245141253 commented 4 years ago

请问您是什么设备呢?

报错的代码都是ARM的neon指令

zhaochengwei commented 4 years ago

请问您是什么设备呢?

报错的代码都是ARM的neon指令

配置文件里面的架构没选对,应该是用armv7的。修改了就好了