Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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

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?