opencv3 beta and python3.4 (Bug #4212)


Added by Hille Bergmann about 10 years ago. Updated about 10 years ago.


Status:Cancelled Start date:2015-02-23
Priority:Normal Due date:2015-02-25
Assignee:Roman Donchenko % Done:

100%

Category:build/install
Target version:3.0-beta Estimated time:2.00 hours
Affected version:branch 'master' (3.0-dev) Operating System:Linux
Difficulty:Easy HW Platform:x64
Pull request:

Description

I cannot seem to compile opencv3 with python3.4 in a virtual environment.
When i try i get the following error:

[ 86%] Building CXX object modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o
Linking CXX shared library ../../lib/python3/cv2.cpython-34m.so
/usr/bin/ld: /usr/local/lib/libpython3.4m.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.4m.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make2: * [lib/python3/cv2.cpython-34m.so] Error 1
make1:
[modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2
make: *
* [all] Error 2

I see that some have succedded in building opencv3 with python 3 earlier, so i am wondering if something has been changed in the beta.
This is my cmake configuration:

cmake -DCMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_C_EXAMPLES=ON \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D WITH_QT=ON \
-D WITH_OPENGL=ON \
-D WITH_V4L=ON \
-D WITH_TBB=ON \
-D BUILD_NEW_PYTHON_SUPPORT=ON \
-D BUILD_EXAMPLES=ON .. \
-D PYTHON3_EXECUTABLE=/home/bdi/virtualenvs/p34/bin/python3 \
-D PYTHON_INCLUDE_DIR=/home/bdi/virtualenvs/p34/include/python3.4m \
-D PYTHON_INCLUDE_DIR2=/usr/include/x86_64-linux-gnu/python3.4m \
-D PYTHON3_NUMPY_INCLUDE_DIRS=/home/bdi/virtualenvs/p34/lib/python3.4/site-packages/numpy/core/include/numpy \
-D PYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.4m.a \
-D PYTHON3_PACKAGES_PATH=/home/bdi/virtualenvs/p34/lib/python3.4/site-packages ..

i am running it on an ubuntu 14.04 64 bit machine.


Associated revisions

Revision bd8bac27
Added by Vadim Pisarevsky over 9 years ago

Merge pull request #4212 from ludv1x:master

History

Updated by Hille Bergmann about 10 years ago

There was no bug, mere mistake.
I can update docs with a build example

  • Status changed from New to Cancelled
  • % Done changed from 0 to 100

Also available in: Atom PDF