Skip to content

Conversation

asmorkalov
Copy link
Contributor

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@alalek
Copy link
Member

alalek commented Jan 13, 2021

Check the issue #1301 and this comment.

Root cause of configuration failure (broken compilation) is that ocv_module_disable() doesn't work properly on the second modules pass (too late).

There are several workarounds:

  • update .cache manually
  • disable -DBUILD_opencv_xfeatures2d=OFF

Proper fix should look like:

  • add "optional" support for these blobs (#ifdef DATA_BLOBS_DOWNLOADED + Error::StsNotImplemented otherwise) instead of whole module disabling
  • try to fix ocv_module_disable()

Current proposal just hides the problem (which is not a problem in standard normal build environment). With the same success this can be done through -DBUILD_opencv_xfeatures2d=OFF CMake flag without changes in codebase.

@asmorkalov
Copy link
Contributor Author

@alalek I added extra definitions and guards in code. The module is always enabled, but some classes can be not implemented (exception).

@alalek
Copy link
Member

alalek commented Jan 14, 2021

#2820

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants