Error Building opencv with BUILD_SHARED_LIBS set to NO

asked 2014-06-20 13:46:01 -0500

funWithImages gravatar image

I get the following error when I build opencv.2.4.8. Can you tell me how to get past it?

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

edit retag flag offensive close merge delete

Comments

maybe try cmake -DBUILD_TIFF=ON , so it uses(and builds) its own libtiff instead of the system one ?

berak gravatar imageberak ( 2014-06-22 05:27:30 -0500 )edit