Possible BUG when compiling OpenCV 3.0 with TBB enabled?

Update: Check here a different approach to the problem reported in this post.

If you are trying to compile OpenCV 3.0 on (X)Ubuntu 14.04 and are facing problems, for example, to make the Python modules installed this post is just a warning. I couldn’t find many references regarding this problem on Internet. I have spent a whole day trying to understand why I was not able to compile OpenCV 3.0 with the Python modules. I thought that the problem was with my Python libraries installation but this BUG report called my attention, and voilá: I have disabled my WITH_TBB compilation option and everything is fine!

I have always compiled previous versions of OpenCV installing from Synaptic the libtbb-dev library. This time, however, I realized that with WITH_TBB option enabled, I got the following output from the CMake configure process:

Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.6", minimum required is "2.7")
Could NOT find PythonLibs (missing: PYTHON_INCLUDE_DIRS) (found suitable exact version "2.7.6")
Found PythonInterp: /usr/bin/python3.4 (found suitable version "3.4", minimum required is "3.4")
Could NOT find PythonLibs (missing: PYTHON_LIBRARIES) (Required is exact version "3.4.0")

Which results in:

  OpenCV modules:
    To be built:                 hal cudev core cudaarithm flann imgproc ml video cudabgsegm cudafilters cudaimgproc cudawarping imgcodecs photo shape videoio cudacodec highgui objdetect ts features2d calib3d cudafeatures2d cudalegacy cudaobjdetect cudaoptflow cudastereo java stitching superres videostab
    Disabled:                    world
    Disabled by dependency:      -
    Unavailable:                 python2 python3 viz

WEIRDLY, with WITH_TBB option DISABLED I get the following messages:

Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.6", minimum required is "2.7") 
Found PythonInterp: /usr/bin/python3.4 (found suitable version "3.4", minimum required is "3.4") 
Could NOT find PythonLibs (missing:  PYTHON_INCLUDE_DIRS) (found suitable exact version "3.4.0")

Which results in:

  OpenCV modules:
    To be built:                 hal cudev core cudaarithm flann imgproc ml video cudabgsegm cudafilters cudaimgproc cudawarping imgcodecs photo shape videoio cudacodec highgui objdetect ts features2d calib3d cudafeatures2d cudalegacy cudaobjdetect cudaoptflow cudastereo java stitching superres videostab python2
    Disabled:                    world
    Disabled by dependency:      -
    Unavailable:                 python3 viz

THEN, I have decided to enable the option BUILD_TBB option which downloads and build TBB from source. The version downloaded was tbb41_20130116oss_src.tgz and everything ran smoothly!!!

I really hope that this post avoid your frustration and time spent with stupidity.

Anúncios

Deixe seu comentário

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair / Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair / Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair / Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair / Alterar )

Conectando a %s