CMake: xfeatures2d fails when using world (Bug #3944)


Added by Philipp Hasper over 10 years ago. Updated over 9 years ago.


Status:Done Start date:2014-10-06
Priority:Normal Due date:
Assignee:Maksim Shabunin % Done:

0%

Category:build/install
Target version:3.0
Affected version:branch 'master' (3.0-dev) Operating System:iOS
Difficulty: HW Platform:Any
Pull request:https://github.com/Itseez/opencv/pull/3666

Description

CMake fails to generate when both the contrib-module xfeatures2d and the world module are activated:

CMake Error at cmake/OpenCVUtils.cmake:767 (add_library):
  Cannot find source file:

    C:/3rdparty/OpenCV/build64/modules/xfeatures2d/opencl_kernels_xfeatures2d.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx
Call Stack (most recent call first):
  cmake/OpenCVModule.cmake:644 (ocv_add_library)
  cmake/OpenCVModule.cmake:631 (_ocv_create_module)
  modules/world/CMakeLists.txt:45 (ocv_create_module)

The error also occurs when OpenCL is disabled


Related issues

related to Bug #4391: opencv_contrib_world build fails New 2015-06-08

History

Updated by Ilya Lavrenov over 10 years ago

  • Assignee set to Alexander Alekhin
  • Status changed from New to Open

Updated by Ilya Lavrenov over 10 years ago

  • Category set to build/install

Updated by Philipp Hasper over 10 years ago

  • Target version set to 3.0-beta

Updated by Philipp Hasper over 10 years ago

Tried it with the current "3.0.0-beta" tags and it did not work.

Updated by Steven Puttemans over 10 years ago

Alpha and beta only agree to built perfectly without OpenCL or CUDA functionality.
Can you report back the bugs you are getting?

Updated by Philipp Hasper over 10 years ago

I get the CMake error mentioned in the above description which results in no build files being generated. Which bugs do you mean?

Updated by Derek Zhang over 10 years ago

same here, running the build_framework.py for iOS platform and encountered this error. Disabling world option will let it compile but it will not be able to link the modules after compiling to create an iOS framework. I searched everywhere and this missing header file opencl_kernels_xfeatures2d.hpp is nowhere to be found. This is on the latest github clone.

Updated by Maksim Shabunin almost 10 years ago

  • Target version changed from 3.0-beta to 3.0

Updated by Maksim Shabunin almost 10 years ago

It is possible to build separate framework for contrib modules:

python ../opencv/platforms/ios/build_framework.py --contrib ../opencv_contrib output_dir

The `world` module does not include contrib modules. There is now separate `contrib_world` module.

  • Status changed from Open to Done
  • Pull request set to https://github.com/Itseez/opencv/pull/3666
  • Operating System changed from Any to iOS

Updated by Philipp Hasper almost 10 years ago

I fear that this is not yet finished. Under Windows, the error described in the bug report still persists. Using 'contrib_world' does not fix the problem - as long as 'world' is activated, CMake fails with the same message. The mentioned file does not exist

  • Status changed from Done to Incomplete

Updated by Alexander Alekhin almost 10 years ago

Philipp Hasper wrote:

I fear that this is not yet finished. Under Windows, the error described in the bug report still persists. Using 'contrib_world' does not fix the problem - as long as 'world' is activated, CMake fails with the same message. The mentioned file does not exist

The mentioned file is auto generated and used only with OpenCL.
Are you sure that bug message is same and it is not about cyclic dependencies? (cmake -G "Visual Studio 11 Win64" -DBUILD_SHARED_LIBS=ON -DBUILD_opencv_world=ON -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules -DWITH_OPENCL=OFF ../opencv)

Updated by Philipp Hasper almost 10 years ago

Alexander Alekhin wrote:

The mentioned file is auto generated and used only with OpenCL.
Are you sure that bug message is same and it is not about cyclic dependencies?

Yes, we experienced the exact same error with Visual Studio 12 Win64 but with OPENCL=ON

Updated by Alexander Alekhin almost 10 years ago

Philipp Hasper wrote:

Yes, we experienced the exact same error with Visual Studio 12 Win64 but with OPENCL=ON

Configure step is fine for current master branch:
cmake -G "Visual Studio 11 Win64" -DBUILD_SHARED_LIBS=OFF -DBUILD_opencv_world=ON -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules -DWITH_OPENCL=ON ../opencv

Problem is only here:
cmake -G "Visual Studio 11 Win64" -DBUILD_SHARED_LIBS=ON -DBUILD_opencv_world=ON -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules -DWITH_OPENCL=OFF ../opencv
but it is another story:

CMake Error: The inter-target dependency graph contains the following strongly connected component (cycle):
  "opencv_world" of type SHARED_LIBRARY
    depends on "opencv_xfeatures2d" (weak)
  "opencv_xfeatures2d" of type SHARED_LIBRARY
    depends on "opencv_world" (weak)
At least one of these targets is not a STATIC_LIBRARY.  Cyclic dependencies are allowed only among static libraries.

Please check again with full cleanup of the build directory (with removing of CMakeCache.txt).

Updated by Alexander Alekhin over 9 years ago

Is this problem still persists?

Updated by Alexander Alekhin over 9 years ago

Original problem was resolved

  • Status changed from Incomplete to Done
  • Assignee changed from Alexander Alekhin to Maksim Shabunin

Also available in: Atom PDF