Estoy intentando compilar OpenCV versión 2.3.1 en Ubuntu 11.10 siguiendo las instrucciones descritas here. Recibo un error de seguimiento. No se puede entender lo que está sucediendo ... ¿Existe /usr/local/lib/libavcodec.a
pero el enlazador no puede vincularlo, o algo más?Extraño error del enlazador al compilar OpenCV2.3.1 en Ubuntu 11.10
error:
[ 20%] Built target pch_Generate_opencv_highgui
Linking CXX shared library ../../lib/libopencv_highgui.so
/usr/bin/ld: /usr/local/lib/libavcodec.a(avpacket.o): relocation R_X86_64_32S against `av_destruct_packet'
can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libavcodec.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
¿Ha tratado de compilar con -fPIC como sugiere el error? – RCE
¿Compilar qué? OpenCV en sí? –
@RCE ¿Cómo agrego el indicador -fPIC al compilador/enlazador? ¿Debo editar MakeFile? –