when I run this command to install OpenCV with Python module
cmake ../ -DCMAKE_BUILD_TYPE=RELEASE
-DCMAKE_INSTALL_PREFIX=/usr/local
-DBUILD_EXAMPLES=ON
-DBUILD_NEW_PYTHON_SUPPORT=ON
-DINSTALL_PYTHON_EXAMPLES=ON
-DPYTHON_EXECUTABLE=/usr/local/bin/python2.7
-DPYTHON_INCLUDE_DIR=/usr/local/include/python2.7/
-DPYTHON_LIBRARY=/usr/local/lib/python2.7/config/libpython2.7.a
-DPYTHON_NUMPY_INCLUDE_DIR=/usr/local/lib/python2.7/site-packages/numpy/core/include/
-DPYTHON_PACKAGES_PATH=/usr/local/lib/python2.7/site-packages/
-DBUILD_PYTHON_SUPPORT=ON
I get this error message.
/usr/bin/ld: /usr/local/lib/python2.7/config/libpython2.7.a(abstract.o): relocation R_X86_64_32
against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/python2.7/config/libpython2.7.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [lib/cv2.so] Error 1
make[1]: *** [modules/python/CMakeFiles/opencv_python.dir/all] Error 2
make: *** [all] Error 2
I can't understand what is wrong and the error message.
Is there someone who can tell me what is wrong with this?
By the way, My OS is CentOS.
and I use Python2.7.5