I am on Centos 6.5 64bit
I get error when compiling opencv-2.4.11 with python2.7.6 and ffmpeg version git-2015-03-21
after CMAKE I get
-- Precompiled headers: YES -- -- OpenCV modules: -- To be built: core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu nonfree contrib python stitching superres ts videostab -- Disabled: world -- Disabled by dependency: - -- Unavailable: androidcamera dynamicuda java ocl viz -- -- GUI: -- QT: NO -- GTK+ 2.x: NO -- GThread : NO -- GtkGlExt: NO -- OpenGL support: NO -- VTK support: NO -- -- Media I/O: -- ZLib: /usr/lib64/libz.so (ver 1.2.3) -- JPEG: /usr/lib64/libjpeg.so (ver ) -- PNG: /usr/lib64/libpng.so (ver 1.2.49) -- TIFF: /usr/lib64/libtiff.so (ver 42 - 3.9.4) -- JPEG 2000: /usr/lib64/libjasper.so (ver 1.900.1) -- OpenEXR: NO -- -- Video I/O: -- DC1394 1.x: NO -- DC1394 2.x: NO -- FFMPEG: YES -- codec: YES (ver 56.29.100) -- format: YES (ver 56.26.101) -- util: YES (ver 54.20.100) -- swscale: YES (ver 3.1.101) -- gentoo-style: YES -- GStreamer: NO -- OpenNI: NO -- OpenNI PrimeSensor Modules: NO -- PvAPI: NO -- GigEVisionSDK: NO -- UniCap: NO -- UniCap ucil: NO -- V4L/V4L2: NO/NO -- XIMEA: NO -- Xine: NO -- -- Other third-party libraries: -- Use IPP: NO -- Use Eigen: YES (ver 3.2.3) -- Use TBB: NO -- Use OpenMP: NO -- Use GCD NO -- Use Concurrency NO -- Use C=: NO -- Use Cuda: NO -- Use OpenCL: NO -- -- Python: -- Interpreter: /usr/local/bin/python2.7 (ver 2.7.6) -- Libraries: /usr/local/lib/python2.7/config/libpython2.7.a (ver 2.7.6) -- numpy: /usr/local/lib/python2.7/site-packages/numpy/core/include (ver ) -- packages path: /usr/local/lib/python2.7/site-packages -- -- Java: -- ant: NO -- JNI: NO -- Java tests: NO -- -- Tests and samples: -- Tests: NO -- Performance tests: NO -- C/C++ Examples: NO -- -- Install path: /usr/local -- -- cvconfig.h is in: /home/bob/tmp/opencv-2.4.11/build -- ----------------------------------------------------------------- -- -- Configuring done -- Generating done
after make
bob@localhost~/tmp/opencv-2.4.11/build $ make [ 1%] Built target opencv_core_pch_dephelp [ 1%] Built target pch_Generate_opencv_core [ 6%] Built target opencv_core [ 6%] Built target opencv_flann_pch_dephelp [ 6%] Built target pch_Generate_opencv_flann [ 7%] Built target opencv_flann [ 7%] Built target opencv_imgproc_pch_dephelp [ 7%] Built target pch_Generate_opencv_imgproc [ 16%] Built target opencv_imgproc [ 17%] Built target opencv_highgui_pch_dephelp [ 18%] Built target pch_Generate_opencv_highgui [ 21%] Built target opencv_highgui [ 21%] Built target opencv_features2d_pch_dephelp [ 22%] Built target pch_Generate_opencv_features2d [ 26%] Built target opencv_features2d [ 27%] Built target opencv_calib3d_pch_dephelp [ 27%] Built target pch_Generate_opencv_calib3d [ 30%] Built target opencv_calib3d [ 31%] Built target opencv_ml_pch_dephelp [ 31%] Built target pch_Generate_opencv_ml [ 34%] Built target opencv_ml [ 34%] Built target opencv_video_pch_dephelp [ 34%] Built target pch_Generate_opencv_video [ 36%] Built target opencv_video [ 37%] Built target opencv_legacy_pch_dephelp [ 38%] Built target pch_Generate_opencv_legacy [ 56%] Built target opencv_legacy [ 57%] Built target opencv_objdetect_pch_dephelp [ 57%] Built target pch_Generate_opencv_objdetect [ 60%] Built target opencv_objdetect [ 61%] Built target opencv_photo_pch_dephelp [ 61%] Built target pch_Generate_opencv_photo [ 61%] Built target opencv_photo [ 61%] Built target opencv_gpu_pch_dephelp [ 61%] Built target pch_Generate_opencv_gpu [ 73%] Built target opencv_gpu [ 73%] Built target opencv_nonfree_pch_dephelp [ 74%] Built target pch_Generate_opencv_nonfree [ 75%] Built target opencv_nonfree [ 76%] Built target opencv_contrib_pch_dephelp [ 77%] Built target pch_Generate_opencv_contrib [ 83%] Built target opencv_contrib Linking CXX shared library ../../lib/cv2.so /usr/bin/ld: cannot find -lavcodec collect2: ld returned 1 exit status make[2]: *** [lib/cv2.so] Error 1 make[1]: *** [modules/python/CMakeFiles/opencv_python.dir/all] Error 2 make: *** [all] Error 2
why the hell lavcodec is missing?.. /usr/bin/ld: cannot find -lavcodec
ffmpeg is built by the instructions here