I am getting the following error while trying to make opencv form source on Linux CentOS

asked 2017-12-10 01:50:41 -0600

BAHRAMUDIN ADIL gravatar image

I want to try to make OpenCV from source on Linux CentOS for Java, with GStreamer support (for reading the stream from RTSP and write it back to RTMP stream), so I have already installed gstreamer-1.12.4 and it's all dependencies and installed ffmpeg and it's dependencies. So everything goes well during configuring cmake, and while trying to make, then it throws the following error in 97%:

[ 97%] Linking CXX shared library ../../lib/libopencv_java331.so /usr/bin/ld: /usr/local/lib/libavformat.a(allformats.o): relocation R_X86_64_32 against `ff_a64_muxer' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libavformat.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status gmake[2]: * [lib/libopencv_java331.so] Error 1 gmake[1]: [modules/java/CMakeFiles/opencv_java.dir/all] Error 2 gmake: ** [all] Error 2

So what is the reason, how can I solve this error?

edit retag flag offensive close merge delete

Comments

Your Linux CentOS is 13 yrs old.

supra56 gravatar imagesupra56 ( 2017-12-10 14:51:07 -0600 )edit

I have downloaded the latest one (CentOS 7) and also updated, how it can be 13 years old???

BAHRAMUDIN ADIL gravatar imageBAHRAMUDIN ADIL ( 2017-12-11 08:52:21 -0600 )edit