Open Unitedte opened 2 years ago
关于解决/usr/bin/ld: /home/pi/LiveFaceReco_RaspberryPi/include/libs/RaspberryPi4B/libncnn.a: error adding symbols: file format not recognized collect2: error: ld returned 1 exit status 可以参考这篇文章编译下载ncnn https://blog.csdn.net/sxf1061700625/article/details/121630741 将自己编译的libncnn.a替换项目中的libncnn 另外我自己编译成功后跑了一下出现了Segmentation fault的错误,不知道哪位大佬可以说一下怎么解决?
项目路径的.a文件是在/home/pi/LiveFaceReco_RaspberryPi/include/libs/RaspberryPi4B/libncnn.a
关于解决/usr/bin/ld: /home/pi/LiveFaceReco_RaspberryPi/include/libs/RaspberryPi4B/libncnn.a: error adding symbols: file format not recognized collect2: error: ld returned 1 exit status 可以参考这篇文章编译下载ncnn https://blog.csdn.net/sxf1061700625/article/details/121630741 将自己编译的libncnn.a替换项目中的libncnn 另外我自己编译成功后跑了一下出现了Segmentation fault的错误,不知道哪位大佬可以说一下怎么解决?
Segmentation fault 应该是你图片路径没人脸图片导致的
root@raspberrypi:/home/pi/project/LiveFaceReco_RaspberryPi/build# make -j4 -- Found OpenCV: /usr (found version "4.5.1") -- Found OpenMP_C: -fopenmp -- Found OpenMP_CXX: -fopenmp -- Found OpenMP: TRUE OPENMP FOUND -- Configuring done -- Generating done -- Build files have been written to: /home/pi/project/LiveFaceReco_RaspberryPi/build make[1]: Entering directory '/home/pi/project/LiveFaceReco_RaspberryPi/build' make[2]: Entering directory '/home/pi/project/LiveFaceReco_RaspberryPi/build' make[2]: Entering directory '/home/pi/project/LiveFaceReco_RaspberryPi/build' Scanning dependencies of target ParallelVideoCapture Scanning dependencies of target facedetect make[2]: Leaving directory '/home/pi/project/LiveFaceReco_RaspberryPi/build' make[2]: Entering directory '/home/pi/project/LiveFaceReco_RaspberryPi/build' make[2]: Leaving directory '/home/pi/project/LiveFaceReco_RaspberryPi/build' make[2]: Entering directory '/home/pi/project/LiveFaceReco_RaspberryPi/build' [ 11%] Building CXX object src/ParallelVideoCapture/CMakeFiles/ParallelVideoCapture.dir/parallel_video_capture.cpp.o [ 22%] Building CXX object CMakeFiles/facedetect.dir/src/livefacereco.cpp.o [ 44%] Building CXX object CMakeFiles/facedetect.dir/src/arcface.cpp.o [ 44%] Building CXX object CMakeFiles/facedetect.dir/src/live.cpp.o [ 55%] Building CXX object CMakeFiles/facedetect.dir/src/mtcnn_new.cpp.o [ 66%] Linking CXX static library libParallelVideoCapture.a make[2]: Leaving directory '/home/pi/project/LiveFaceReco_RaspberryPi/build' [ 66%] Built target ParallelVideoCapture [ 77%] Linking CXX static library libfacedetect.a make[2]: Leaving directory '/home/pi/project/LiveFaceReco_RaspberryPi/build' [ 77%] Built target facedetect make[2]: Entering directory '/home/pi/project/LiveFaceReco_RaspberryPi/build' Scanning dependencies of target LiveFaceReco make[2]: Leaving directory '/home/pi/project/LiveFaceReco_RaspberryPi/build' make[2]: Entering directory '/home/pi/project/LiveFaceReco_RaspberryPi/build' [ 88%] Building CXX object CMakeFiles/LiveFaceReco.dir/src/main.cpp.o [100%] Linking CXX executable LiveFaceReco /usr/bin/ld: /home/pi/project/LiveFaceReco_RaspberryPi/include/libs/RaspberryPi4B/libncnn.a: error adding symbols: file format not recognized collect2: error: ld returned 1 exit status make[2]: [CMakeFiles/LiveFaceReco.dir/build.make:138: LiveFaceReco] Error 1 make[2]: Leaving directory '/home/pi/project/LiveFaceReco_RaspberryPi/build' make[1]: [CMakeFiles/Makefile2:74: CMakeFiles/LiveFaceReco.dir/all] Error 2 make[1]: Leaving directory '/home/pi/project/LiveFaceReco_RaspberryPi/build' make: *** [Makefile:84: all] Error 2
How can I fix this problem?