ubuntu14.04 Installation opencv2.4.13 Error-fpic

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.