Ask Your Question

mr_enthusiasm's profile - activity

2015-04-30 18:10:05 -0600 answered a question Linking problems while building 3.0.0 on 64 bit linux

For some reason I installed my own static C libraries in /usr/local. OpenCV assumes if you put C libraries there you did it on purpose and uses them instead of the ones installed at /lib. Removing the ones in /usr/local solved the problem.

2015-04-24 00:21:17 -0600 asked a question Linking problems while building 3.0.0 on 64 bit linux

For some reason my linker keeps trying to link against the static version of libc instead of the dynamic version when building from source. I also tried setting the cmake flag BUILD_SHARED_LIBRARIES to OFF but this led to other problems. Full error below.

Linking CXX shared library ../../lib/libopencv_videoio.so /usr/bin/ld: /usr/local/lib/libc.a(lib_a-mallocr.o): relocation R_X86_64_32S against `__malloc_av_' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libc.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status make[2]: * [lib/libopencv_videoio.so.3.0.0] Error 1 make[1]: [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2 make: ** [all] Error 2