Skip to content

Add options for Emscripten platform #24961

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mattangus
Copy link

Summary

Changes to recipe: opencv/4.x

Automatically detects when the user is compiling for emscripten.

Motivation

Related to #13171. The use can set these options themselves. But with the default options when compiling with emsdk, the compilation will fail.

Details

This sets the options found in platforms/js/build_js.py. I didn't want to add more options, so it assumes that the user would have passed the --build_wasm and --simd flag to that script.


@CLAassistant
Copy link

CLAassistant commented Aug 16, 2024

CLA assistant check
All committers have signed the CLA.

@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Contributor

Conan v1 pipeline ✔️

All green in build 2 (c891068f0773283b72b915a33ffbbc43e6a9527e):

  • opencv/4.1.2:
    All packages built successfully! (All logs)

  • opencv/4.8.1:
    All packages built successfully! (All logs)

  • opencv/4.5.3:
    All packages built successfully! (All logs)

  • opencv/4.10.0:
    All packages built successfully! (All logs)

  • opencv/4.5.5:
    All packages built successfully! (All logs)

  • opencv/4.9.0:
    All packages built successfully! (All logs)


Conan v2 pipeline ❌

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping @conan-io/barbarians on the PR and we will help you.

Sorry, the build is only launched for Access Request users. You can request access writing in this issue.

Copy link
Contributor

Hooks produced the following warnings for commit c891068
opencv/4.1.2@#da6af861294ed4cf10631e1545a9063a
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 'd3d11' 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_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_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 'd3d11' but it is not in cpp_info.system_libs.
opencv/4.8.1@#7186ebcbe6d9da01a5e95b450385951e
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio481d.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_videoio481d.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_videoio481d.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_videoio481d.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_videoio481.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_videoio481.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_videoio481.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_videoio481.dll' links to system library 'd3d11' but it is not in cpp_info.system_libs.
opencv/4.5.3@#9b76faaee22d86cf833fdbc7fe6a792f
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_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_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_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 '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 '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 'dxgi' but it is not in cpp_info.system_libs.
opencv/4.10.0@#e81f921c9caede9a82877132067dcfb8
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio4100.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_videoio4100.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_videoio4100.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_videoio4100.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_videoio4100d.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_videoio4100d.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_videoio4100d.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_videoio4100d.dll' links to system library 'mfreadwrite' but it is not in cpp_info.system_libs.
opencv/4.5.5@#bc98380c6efcdb133cf88d81d216f684
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 '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 '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_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 '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 '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 'mf' but it is not in cpp_info.system_libs.
opencv/4.9.0@#839c06a2943c3814c0a990da5c364bdc
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\opencv_videoio490d.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_videoio490d.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_videoio490d.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_videoio490d.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_videoio490.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_videoio490.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_videoio490.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_videoio490.dll' links to system library 'mf' but it is not in cpp_info.system_libs.

@perseoGI
Copy link
Contributor

Hi @mattangus, I've just merged this branch with master, is there any progress on this PR?

@mattangus
Copy link
Author

I was hoping to get some feedback on the proper way to set these options. It doesn't leave much room for customization. Is there a way to specify the default options for emscripten.

self.options.shared = False
self.options.fPIC = False
self.options.parallel = False
self.options.with_ipp = False
self.options.with_eigen = False
self.options.with_opencl = False
self.options.with_cuda = False
self.options.with_cublas = False
self.options.with_cufft = False
self.options.with_cudnn = False
self.options.cuda_arch_bin = False
self.options.cpu_baseline = ""
self.options.cpu_dispatch = ""
self.options.with_vulkan = False
self.options.dnn_cuda = False
self.options.with_qt = False
self.options.with_jpeg = False
self.options.with_png = False
self.options.with_tiff = False
self.options.with_jpeg2000 = False
self.options.with_openexr = False
self.options.with_webp = False
self.options.with_imgcodec_hdr = False
self.options.with_imgcodec_pfm = False
self.options.with_imgcodec_pxm = False
self.options.with_imgcodec_sunraster = False
self.options.with_quirc = False
self.options.with_ffmpeg = False
self.options.gapi = False
self.options.calib3d = True
self.options.dnn = True
self.options.flann = True
self.options.imgcodecs = False
self.options.videoio = False

@mattangus mattangus marked this pull request as ready for review December 4, 2024 09:02
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jul 11, 2025
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.

5 participants