Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opencv/4.x: fix disabling dnn #18489

Closed
wants to merge 3 commits into from

Conversation

mologie
Copy link
Contributor

@mologie mologie commented Jul 11, 2023

Specify library name and version: opencv/4.x

Cases existed where dnn_cuda would be deleted twice, which would crash the recipe in configure().

For example, when I build for macOS arm64 with -o dnn=False, I would get the following error:

ERROR: opencv/4.5.5: Error in configure() method, line 164
	del self.options.dnn_cuda
	ConanException: option 'dnn_cuda' doesn't exist
Possible options are ['shared', 'contrib', 'parallel', 'with_ipp', 'with_ade', 'with_jpeg', 'with_png', 'with_tiff', 'with_jpeg2000', 'with_openexr', 'with_eigen', 'with_webp', 'with_quirc', 'with_cuda', 'with_ffmpeg', 'with_imgcodec_hdr', 'with_imgcodec_pfm', 'with_imgcodec_pxm', 'with_imgcodec_sunraster', 'neon', 'dnn', 'cuda_arch_bin', 'cpu_baseline', 'cpu_dispatch', 'nonfree']

Cases existed where dnn_cude would be deleted twice, which would
crash the recipe in configure().
@CLAassistant
Copy link

CLAassistant commented Jul 11, 2023

CLA assistant check
All committers have signed the CLA.

@ghost
Copy link

ghost commented Jul 11, 2023

@conan-center-bot

This comment has been minimized.

@github-actions
Copy link
Contributor

Hooks produced the following warnings for commit d2a1538
opencv/4.1.2
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio412.dll' links to system library 'd3d11' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio412.dll' links to system library 'mf' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio412.dll' links to system library 'mfreadwrite' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio412d.dll' links to system library 'mf' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio412d.dll' links to system library 'mfreadwrite' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio412d.dll' links to system library 'd3d11' but it is not in cpp_info.system_libs.
opencv/4.5.3
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio453d.dll' links to system library 'd3d11' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio453d.dll' links to system library 'dxgi' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio453d.dll' links to system library 'mfreadwrite' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_gapi453d.dll' links to system library 'wsock32' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio453d.dll' links to system library 'mf' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_gapi453.dll' links to system library 'wsock32' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio453.dll' links to system library 'mf' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio453.dll' links to system library 'dxgi' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio453.dll' links to system library 'mfreadwrite' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio453.dll' links to system library 'd3d11' but it is not in cpp_info.system_libs.
opencv/4.5.5
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio455d.dll' links to system library 'dxgi' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio455d.dll' links to system library 'mfreadwrite' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio455d.dll' links to system library 'd3d11' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio455d.dll' links to system library 'mf' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_gapi455d.dll' links to system library 'wsock32' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_gapi455.dll' links to system library 'wsock32' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio455.dll' links to system library 'mf' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio455.dll' links to system library 'mfreadwrite' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio455.dll' links to system library 'd3d11' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio455.dll' links to system library 'dxgi' but it is not in cpp_info.system_libs.

@mologie
Copy link
Contributor Author

mologie commented Jul 13, 2023

The CI pipeline fails due to conflicting libwebp versions in opencv and ffmpeg. Failure is unrelated to this MR:

Graph error
    Version conflict: ffmpeg/4.4->libwebp/1.3.0, None->libwebp/1.3.1.
ERROR: Version conflict: ffmpeg/4.4->libwebp/1.3.0, None->libwebp/1.3.1.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2023

Hooks produced the following warnings for commit c5db332
opencv/4.5.5
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_gapi455d.dll' links to system library 'wsock32' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio455d.dll' links to system library 'd3d11' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio455d.dll' links to system library 'mf' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio455d.dll' links to system library 'dxgi' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio455d.dll' links to system library 'mfreadwrite' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio455.dll' links to system library 'dxgi' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio455.dll' links to system library 'mfreadwrite' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_gapi455.dll' links to system library 'wsock32' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio455.dll' links to system library 'mf' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio455.dll' links to system library 'd3d11' but it is not in cpp_info.system_libs.
opencv/4.5.3
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio453d.dll' links to system library 'mfreadwrite' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_gapi453d.dll' links to system library 'wsock32' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio453d.dll' links to system library 'dxgi' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio453d.dll' links to system library 'mf' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio453d.dll' links to system library 'd3d11' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio453.dll' links to system library 'mfreadwrite' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio453.dll' links to system library 'd3d11' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_gapi453.dll' links to system library 'wsock32' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio453.dll' links to system library 'mf' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio453.dll' links to system library 'dxgi' but it is not in cpp_info.system_libs.

uilianries
uilianries previously approved these changes Aug 9, 2023
Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

You could replace rm by self.options.rm_safe("with_cuda") that's not affected by double removing.

@conan-center-bot

This comment has been minimized.

1 similar comment
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

15 similar comments
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@ghost ghost mentioned this pull request Aug 13, 2023
3 tasks
@conan-center-bot

This comment has been minimized.

@ghost ghost mentioned this pull request Aug 13, 2023
3 tasks
@SSE4
Copy link
Contributor

SSE4 commented Aug 14, 2023

@conan-center-bot you're drunk 🍺

@conan-center-bot

This comment has been minimized.

1 similar comment
@conan-center-bot

This comment has been minimized.

@mologie
Copy link
Contributor Author

mologie commented Aug 14, 2023

Seems like this is no longer needed: #15193 landed in master and completely replaces how OpenCV modules are selected. The bug where a dnn option was deleted twice is gone too.

Closing, hopefully that stops the bot spam too...

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ❌

Failure in build 28 (ced8da1306072e132099a5ce68d66b99ad7c5564):

  • opencv/4.5.5@:
    command 'git merge --no-ff 07b8de1' failed with exit code 1:
    Auto-merging recipes/opencv/4.x/conanfile.py
    CONFLICT (content): Merge conflict in recipes/opencv/4.x/conanfile.py
    Automatic merge failed; fix conflicts and then commit the result.

  • opencv/4.1.2@:
    Didn't run or was cancelled before finishing

  • opencv/4.5.3@:
    Didn't run or was cancelled before finishing


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.


Conan v2 pipeline ❌

Regression: Conan v2 builds are mandatory and they are required for the PR to be merged, because this recipe worked with Conan v2 previously.

The v2 pipeline failed. Please, review the errors and note this will be required for pull requests to be merged in the near future.

See details:

Failure in build 4 (ced8da1306072e132099a5ce68d66b99ad7c5564):

  • opencv/4.5.5@:
    Didn't run or was cancelled before finishing

  • opencv/4.5.3@:
    Didn't run or was cancelled before finishing

  • opencv/4.1.2@:
    command 'git merge --no-ff 07b8de1' failed with exit code 1:
    Auto-merging recipes/opencv/4.x/conanfile.py
    CONFLICT (content): Merge conflict in recipes/opencv/4.x/conanfile.py
    Automatic merge failed; fix conflicts and then commit the result.


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants