Building OpenCV on Raspberry Pi fails

asked 2018-06-01 03:28:45 -0500

MarviB gravatar image

Hi,

i used this tutorial for installing OpenCv with Contrib modules on my Raspberry Pi 3 model 2: http://www.life2coding.com/install-op...

but it fails at 65%. I use Ubuntu Mate 16.02. Does anybody have an idea why it crashes or what i should install in order for it to compile? I additionally tried to install:

sudo apt-get install libwebp-dev

but that didn't change anything...

Thanks, MarviB

[  0%] Built target gen-pkgconfig
[ 10%] Built target libwebp
[ 16%] Built target IlmImf
[ 20%] Built target carotene_objs
[ 20%] Built target tegra_hal
[ 27%] Built target libprotobuf
[ 27%] Built target opencv_core_pch_dephelp
[ 27%] Built target pch_Generate_opencv_core
[ 32%] Built target opencv_core
[ 32%] Built target opencv_flann_pch_dephelp
[ 32%] Built target pch_Generate_opencv_flann
[ 33%] Built target opencv_flann
[ 33%] Built target opencv_imgproc_pch_dephelp
[ 33%] Built target pch_Generate_opencv_imgproc
[ 38%] Built target opencv_imgproc
[ 38%] Built target opencv_ml_pch_dephelp
[ 38%] Built target pch_Generate_opencv_ml
[ 39%] Built target opencv_ml
[ 39%] Built target opencv_objdetect_pch_dephelp
[ 40%] Built target pch_Generate_opencv_objdetect
[ 41%] Built target opencv_objdetect
[ 41%] Built target opencv_photo_pch_dephelp
[ 41%] Built target pch_Generate_opencv_photo
[ 43%] Built target opencv_photo
[ 43%] Built target opencv_video_pch_dephelp
[ 43%] Built target pch_Generate_opencv_video
[ 45%] Built target opencv_video
[ 45%] Built target opencv_dnn_pch_dephelp
[ 45%] Built target pch_Generate_opencv_dnn
[ 51%] Built target opencv_dnn
[ 51%] Built target opencv_imgcodecs_pch_dephelp
[ 51%] Built target pch_Generate_opencv_imgcodecs
[ 53%] Built target opencv_imgcodecs
[ 53%] Built target opencv_shape_pch_dephelp
[ 53%] Built target pch_Generate_opencv_shape
[ 54%] Built target opencv_shape
[ 54%] Built target opencv_videoio_pch_dephelp
[ 55%] Built target pch_Generate_opencv_videoio
[ 55%] Built target opencv_videoio
[ 55%] Built target opencv_highgui_pch_dephelp
[ 55%] Built target pch_Generate_opencv_highgui
[ 55%] Built target opencv_highgui
[ 55%] Built target opencv_superres_pch_dephelp
[ 55%] Built target pch_Generate_opencv_superres
[ 56%] Built target opencv_superres
[ 56%] Built target opencv_features2d_pch_dephelp
[ 57%] Built target pch_Generate_opencv_features2d
[ 59%] Built target opencv_features2d
[ 60%] Built target opencv_calib3d_pch_dephelp
[ 60%] Built target pch_Generate_opencv_calib3d
[ 62%] Built target opencv_calib3d
[ 62%] Built target opencv_stitching_pch_dephelp
[ 62%] Built target pch_Generate_opencv_stitching
[ 63%] Built target opencv_stitching
[ 64%] Built target opencv_videostab_pch_dephelp
[ 64%] Built target pch_Generate_opencv_videostab
[ 65%] Built target opencv_videostab
[ 65%] Built target gen_opencv_python_source
[ 65%] Built target opencv_python3
[ 65%] Linking CXX executable ../../bin/opencv_traincascade
../../lib/libopencv_imgcodecs.so.3.4.0: undefined reference to `WebPEncodingSetError'
../../lib/libopencv_imgcodecs.so.3.4.0: undefined reference to `WebPEncode'
collect2: error: ld returned 1 exit status
apps/traincascade/CMakeFiles/opencv_traincascade.dir/build.make:389: recipe for target 'bin/opencv_traincascade' failed
make[2]: *** [bin/opencv_traincascade] Error 1
CMakeFiles/Makefile2:3866: recipe for target 'apps/traincascade/CMakeFiles/opencv_traincascade.dir/all' failed
make[1]: *** [apps/traincascade/CMakeFiles/opencv_traincascade.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
edit retag flag offensive close merge delete

Comments

so, your webp libs do not match the expectations.

you can try to:

  1. disable it: cmake -DWITH_WEBP=OFF
  2. or use opencv's 3rdparty version: cmake -DWITH_WEBP=ON -DBUILD_WEBP=ON
berak gravatar imageberak ( 2018-06-01 03:45:02 -0500 )edit