Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Error -fPIC while compiling OpenCV

Hi all,

I am stumbling for the whole week in this annoying error I am getting while trying to compile OpenCV again. Some weeks ago I had compiled it correctly, but now I don't know what is happening at all.

Linking CXX shared library ../../lib/libopencv_highgui.so /usr/bin/ld: /home/matheus/ffmpeg_build/lib/../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 /home/matheus/ffmpeg_build/lib/../lib/libavcodec.a: could not read symbols: Bad value collect2: error: ld returned 1 exit status make[2]: * [lib/libopencv_highgui.so.2.4.5] Error 1 make[1]: [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2 make: ** [all] Error 2

Could anyone help me?