Ask Your Question
0

opencv 3.1 ffmpeg should I do shared enable

asked 2016-09-28 13:26:44 -0500

flexbex gravatar image

SO I'm installing opencv 3.1 for c++ use on Ubuntu 16.04 on Rpi 3 opencv with gcc 4.9. In some tutorials they recommend to build ffmpeg from source with shared enable and disable static flag. In others they just build ffmpeg from packages via apt-get. So I wonder whats the right way to do it?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-10-12 23:45:06 -0500

Du Ang gravatar image

I have tried for both, but the same error appears as following...

[ 30%] 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:310: recipe for target 'lib/libopencv_videoio.so.3.1.0' failed make[2]: *** [lib/libopencv_videoio.so.3.1.0] Error 1 CMakeFiles/Makefile2:4301: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 30%] Linking CXX shared library ../../lib/libopencv_shape.so [ 30%] Built target opencv_shape [ 30%] Linking CXX shared library ../../lib/libopencv_photo.so [ 30%] Built target opencv_photo Makefile:160: recipe for target 'all' failed make: *** [all] Error 2

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

2 followers

Stats

Asked: 2016-09-28 13:26:44 -0500

Seen: 345 times

Last updated: Sep 28 '16