失敗した公式サイト上での標準的な手順に従ってOpenCVの3.1.0は - コンパイルが、私は、debian 8にOpenCVの3.1.0をインストールしようとしている
(それはのpython3バインディングを提供します)http://docs.opencv.org/3.1.0/d7/d9f/tutorial_linux_install.htmlプロセスが
[ 30%] Building CXX object modules/photo/CMakeFiles/opencv_photo.dir/opencl_kernels_photo.cpp.o
Linking CXX shared library ../../lib/libopencv_shape.so
[ 30%] Built target opencv_shape
Linking CXX shared library ../../lib/libopencv_photo.so
[ 30%] Built target opencv_photo
Makefile:147: recipe for target 'all' failed
make: *** [all] Error 2
[ 0%] Built target opencv_core_pch_dephelp
[ 0%] Built target pch_Generate_opencv_core
[ 4%] Built target opencv_core
[ 4%] Built target opencv_ts_pch_dephelp
[ 4%] Built target pch_Generate_opencv_ts
[ 4%] Built target opencv_imgproc_pch_dephelp
[ 4%] Built target pch_Generate_opencv_imgproc
[ 9%] Built target opencv_imgproc
[ 9%] Built target opencv_imgcodecs_pch_dephelp
[ 9%] Built target pch_Generate_opencv_imgcodecs
[ 11%] Built target opencv_imgcodecs
[ 11%] Built target opencv_videoio_pch_dephelp
[ 11%] Built target pch_Generate_opencv_videoio
Linking CXX shared library ../../lib/libopencv_videoio.so
/usr/bin/ld: /usr/local/lib/libavcodec.a(avpacket.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libavcodec.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
modules/videoio/CMakeFiles/opencv_videoio.dir/build.make:280: recipe for target 'lib/libopencv_videoio.so.3.1.0' failed
make[2]: *** [lib/libopencv_videoio.so.3.1.0] Error 1
CMakeFiles/Makefile2:4076: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
Makefile:147: recipe for target 'all' failed
make: *** [all] Error 2
失敗します
http://wiki.open-si.org/trac-notes/ticket/10
--enable-sharedでFFMPEGをコンパイルすると問題が解決しました。 –