Installation error: opencv_perf_features2d
- OpenCV => 3.4.3
- Operating System / Platform => Raspbian Stretch
Hi,
following the standard procedure on https://www.pyimagesearch.com/2017/09...
after doing:
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-3.4.3/modules \
-D BUILD_EXAMPLES=ON ..
gives me the following error at around 48%:
[ 46%] Built target opencv_perf_bioinspired
Scanning dependencies of target opencv_line_descriptor
[ 46%] Built target example_dpm_cascade_detect_sequence
[ 46%] Building CXX object modules/line_descriptor/CMakeFiles/opencv_line_descriptor.dir/src/LSDDetector.cpp.o
Scanning dependencies of target opencv_saliency
[ 46%] Building CXX object modules/saliency/CMakeFiles/opencv_saliency.dir/src/BING/CmFile.cpp.o
[ 46%] Building CXX object modules/saliency/CMakeFiles/opencv_saliency.dir/src/BING/CmShow.cpp.o
[ 46%] Building CXX object modules/line_descriptor/CMakeFiles/opencv_line_descriptor.dir/src/binary_descriptor.cpp.o
[ 46%] Building CXX object modules/saliency/CMakeFiles/opencv_saliency.dir/src/BING/FilterTIG.cpp.o
[ 46%] Building CXX object modules/saliency/CMakeFiles/opencv_saliency.dir/src/BING/ValStructVec.cpp.o
[ 46%] Building CXX object modules/saliency/CMakeFiles/opencv_saliency.dir/src/BING/objectnessBING.cpp.o
[ 46%] Building CXX object modules/features2d/CMakeFiles/opencv_test_features2d.dir/test/ocl/test_feature2d.cpp.o
[ 46%] Building CXX object modules/features2d/CMakeFiles/opencv_perf_features2d.dir/perf/opencl/perf_feature2d.cpp.o
[ 46%] Building CXX object modules/line_descriptor/CMakeFiles/opencv_line_descriptor.dir/src/binary_descriptor_matcher.cpp.o
[ 46%] Building CXX object modules/saliency/CMakeFiles/opencv_saliency.dir/src/motionSaliency.cpp.o
[ 46%] Building CXX object modules/saliency/CMakeFiles/opencv_saliency.dir/src/motionSaliencyBinWangApr2014.cpp.o
[ 47%] Building CXX object modules/line_descriptor/CMakeFiles/opencv_line_descriptor.dir/src/draw.cpp.o
[ 47%] Building CXX object modules/features2d/CMakeFiles/opencv_test_features2d.dir/test/test_agast.cpp.o
[ 48%] Building CXX object modules/features2d/CMakeFiles/opencv_perf_features2d.dir/perf/perf_batchDistance.cpp.o
[ 48%] Linking CXX shared library ../../lib/libopencv_line_descriptor.so
[ 48%] Building CXX object modules/saliency/CMakeFiles/opencv_saliency.dir/src/objectness.cpp.o
[ 48%] Building CXX object modules/features2d/CMakeFiles/opencv_test_features2d.dir/test/test_akaze.cpp.o
[ 48%] Building CXX object modules/saliency/CMakeFiles/opencv_saliency.dir/src/saliency.cpp.o
/usr/bin/ld: error: ../../lib/libopencv_features2d.so.3.4.3: file too short
collect2: error: ld returned 1 exit status
modules/line_descriptor/CMakeFiles/opencv_line_descriptor.dir/build.make:180: recipe for target 'lib/libopencv_line_descriptor.so.3.4.3' failed
make[2]: *** [lib/libopencv_line_descriptor.so.3.4.3] Error 1
CMakeFiles/Makefile2:12442: recipe for target 'modules/line_descriptor/CMakeFiles/opencv_line_descriptor.dir/all' failed
make[1]: *** [modules/line_descriptor/CMakeFiles/opencv_line_descriptor.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 48%] Building CXX object modules/saliency/CMakeFiles/opencv_saliency.dir/src/staticSaliency.cpp.o
[ 48%] Building CXX object modules/features2d/CMakeFiles/opencv_perf_features2d.dir/perf/perf_feature2d.cpp.o
[ 48%] Building CXX object modules/saliency/CMakeFiles/opencv_saliency.dir/src/staticSaliencyFineGrained.cpp.o
[ 48%] Building CXX object modules/features2d/CMakeFiles/opencv_test_features2d.dir/test/test_brisk.cpp.o
[ 48%] Building CXX object modules/saliency/CMakeFiles/opencv_saliency.dir/src/staticSaliencySpectralResidual.cpp.o
[ 48%] Building CXX object modules/features2d/CMakeFiles/opencv_test_features2d.dir/test/test_descriptors_invariance.cpp.o
[ 48%] Linking CXX shared library ../../lib/libopencv_saliency.so
/usr/bin/ld: error: ../../lib/libopencv_features2d.so.3.4.3: file too short
collect2: error: ld returned ...
i don't have a raspi, but look here:
it looks, like you ran out of disk space (and it got truncated) ;(
hmm that could be it. Will clean up and run again I guess
what you could try (after a radical cleanup), all of it in the hope to compile less:
cmake -DENABLE_PRECOMPILED_HEADERS=OFF
-DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF
-DBUILD_opencv_xxxx=OFF
(esp. from the contrib ones, saliency ? fuzzy ?)just for the record, that means next to
I would also need to add
exactly, those are all cmake flags.
and don't forget, that if you put them on a seperate line, you need a backslach at the end.
This is wrong link that you're posted.The link you're posted is outdated. Here is link for Opencv 4 for raspberry pi: Install OpenCV 4 on your Raspberry Pi
Don't forget make -j1 instead of -j4
Another link: Install OpenCV 4 on Raspberry Pi