I am trying to install OpenCV3 but I keep getting this error:
usr/bin/ld: /usr/local/lib/libpython3.5m.a(abstract.o): relocation R_X86_64_32S against `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpython3.5m.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
modules/python3/CMakeFiles/opencv_python3.dir/build.make:224: recipe for target 'lib/python3/cv2.cpython-35m-x86_64-linux-gnu.so' failed
make[2]: *** [lib/python3/cv2.cpython-35m-x86_64-linux-gnu.so] Error 1
CMakeFiles/Makefile2:7226: recipe for target 'modules/python3/CMakeFiles/opencv_python3.dir/all' failed
make[1]: *** [modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2
Any idea on how to solve it?
Related
mlpack was perfectly compiling on my systems a few days back. I don't know what I did that's causing the following strange linking error:
[ 37%] Linking CXX shared library ../../lib/libmlpack.so
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib/libiberty.a(cplus-dem.o): warning: relocation against `libiberty_demanglers' in read-only section `.text'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib/libiberty.a(cp-demangle.o): relocation R_X86_64_PC32 against symbol `cplus_demangle_builtin_types' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [src/mlpack/CMakeFiles/mlpack.dir/build.make:1040: lib/libmlpack.so.3.4] Error 1
make[1]: *** [CMakeFiles/Makefile2:2106: src/mlpack/CMakeFiles/mlpack.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
I tried adding the -fPIC flag to the cmake file but it still gives the same error
I was trying to compile an example app from ZED2 camera, but when I execute make after cmake .. It throws me error as follows:
make[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/libusb-1.0.so', needed by 'ZED_Depth_Sensing'. Stop.
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ZED_Depth_Sensing.dir/all' failed
make[1]: *** [CMakeFiles/ZED_Depth_Sensing.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
then I made the symlink :
libusb-1.0.so -> /usr/lib/x86_64-linux-gnu/libusb-1.0.so.0
libusb-1.0.so.0 -> /lib/i386-linux-gnu/libusb-1.0.so.0
and try to make again, this time it throws me this error:
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libusb-1.0.so when searching for -lusb-1.0
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libusb-1.0.so when searching for -lusb-1.0
/usr/bin/ld: skipping incompatible //usr/lib/x86_64-linux-gnu/libusb-1.0.so when searching for -lusb-1.0
/usr/bin/ld: cannot find -lusb-1.0
collect2: error: ld returned 1 exit status
CMakeFiles/ZED_Depth_Sensing.dir/build.make:131: recipe for target 'ZED_Depth_Sensing' failed
make[2]: *** [ZED_Depth_Sensing] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ZED_Depth_Sensing.dir/all' failed
make[1]: *** [CMakeFiles/ZED_Depth_Sensing.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
How to fix this?
make powerdns it give error don't know how to resolve it
error CXX epollmplexer.o
CXXLD dnsdist
/usr/bin/ld: libssl.o: undefined reference to symbol 'CRYPTO_get_ex_new_index##OPENSSL_1_1_0'
//usr/lib/x86_64-linux-gnu/libcrypto.so.1.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:1206: recipe for target 'dnsdist' failed
make[2]: *** [dnsdist] Error 1
make[2]: Leaving directory '/root/pdns/pdns/dnsdistdist'
Makefile:1443: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/root/pdns/pdns/dnsdistdist'
Makefile:1077: recipe for target 'all' failed
make: *** [all] Error 2
You need to add "-lcrypto" to your linker command.
I'm trying to compile GCC from scratch like I used to do when I used Linux a lot, I'm trying to install Sourcemage but the compiler version of GCC is 4.6 and the latest version is 8.2.0, so I compiled everything needed to compile GCC from scratch, and everything is going well while compiling the compiler until the very end when it starts giving me a linker error related to libmpfr.so:
Here's what I get when I do my typical make -j3:
/usr/lib/../lib/libmpfr.so: undefined reference to `__gmpn_com'
collect2: error: ld returned 1 exit status
make[3]: *** [../.././gcc/lto/Make-lang.in:81: lto1] Error 1
make[3]: *** Waiting for unfinished jobs....
/usr/lib/../lib/libmpfr.so: undefined reference to `__gmpn_com'
collect2: error: ld returned 1 exit status
make[3]: *** [../.././gcc/c/Make-lang.in:85: cc1] Error 1
/usr/lib/../lib/libmpfr.so: undefined reference to `__gmpn_com'
collect2: error: ld returned 1 exit status
make[3]: *** [../.././gcc/cp/Make-lang.in:120: cc1plus] Error 1
make[2]: *** [Makefile:4657: all-stage2-gcc] Error 2
make[1]: *** [Makefile:22203: stage2-bubble] Error 2
make: *** [Makefile:944: all] Error 2
If you want to look at the full output of the error then I provide a pastebin: https://pastebin.com/g5sn3jDv
I'm trying to install RGBdemo in linux mint, I have installed previous libraries and packages. When I run sudo make install I get the following error:
/usr/bin/ld: CMakeFiles/Sample-Players.dir/main.cpp.o: undefined reference to symbol 'glOrtho'
//usr/lib/i386-linux-gnu/mesa/libGL.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: * [bin/Sample-Players] Error 1
make[1]: * [nestk/deps/openni/Nite/Samples/Players/CMakeFiles/Sample-Players.dir/all] Error 2
make: *** [all] Error 2
Any suggestion?? I'm not a programmer and really I have a poor background in programming