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 0.93.4 fails to build when using another bindgen library #635

Closed
yuntao3568 opened this issue Nov 18, 2024 · 2 comments
Closed

opencv 0.93.4 fails to build when using another bindgen library #635

yuntao3568 opened this issue Nov 18, 2024 · 2 comments

Comments

@yuntao3568
Copy link

【Environment】

  1. Operating system:windows11
  2. The way I installed OpenCV:Download the opencv-4.9.0-windows.exe installation package from the official website

The following environment variables are set:
屏幕截图 2024-11-18 231222

  1. OpenCV version:4.9.0
  2. rustc version:rustc 1.82.0 (f6e511eec 2024-10-15)

【Phenomenon Description】
I used bindgen tool to generate a carte HKGYMVS 0.1.0 because I used a third party camera. Then I want to go ahead and add your carte opencv, then I get an error: a 'libclang' shared library is not loaded on this thread. PS. Created a new project containing only opencv cartes that can be used normally.

https://github.com/yuntao3568/HKGYMVS

log.txt

Then, I find a solution for Troubleshooting: Enable the clang-runtime feature. change opencv = { version = "0.93.4" } to opencv = { version = "0.93.4", features = ["clang-runtime"] },still not working properly:Failed to run the bindings generator for module: highgui , Failed to run the bindings generator for module: calib3d, etc.

log2.txt

【My Ignorant Guesss】
Is it possible that calling bindgen twice has caused some parameters to be affected between the two invocations, leading to a failure in the normal building of opencv? Below is the address for HKGYMVS that I created myself:https://github.com/yuntao3568/HKGYMVS

Please, dear author, save this poor soul.ಥ_ಥ

@yuntao3568 yuntao3568 changed the title opencv 0.93.4 cannot be built when a third party bindgen cartes is used. opencv 0.93.4 fails to build when using another bindgen library Nov 18, 2024
@twistedfall
Copy link
Owner

twistedfall commented Nov 19, 2024

Sorry, I replied in a hurry without reading your post thoroughly! There is currently an issue on windows with clang-19 with having clang-runtime enabled. It's originating in the clang crate and the only workaround for now is downgrading clang or disabling clang-runtime. Any help investigating it is greatly appreciated!

@twistedfall
Copy link
Owner

This has been reported before here: #628 so I'm going to close this issue in favor of that earlier one.

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

No branches or pull requests

2 participants