compiler error when compiling opencv 3.3.0

asked 2017-10-21 13:52:32 -0600

updated 2017-10-22 00:02:00 -0600

berak gravatar image

Scanning dependencies of target example_optflow_optical_flow_evaluation

[ 86%] Building CXX object modules/optflow/CMakeFiles/example_optflow_optical_flow_evaluation.dir/samples/optical_flow_evaluation.cpp.o

[ 86%] Linking CXX shared library ../../lib/libopencv_sfm.so

/usr/bin/ld: /usr/local/lib/libgflags.a(gflags.cc.o): no se puede usar la reubicación R_X86_64_32 contra `.rodata.str1.1'

cuando se hace un objeto compartido; recompile con -fPIC

/usr/local/lib/libgflags.a: error adding symbols: Valor erróneo

collect2: error: ld returned 1 exit status

modules/sfm/CMakeFiles/opencv_sfm.dir/build.make:330: fallo en las instrucciones para el objetivo

'lib/libopencv_sfm.so.3.3.0'

make[2]: * [lib/libopencv_sfm.so.3.3.0] Error 1

CMakeFiles/Makefile2:20309: fallo en las instrucciones para el objetivo 'modules/sfm/CMakeFiles/opencv_sfm.dir/all'

make[1]: * [modules/sfm/CMakeFiles/opencv_sfm.dir/all] Error 2

make[1]: * Se espera a que terminen otras tareas....

[ 86%] Building CXX object modules/stitching/CMakeFiles/opencv_

Cmake options:

cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=/usr/local \ -D INSTALL_C_EXAMPLES=ON \ -D INSTALL_PYTHON_EXAMPLES=ON \ -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.3.0/modules \ -D BUILD_EXAMPLES=ON ..

How can i solved this issue?

edit retag flag offensive close merge delete