OpenCV compile error
On Compiling opencv 2.4.11 on the ubuntu 14.04, I received the following error: -
Linking CXX shared library ../../lib/libopencv_core.so /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libm.so when searching for -lm /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libm.a(s_sin.o): relocation R_X86_64_32S against `__sincostab' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libm.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status
make[2]: * [lib/libopencv_core.so.2.4.11] Error 1
make[1]: * [modules/core/CMakeFiles/opencv_core.dir/all] Error 2 make: * [all] Error 2
It just stops at 21% and shows the error.
Can anyone tell me what can be done??
Have you searched on google? To me it seems that you have more versions of the same lib ... is it?
yeah I guess. When i search for libm.a It shows this :-
/home/akash/Downloads/gcc-linaro-4.9-2015.02-3-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/libc/usr/lib/libm.a
/usr/arm-linux-gnueabi/lib/libm.a
/usr/arm-linux-gnueabihf/lib/libm.a
/usr/arm-linux-gnueabihf/libsf/libm.a
/usr/lib/x86_64-linux-gnu/libm.a
/usr/local/DS-5_v5.21.1/sw/gcc/arm-linux-gnueabihf/libc/usr/lib/arm-linux-gnueabi/libm.a
/usr/local/DS-5_v5.21.1/sw/gcc/arm-linux-gnueabihf/libc/usr/lib/arm-linux-gnueabihf/libm.a
And yes I have downloaded gcc-4.7, 4.8 and 4.9, because I thought may be some tool chain error is there! Should I remove all and keep one only?
interesting.... you should go to askubuntu or other specialised forums, this is not about opencv
Okay. I have done some changes..using cmake-gui. I am getting this error now on make command: -
make[2]: * [3rdparty/lib/libzlib.a] Error 2
make[1]: * [3rdparty/zlib/CMakeFiles/zlib.dir/all] Error 2
make: * [all] Error 2
I have check, 3rdparty/lib is empty
Does anyone knows how to add this patch?? May be this will solve the problem: -
http://lists.busybox.net/pipermail/bu...