build/cmake: python2 seems to depend on opencv_world (Bug #4112)


Added by Florian Verdet about 10 years ago. Updated over 9 years ago.


Status:New Start date:2015-01-09
Priority:Low Due date:
Assignee:Maksim Shabunin % Done:

0%

Category:documentation
Target version:3.1
Affected version:branch 'master' (3.0-dev) Operating System:Linux
Difficulty: HW Platform:x64
Pull request:

Description

cmake configuring seems to depend the activation of python2 module on BUILD_opencv_world=OFF.

Is this an intended behaviour?
If yes, it idealy should be documented in a decent location (maybe even cmake-description for BUILD_opencv_world).
This kept me crazy for some hours...

Effect of BUILD_opencv_world on python2 module (only most important bits):

  • case A
    cmake -D BUILD_opencv_world=ON [...]
    

    --   OpenCV modules:
    --     Unavailable:                 [...] python2
    --   Python 2:
    --     Interpreter:                 /usr/bin/python2.7 (ver 2.7.6)
    --     Libraries:                   NO
    --     numpy:                       /usr/lib/python2.7/dist-packages/numpy/core/include (ver 1.8.2)
    --     packages path:               /usr/local/lib/python2.7/dist-packages
    
  • case B
    cmake -D BUILD_opencv_world=OFF [...]
    

    --   OpenCV modules:
    --     To be built:                 [...] python2
    --   Python 2:
    --     Interpreter:                 /usr/bin/python2.7 (ver 2.7.6)
    --     Libraries:                   optimized /usr/lib/x86_64-linux-gnu/libpython2.7.so debug /usr/lib/x86_64-linux-gnu/libpython2.7_d.so (ver 2.7.6)
    --     numpy:                       /usr/lib/python2.7/dist-packages/numpy/core/include (ver 1.8.2)
    --     packages path:               /usr/local/lib/python2.7/dist-packages
    

Full cmake option list, generated output and CMakeCache.txt/version_string.tmp are attached.

OpenCV 3.0 from git/master (28833421aec6b85c47228a2955b148390031e964).
System: up-to-date Ubuntu 14.04.1 (3.13.0-43-generic x86_64).


_config.fail.sh - cmake command with BUILD_opencv_world=ON (2.5 kB) Florian Verdet, 2015-01-09 11:13 am

cmake_output_fail.log - output of cmake for BUILD_opencv_world=ON (16.7 kB) Florian Verdet, 2015-01-09 11:13 am

CMakeCache.fail.txt - CMakeCache.txt for BUILD_opencv_world=ON (247.4 kB) Florian Verdet, 2015-01-09 11:13 am

version_string.fail.tmp - version_string.tmp for BUILD_opencv_world=ON (6.6 kB) Florian Verdet, 2015-01-09 11:13 am

_config.ok.sh - cmake command with BUILD_opencv_world=OFF (2.5 kB) Florian Verdet, 2015-01-09 11:13 am

cmake_output_ok.log - output of cmake for BUILD_opencv_world=OFF (15.4 kB) Florian Verdet, 2015-01-09 11:13 am

CMakeCache.ok.txt - CMakeCache.txt for BUILD_opencv_world=OFF (222.9 kB) Florian Verdet, 2015-01-09 11:13 am

version_string.ok.tmp - version_string.tmp for BUILD_opencv_world=OFF (6.7 kB) Florian Verdet, 2015-01-09 11:13 am


Associated revisions

Revision 0c67c6c1
Added by Vadim Pisarevsky over 9 years ago

Merge pull request #4112 from sturkmen72:patch-1

History

Updated by Florian Verdet about 10 years ago

Ups, indeed I meant:
"If yes, it idealy should be documented in a decent location (maybe even cmake-description for BUILD_opencv_python2)."

Updated by Maksim Shabunin almost 10 years ago

Wrapper modules (python, java) should not be built with world (from modules/python/CMakeLists.txt):

if((WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug")
    OR BUILD_opencv_world
    )
  ocv_module_disable(python2)
  ocv_module_disable(python3)
endif()

So, it is probably documentation issue. This behaviour should be described somewhere.

  • Description changed from cmake configuring seems to depend the activation of python2 module on BUILD_... to cmake configuring seems to depend the activation of python2 module on BUILD_o... More
  • Category changed from build/install to documentation
  • Target version changed from 3.0 to 3.1

Updated by Maksim Shabunin almost 10 years ago

  • Assignee changed from Roman Donchenko to Maksim Shabunin

Updated by Maksim Shabunin over 9 years ago

Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/4902

Also available in: Atom PDF