-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
cannot find function ... in module $crate::sys
#479
Comments
Can you please try using version 0.83 of the crate to see if it fixes your build issue? |
I have tried 0.83 and set VCPKGRS_DYNAMIC to "1",but get a lot of link error |
I met the same issue, and rolling back to 0.83 solved it. |
@leng-yue @yuyidegit Did you by any chance try running |
@twistedfall After cleaning, the 0.84.4 works now. |
Thanks for checking, I'm investigating! |
After cleaning, use 0.84.4 and set VCPKGRS_DYNAMIC to "1",get a lot of link error just like use 0.83,but in wsl it works @twistedfall . |
I have same error with windows 11, vcpkg opencv 4.8, VCPKGRS_DYNAMIC = 1 |
+1, I run into this regularly on x64 Linux, specifically Fedora 37. I'm running the latest bindings: 694 | unsafe { sys::std_vectorLintG_inputOutputArray(self.as_raw_mut_VectorOfi32(), ocvrs_return.as_mut_ptr()) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `std_vectorLfloatG_inputOutputArray` Interestingly when I do cargo clean, 2-5 times, I'll eventually get a successful compilation. I don't really understand why a compilation will eventually work, subject to (n) number of cargo clean's and recompilation attempts. I did not encounter this issue until I recently did a [dependencies.opencv]
version = "0.84.5" #correct cc version --- see https://github.com/twistedfall/opencv-rust/issues/480 for upgrading
features = ["clang-runtime", "photo", "imgcodecs", "imgproc"] Resolved the hang issue, but not this. I speculated perhaps the build process wasn't complete when the rust compiler proceeds resulting in those missing functions. opencv version is 4.6(stock with Fedora 37) |
@chriskyndrid I have tried reproducing this issue in a fresh Fedora 37 docker container. I installed git, clang, opencv and opencv-devel into it. And I installed rust using rustup. In a new cargo project with the following [package]
name = "opencv-test"
version = "0.1.0"
edition = "2021"
[dependencies]
opencv = { version = "0.84.5", features = ["clang-runtime", "photo", "imgcodecs", "imgproc"]} and use opencv::core;
use opencv::prelude::*;
use opencv::types::*;
fn main() {
println!("Hello, world!");
println!("{}", core::get_build_information().unwrap());
let v = VectorOfi32::new();
dbg!(v);
} I have tried numerous (about 10) times to trigger this issue in both debug and release mode by running Will it possible for you to share the full build log |
@twistedfall thanks for getting back to me and your work on this crate. I will see what I can do. The project is quite large(it's a full fledged ERP system WIP with a lot of dependencies, ancillary functionality, etc). It's also made slightly more difficult as the problem is transient. As an example I just did a non -vv run build and was greeted with:
etc.... Of course adjusting my run script to include -vv, and built fine. I'll keep running cargo clean && cargo run -vv and see if I can get a good capture. |
This issue should now be fixed in 0.85.3 |
build.log
The text was updated successfully, but these errors were encountered: