A long time ago to install Caffe need to compile OpenCV on the error,usr/local/lib/libavcodex.a(***.O) relocation ..... Recompile with-fpic
Now it's time to do it again today: ( Also searched a bunch of static library problems, and later found that these are ffmpeg problems, and then still in the ffmpeg of the compilation problem below to find the answer. It's generally said what configure set the god Horse
That's it! Beacon! (http://answers.opencv.org/question/63331/opencv-30-wont-compile-with-ffmpeg-support/)
The short answer are, I recompiled ffmpeg with additional flags --enable-pic
--extra-ldexeflags=-pie
and, and then had to edit a particular option I n My OpenCV build. I used Ccmake to set CMAKE_SHARED_LINKER_FLAGS
-a value -Wl,-Bsymbolic
of, as described by the FFmpeg website.
Hopefully this helps your out, Rex. Best of luck!
Ok But seriously, this took me a while to find the answer, so hopefully this would help save somebody a couple hours of Pai N.
Hahaha thank the author but just looking for this answer already has a couple hours of pain a good!! TT
My solution : Download the FFmpeg tar package, and then install the cflags=-fpic./configure--enable-shared--enable-pic--extra-ldexeflags=-pie --prefix=/usr/local/ffmpeg
After the Make&make install will be generated under the/usr/local/ffmpeg folder these always error libav*.a files, use these files to replace the usr/local/lib/below LIBAV*.A file, and then recompile OPENCV
Finally compiled successfully!!!!!!!!!!!!!!!! But it's just the first step. There are countless big pits on the back of the TT sense foot. tt
ubuntu14.04 Installation opencv2.4.13 Error-fpic