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

Ubuntu Gnome X11 Error while running #653

Open
vladceresna opened this issue Mar 9, 2025 · 13 comments
Open

Ubuntu Gnome X11 Error while running #653

vladceresna opened this issue Mar 9, 2025 · 13 comments

Comments

@vladceresna
Copy link

  1. Operating system
    Ubuntu Gnome X11
  2. The way you installed OpenCV: package, official binary distribution, manual compilation, etc.
    OpenCV installed via cargo package
  3. OpenCV version
    opencv = "0.94.2"
  4. rustc version (rustc --version)
    rustc 1.82.0 (2024-10-15)
  5. Attach the full output of the following command from your project directory: shell script RUST_BACKTRACE=full cargo build -vv
    cargo run RUST_BACKTRACE=full cargo build -vv
    target/debug/opencvx: symbol lookup error: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE

My code:

use opencv::prelude::*;
use opencv::{highgui, videoio, Result};

fn main() -> Result<()> {
    
    let window = "video capture";
    highgui::named_window(window, highgui::WINDOW_AUTOSIZE)?;

    let mut cam = videoio::VideoCapture::new(0, videoio::CAP_ANY)?;
    let opened = videoio::VideoCapture::is_opened(&cam)?;
    if !opened {
        panic!("Unable to open default camera!");
    }

    loop {
        let mut frame = Mat::default();
        cam.read(&mut frame)?;
        if frame.size()?.width > 0 {
            highgui::imshow(window, &frame)?;
        }
        let key = highgui::wait_key(10)?;
        if key > 0 && key != 255 {
            break;
        }
    }

    // Очистка
    highgui::destroy_all_windows()?;
    Ok(())
}
@twistedfall
Copy link
Owner

The error seems to be unrelated to the crate on the first glance, some kind of linking inconsistency on your system. But to be extra sure please provide the full output of cargo build -vv after running cargo clean.

@vladceresna
Copy link
Author

@twistedfall
Yes, this problem was in something else. But problem in OpenCV too exists. And Now, I have installed opencv 4.9.0 instead of 4.7.0. And I have another problem:

$ RUST_BACKTRACE=full cargo build -vv
       Fresh pkg-config v0.3.32
       Fresh libc v0.2.170
       Fresh cfg-if v1.0.0
       Fresh dasp_sample v0.11.0
       Fresh jobserver v0.1.32
       Fresh simd-adler32 v0.3.7
       Fresh shlex v1.3.0
       Fresh cc v1.2.16
       Fresh crossbeam-utils v0.8.21
       Fresh unicode-ident v1.0.18
       Fresh proc-macro2 v1.0.94
       Fresh crossbeam-epoch v0.9.18
       Fresh glob v0.3.2
       Fresh adler2 v2.0.0
       Fresh crossbeam-deque v0.8.6
       Fresh quote v1.0.39
       Fresh miniz_oxide v0.8.5
       Fresh dasp_frame v0.11.0
       Fresh syn v2.0.99
       Fresh rayon-core v1.12.1
       Fresh crc32fast v1.4.2
       Fresh quick-xml v0.30.0
       Fresh aho-corasick v1.1.3
       Fresh bitflags v1.3.2
       Fresh autocfg v1.4.0
       Fresh regex-syntax v0.8.5
       Fresh regex-automata v0.4.9
       Fresh clang-sys v1.8.1
       Fresh flate2 v1.1.0
       Fresh dasp_ring_buffer v0.11.0
       Fresh either v1.15.0
       Fresh rayon v1.10.0
       Fresh regex v1.11.1
       Fresh clang v2.0.0
       Fresh fdeflate v0.3.7
       Fresh dunce v1.0.5
       Fresh weezl v0.1.8
       Fresh once_cell v1.20.3
       Fresh percent-encoding v2.3.1
       Fresh png v0.17.16
       Fresh xcb v1.5.0
       Fresh opencv-binding-generator v0.89.1
       Fresh jpeg-decoder v0.3.1
       Fresh num-traits v0.2.19
       Fresh anyhow v1.0.97
       Fresh libdbus-sys v0.2.5
       Fresh semver v1.0.26
       Fresh dasp_rms v0.11.0
       Fresh serde_derive v1.0.218
       Fresh dasp_peak v0.11.0
       Fresh zune-inflate v0.2.54
       Fresh half v2.4.1
       Fresh vcpkg v0.2.15
       Fresh color_quant v1.1.0
       Fresh bit_field v0.10.2
       Fresh lebe v0.5.2
       Fresh bytemuck v1.22.0
       Fresh smallvec v1.14.0
       Fresh qoi v0.4.1
       Fresh exr v1.73.0
       Fresh gif v0.13.1
       Fresh dasp_envelope v0.11.0
       Fresh serde v1.0.218
       Fresh display-info v0.4.8
       Fresh dbus v0.9.7
       Fresh alsa-sys v0.3.1
       Fresh tiff v0.9.1
       Fresh dasp_interpolate v0.11.0
       Fresh thiserror-impl v1.0.69
       Fresh memmap2 v0.8.0
       Fresh dasp_window v0.11.1
       Fresh itoa v1.0.15
       Fresh bitflags v2.9.0
       Fresh byteorder v1.5.0
       Fresh xkeysym v0.2.1
       Fresh ryu v1.0.20
       Fresh memchr v2.7.4
       Fresh image v0.24.9
       Fresh xkbcommon v0.7.0
       Fresh serde_json v1.0.140
       Fresh alsa v0.9.1
warning: field `0` is never read
   --> /home/vlad/.cargo/registry/src/index.crates.io-6f17d22bba15001f/alsa-0.9.1/src/hctl.rs:113:21
    |
113 | pub struct Elem<'a>(&'a HCtl, *mut alsa::snd_hctl_elem_t);
    |            ----     ^^^^^^^^
    |            |
    |            field in this struct
    |
    = note: `#[warn(dead_code)]` on by default
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
    |
113 | pub struct Elem<'a>((), *mut alsa::snd_hctl_elem_t);
    |                     ~~

       Fresh dasp_signal v0.11.0
       Fresh thiserror v1.0.69
warning: `alsa` (lib) generated 1 warning
       Fresh screenshots v0.5.4
       Fresh dasp_slice v0.11.0
       Fresh log v0.4.26
       Fresh vosk-sys v0.2.0
       Fresh spectrust v0.2.0
       Fresh dasp v0.11.0
       Fresh enigo v0.2.1
       Fresh vosk v0.3.1
       Fresh opencv v0.91.3
       Fresh cpal v0.15.3
   Compiling opencvx v0.1.0 (/home/vlad/projects-mp/opencvx)
     Running `CARGO=/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_BIN_NAME=opencvx CARGO_CRATE_NAME=opencvx CARGO_MANIFEST_DIR=/home/vlad/projects-mp/opencvx CARGO_PKG_AUTHORS='' CARGO_PKG_DESCRIPTION='' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=opencvx CARGO_PKG_README='' CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.1.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=1 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH='/home/vlad/projects-mp/opencvx/target/debug/deps:/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib:/usr/local/lib:/usr/local/lib:' /home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name opencvx --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=124 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values())' -C metadata=9d0e339c0fd4f4ba -C extra-filename=-9d0e339c0fd4f4ba --out-dir /home/vlad/projects-mp/opencvx/target/debug/deps -C incremental=/home/vlad/projects-mp/opencvx/target/debug/incremental -L dependency=/home/vlad/projects-mp/opencvx/target/debug/deps --extern cpal=/home/vlad/projects-mp/opencvx/target/debug/deps/libcpal-7f68dc4ebf939b0c.rlib --extern dasp=/home/vlad/projects-mp/opencvx/target/debug/deps/libdasp-db949cf092fc5882.rlib --extern enigo=/home/vlad/projects-mp/opencvx/target/debug/deps/libenigo-cf261e3c273c84cd.rlib --extern opencv=/home/vlad/projects-mp/opencvx/target/debug/deps/libopencv-7a4aa8aef90d0021.rlib --extern spectrust=/home/vlad/projects-mp/opencvx/target/debug/deps/libspectrust-4b9181adc240d279.rlib --extern vosk=/home/vlad/projects-mp/opencvx/target/debug/deps/libvosk-5b0ffbdc12e2a24e.rlib -L native=/usr/lib/x86_64-linux-gnu -L native=/home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out -L /usr/local/lib -L native=/home/vlad/projects-mp/opencvx/target/debug/build/libdbus-sys-e8a43d99afac053e/out -L native=/home/vlad/projects-mp/opencvx/target/debug/build/libdbus-sys-e8a43d99afac053e/out`
warning: unused variable: `model_path`
  --> src/main.rs:46:9
   |
46 |     let model_path = "models/handpose_estimation_mediapipe_2023feb.onnx";
   |         ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_model_path`
   |
   = note: `#[warn(unused_variables)]` on by default

error: linking with `cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/vlad/.local/bin:/home/vlad/.sdkman/candidates/java/current:/home/vlad/.cargo/bin:/home/vlad/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/vlad/.local/bin:/home/vlad/.local/bin:/home/vlad/.local/bin:/home/vlad/.local/bin:/home/vlad/.local/bin" VSLANG="1033" "cc" "-m64" "/tmp/rustc1rfv0b/symbols.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.08f9xadlsz50l3r8mq8do9jps.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.13gzk74exuo4murz3evdfyv6f.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.13sg4a8jri6t0ba4lwzr07lib.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.1b44pinzbjvlwpio11bjvy7e7.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.1enfdquq9pkav9v6g0mmdg09l.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.1ern7z1nzm18xqg25j24slea9.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.2mnegx1fuu7ccgelu0ebh25t9.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.2o7tke1yw8y1hpu561vmw5rv8.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.33chr74o5slrfnco92c5tr4r0.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.362ia2w1porisptx58nf4vd03.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.386a3bsonjqlk3qmzagmbo7tc.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.39tvj5fmeo7m23nb52f7elfy9.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.3ebjkocqfc4l8epkif12o4a62.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.43dr164iam80k7pj2au798c4n.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.48x8txjanbm5p06som1n9ikdo.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.4ivaep9hr5p1yyz7eb2i6rpgv.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.4rq3oh98pqef72xnjaiqqp0gq.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.62s5tkh1b6hz7l2qj9l13cgyk.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.68lvsiuorlcxk0fgb8mops49i.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.6hnqlxqbeexfrr1hf47b85alo.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.6ux28wyr630rdyfywwzmmp93m.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.718dom1fn2p4htggsu9yw5vy1.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.7osazs5ao38jfaizadzzeqp5p.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.7rgn6h0gni0iteo2isktiys00.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.7z5ahpv31zruyo2sluh0wzwvr.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.91yvthylprb0wrvfj4u93r1jc.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.9ccft70h22jg29kwcb3e6zqdv.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.9jwefg9ajnpgfzzblpq4h54w7.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.9rlr4oqczovoamwjd3qfnt2uk.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.9yxfepsf2goe3nr847pppagtg.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.a0fy4ov759fy5bswp17ni0jqf.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.a6i2rjw5lhdtymfydzynvb6e8.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.aavsi3o6sl7vn71j9pffbt89u.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.aeqaie4usvvv53xjgb332eiq6.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.afofxqp217kib4fkquo2otybt.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.ajjzn3alpaa18nrmoebryj89s.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.avpnqd3aos92jxcrhcsbq0xbn.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.b095nbc5dlvtiiqbg5cyoscil.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.bkltku1dve8grdpwcq4x3fzcm.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.br8es922ylmytezzsolu0plnd.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.c39gsqui1cxfmmbjxvm78kr4l.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.cextoxxlc1ja6mjqxncee4sjw.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.cqccbx6pbno6pc7gwpsjv4ga3.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.cqyiu3h7gvcrj43t6q5uibyhr.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.csam98lr42vajnn7ngahdzmtg.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.d7jogknsn3ks33sew9o81bj7i.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.dof052ybkio4ay9hyl3q9cwou.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.e2tpomvdr5ldti98n1p0wlcmi.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.epnqm92bfrhcqyra7w04pgjrj.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.er8yy9pwtsh5jb3a43rr3dr33.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.es8jy1316f38ibzvlgwoddiul.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.f3h2vo64z84us0utjvl5c4jrg.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.9rwsodtf1ftyxqfwjoh5bwo5b.rcgu.o" "-Wl,--as-needed" "-Wl,-Bstatic" "/home/vlad/projects-mp/opencvx/target/debug/deps/libenigo-cf261e3c273c84cd.rlib" "/home/vlad/projects-mp/opencvx/target/debug/deps/libxkeysym-d102b96f92252e41.rlib" "/home/vlad/projects-mp/opencvx/target/debug/deps/liblog-6b19a077236027eb.rlib" "/home/vlad/projects-mp/opencvx/target/debug/deps/libopencv-7a4aa8aef90d0021.rlib" "/home/vlad/projects-mp/opencvx/target/debug/deps/liblibc-7856a3e6deaaaf7d.rlib" "/home/vlad/projects-mp/opencvx/target/debug/deps/libnum_traits-713450490ce27758.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-22be60875a4ac8d7.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-4b832a03827ff95e.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-a25e7f31e2204719.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-1f1858edbb50ccb5.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-1319b75889377807.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-c9972d847170eb93.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-0868a75d0b80f801.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-f4254a923640cbea.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-f21de9b2e2c92770.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-cf868f78468d45dd.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-cce9a55233783113.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-6ef1f692f91f321e.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-d2b4a3bc57672e2c.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-9d8e4e6f4cb45592.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-858b7338441a56b6.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-d182631d04e1eed2.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-7874c355ab5ed077.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-46b25da62cc69443.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-c71612932829263c.rlib" "-Wl,-Bdynamic" "-lxdo" "-lstdc++" "-lopencv_gapi" "-lopencv_highgui" "-lopencv_ml" "-lopencv_objdetect" "-lopencv_photo" "-lopencv_stitching" "-lopencv_video" "-lopencv_calib3d" "-lopencv_features2d" "-lopencv_dnn" "-lopencv_flann" "-lopencv_videoio" "-lopencv_imgcodecs" "-lopencv_imgproc" "-lopencv_core" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/usr/lib/x86_64-linux-gnu" "-L" "/home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out" "-L" "/usr/local/lib" "-L" "/home/vlad/projects-mp/opencvx/target/debug/build/libdbus-sys-e8a43d99afac053e/out" "-L" "/home/vlad/projects-mp/opencvx/target/debug/build/libdbus-sys-e8a43d99afac053e/out" "-L" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
  = note: /usr/bin/ld: /home/vlad/projects-mp/opencvx/target/debug/deps/libopencv-7a4aa8aef90d0021.rlib(f67b9ac5dada827e-dnn.o): in function `cv_dnn_blobFromImage_const__InputArrayR_double_const_SizeR_const_ScalarR_bool_bool_int':
          /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/dnn.cpp:126:(.text.cv_dnn_blobFromImage_const__InputArrayR_double_const_SizeR_const_ScalarR_bool_bool_int+0xb3): undefined reference to `cv::dnn::dnn4_v20231225::blobFromImage(cv::_InputArray const&, double, cv::Size_<int> const&, cv::Scalar_<double> const&, bool, bool, int)'
          /usr/bin/ld: /home/vlad/projects-mp/opencvx/target/debug/deps/libopencv-7a4aa8aef90d0021.rlib(f67b9ac5dada827e-dnn.o): in function `cv_dnn_readNetFromONNX_const_StringR':
          /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/dnn.cpp:364:(.text.cv_dnn_readNetFromONNX_const_StringR+0x56): undefined reference to `cv::dnn::dnn4_v20231225::readNetFromONNX(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
          /usr/bin/ld: /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/dnn.cpp:366:(.text.cv_dnn_readNetFromONNX_const_StringR+0xa6): undefined reference to `cv::dnn::dnn4_v20231225::Net::~Net()'
          /usr/bin/ld: /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/dnn.cpp:366:(.text.cv_dnn_readNetFromONNX_const_StringR+0xf8): undefined reference to `cv::dnn::dnn4_v20231225::Net::~Net()'
          /usr/bin/ld: /home/vlad/projects-mp/opencvx/target/debug/deps/libopencv-7a4aa8aef90d0021.rlib(f67b9ac5dada827e-dnn.o): in function `cv_dnn_Net_forward_const__OutputArrayR_const_vectorLStringGR':
          /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/dnn.cpp:4893:(.text.cv_dnn_Net_forward_const__OutputArrayR_const_vectorLStringGR+0x30): undefined reference to `cv::dnn::dnn4_v20231225::Net::forward(cv::_OutputArray const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)'
          /usr/bin/ld: /home/vlad/projects-mp/opencvx/target/debug/deps/libopencv-7a4aa8aef90d0021.rlib(f67b9ac5dada827e-dnn.o): in function `cv_dnn_Net_setInput_const__InputArrayR_const_StringR_double_const_ScalarR':
          /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/dnn.cpp:4956:(.text.cv_dnn_Net_setInput_const__InputArrayR_const_StringR_double_const_ScalarR+0x81): undefined reference to `cv::dnn::dnn4_v20231225::Net::setInput(cv::_InputArray const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, double, cv::Scalar_<double> const&)'
          /usr/bin/ld: /home/vlad/projects-mp/opencvx/target/debug/deps/libopencv-7a4aa8aef90d0021.rlib(f67b9ac5dada827e-dnn.o): in function `cv_dnn_Net_getUnconnectedOutLayersNames_const':
          /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/dnn.cpp:5019:(.text.cv_dnn_Net_getUnconnectedOutLayersNames_const+0x39): undefined reference to `cv::dnn::dnn4_v20231225::Net::getUnconnectedOutLayersNames[abi:cxx11]() const'
          /usr/bin/ld: /home/vlad/projects-mp/opencvx/target/debug/deps/libopencv-7a4aa8aef90d0021.rlib(f67b9ac5dada827e-dnn.o): in function `cv_dnn_Net_delete':
          /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/dnn.cpp:5162:(.text.cv_dnn_Net_delete+0x1e): undefined reference to `cv::dnn::dnn4_v20231225::Net::~Net()'
          collect2: error: ld returned 1 exit status
          
  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-lib)

warning: `opencvx` (bin "opencvx") generated 1 warning
error: could not compile `opencvx` (bin "opencvx") due to 1 previous error; 1 warning emitted

Caused by:
  process didn't exit successfully: `CARGO=/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_BIN_NAME=opencvx CARGO_CRATE_NAME=opencvx CARGO_MANIFEST_DIR=/home/vlad/projects-mp/opencvx CARGO_PKG_AUTHORS='' CARGO_PKG_DESCRIPTION='' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=opencvx CARGO_PKG_README='' CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.1.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=1 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH='/home/vlad/projects-mp/opencvx/target/debug/deps:/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib:/usr/local/lib:/usr/local/lib:' /home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name opencvx --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=124 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values())' -C metadata=9d0e339c0fd4f4ba -C extra-filename=-9d0e339c0fd4f4ba --out-dir /home/vlad/projects-mp/opencvx/target/debug/deps -C incremental=/home/vlad/projects-mp/opencvx/target/debug/incremental -L dependency=/home/vlad/projects-mp/opencvx/target/debug/deps --extern cpal=/home/vlad/projects-mp/opencvx/target/debug/deps/libcpal-7f68dc4ebf939b0c.rlib --extern dasp=/home/vlad/projects-mp/opencvx/target/debug/deps/libdasp-db949cf092fc5882.rlib --extern enigo=/home/vlad/projects-mp/opencvx/target/debug/deps/libenigo-cf261e3c273c84cd.rlib --extern opencv=/home/vlad/projects-mp/opencvx/target/debug/deps/libopencv-7a4aa8aef90d0021.rlib --extern spectrust=/home/vlad/projects-mp/opencvx/target/debug/deps/libspectrust-4b9181adc240d279.rlib --extern vosk=/home/vlad/projects-mp/opencvx/target/debug/deps/libvosk-5b0ffbdc12e2a24e.rlib -L native=/usr/lib/x86_64-linux-gnu -L native=/home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out -L /usr/local/lib -L native=/home/vlad/projects-mp/opencvx/target/debug/build/libdbus-sys-e8a43d99afac053e/out -L native=/home/vlad/projects-mp/opencvx/target/debug/build/libdbus-sys-e8a43d99afac053e/out` (exit status: 1)

And this is my deps:

[dependencies]
cpal = "0.15.3"
dasp = "0.11.0"
opencv = { version = "0.91.0", features = ["dnn"] }
enigo = "0.2.1"

spectrust = "0.2.0"
vosk = "0.3.1"

And this is my code:

use opencv::{
    core, dnn, prelude::*, videoio,
};
use enigo::{Enigo, Mouse, Settings};
use std::collections::VecDeque;
use std::time::Duration;
use std::thread;

struct SmoothMouse {
    positions: VecDeque<(i32, i32)>,
    capacity: usize,
}

impl SmoothMouse {
    fn new(capacity: usize) -> Self {
        Self {
            positions: VecDeque::with_capacity(capacity),
            capacity,
        }
    }

    fn add(&mut self, x: i32, y: i32) {
        if self.positions.len() == self.capacity {
            self.positions.pop_front();
        }
        self.positions.push_back((x, y));
    }

    fn average(&self) -> Option<(i32, i32)> {
        if self.positions.is_empty() {
            None
        } else {
            let sum: (i32, i32) = self.positions.iter().fold((0, 0), |(sx, sy), &(x, y)| (sx + x, sy + y));
            let count = self.positions.len() as i32;
            Some((sum.0 / count, sum.1 / count))
        }
    }
}

fn main() {
    // Инициализация камеры
    let mut cam = videoio::VideoCapture::new(0, videoio::CAP_ANY).expect("Не удалось открыть камеру");
    let mut frame = core::Mat::default();

    // Инициализация модели для обнаружения рук
    let model_path = "models/handpose_estimation_mediapipe_2023feb.onnx";

    let mut net = match dnn::read_net_from_onnx("handpose_estimation_mediapipe_2023feb.onnx") {
        Ok(net) => net,
        Err(e) => panic!("Ошибка загрузки модели: {:?}", e),
    };

    // Инициализация Enigo для управления мышью
    let mut enigo = Enigo::new(&Settings::default()).unwrap();

    // Разрешение экрана
    let screen_width = 1600;
    let screen_height = 900;

    // Сглаживание по 5 кадрам
    let mut smooth_mouse = SmoothMouse::new(5);

    println!("Программа запущена с OpenCV 4.9.0. Нажмите Ctrl+C для завершения.");

    // Основной цикл обработки видео
    loop {
        cam.read(&mut frame).expect("Не удалось прочитать кадр");
        if frame.size().unwrap().width == 0 {
            continue;
        }

        let finger_pos = detect_finger(&frame, &mut net);

        if let Some((finger_x, finger_y)) = finger_pos {
            let frame_width = frame.cols();
            let frame_height = frame.rows();

            let mouse_x = (finger_x as f32 / frame_width as f32 * screen_width as f32) as i32;
            let mouse_y = (finger_y as f32 / frame_height as f32 * screen_height as f32) as i32;

            smooth_mouse.add(mouse_x, mouse_y);
            if let Some((avg_x, avg_y)) = smooth_mouse.average() {
                enigo.move_mouse(avg_x, avg_y, enigo::Coordinate::Abs).unwrap();
            }
        }

        thread::sleep(Duration::from_millis(10));
    }
}

fn detect_finger(frame: &core::Mat, net: &mut dnn::Net) -> Option<(i32, i32)> {
    // Подготовка изображения для модели: 3 канала (RGB), размер 256x256
    let blob = match dnn::blob_from_image(
        frame,
        1.0 / 255.0,                    // Нормализация до [0, 1]
        core::Size::new(256, 256),      // Размер входа модели
        core::Scalar::new(0.0, 0.0, 0.0, 0.0), // Среднее значение для нормализации
        true,                           // SwapRB (BGR -> RGB)
        false,                          // Не обрезать
        core::CV_32F,                   // Тип данных
    ) {
        Ok(blob) => blob,
        Err(e) => {
            eprintln!("Не удалось создать blob: {:?}", e);
            return None;
        }
    };

    println!("Размер blob: {:?}", blob.size());

    if let Err(e) = net.set_input(&blob, "", 1.0, core::Scalar::default()) {
        eprintln!("Не удалось установить вход: {:?}", e);
        return None;
    }

    let mut outputs = core::Vector::<core::Mat>::new();
    if let Err(e) = net.forward(&mut outputs, &net.get_unconnected_out_layers_names().unwrap()) {
        eprintln!("Не удалось выполнить forward: {:?}", e);
        return None;
    }

    if let Ok(output) = outputs.get(0) {
        let data = match output.data_typed::<f32>() {
            Ok(data) => data,
            Err(e) => {
                eprintln!("Не удалось получить данные выхода: {:?}", e);
                return None;
            }
        };
        let num_points = 21;
        let confidence_threshold = 0.5;

        for i in 0..num_points {
            let confidence = data[i * 3 + 2];
            if confidence > confidence_threshold {
                let x = (data[i * 3] * frame.cols() as f32) as i32;
                let y = (data[i * 3 + 1] * frame.rows() as f32) as i32;
                if i == 8 { // Кончик указательного пальца
                    println!("Обнаружен палец: ({}, {}) с уверенностью {}", x, y, confidence);
                    return Some((x, y));
                }
            }
        }
    } else {
        eprintln!("Не удалось получить выходной слой");
    }
    None
}

Is this OpenCV binding support OpenCV Zoo models? For example as in my situation hand detection?

@vladceresna
Copy link
Author

$ cargo run
   Compiling alsa-sys v0.3.1
   Compiling alsa v0.9.1
   Compiling cpal v0.15.3
   Compiling opencvx v0.1.0 (/home/vlad/projects-mp/opencvx)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.74s
     Running `target/debug/opencvx`
target/debug/opencvx: symbol lookup error: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE
$ RUST_BACKTRACE=full cargo build -vv
       Fresh pkg-config v0.3.32
       Fresh libc v0.2.170
       Fresh cfg-if v1.0.0
       Fresh shlex v1.3.0
       Fresh jobserver v0.1.32
       Fresh dasp_sample v0.11.0
       Fresh simd-adler32 v0.3.7
       Fresh cc v1.2.16
       Fresh crossbeam-utils v0.8.21
       Fresh unicode-ident v1.0.18
       Fresh crossbeam-epoch v0.9.18
       Fresh proc-macro2 v1.0.94
       Fresh adler2 v2.0.0
       Fresh glob v0.3.2
       Fresh miniz_oxide v0.8.5
       Fresh crossbeam-deque v0.8.6
       Fresh quote v1.0.39
       Fresh dasp_frame v0.11.0
       Fresh rayon-core v1.12.1
       Fresh syn v2.0.99
       Fresh crc32fast v1.4.2
       Fresh aho-corasick v1.1.3
       Fresh quick-xml v0.30.0
       Fresh bitflags v1.3.2
       Fresh autocfg v1.4.0
       Fresh regex-syntax v0.8.5
       Fresh regex-automata v0.4.9
       Fresh flate2 v1.1.0
       Fresh clang-sys v1.8.1
       Fresh dasp_ring_buffer v0.11.0
       Fresh either v1.15.0
       Fresh rayon v1.10.0
       Fresh clang v2.0.0
       Fresh regex v1.11.1
       Fresh fdeflate v0.3.7
       Fresh percent-encoding v2.3.1
       Fresh dunce v1.0.5
       Fresh weezl v0.1.8
       Fresh once_cell v1.20.3
       Fresh num-traits v0.2.19
       Fresh opencv-binding-generator v0.89.1
       Fresh png v0.17.16
       Fresh semver v1.0.26
       Fresh jpeg-decoder v0.3.1
       Fresh xcb v1.5.0
       Fresh anyhow v1.0.97
       Fresh libdbus-sys v0.2.5
       Fresh dasp_rms v0.11.0
       Fresh serde_derive v1.0.218
       Fresh dasp_peak v0.11.0
       Fresh zune-inflate v0.2.54
       Fresh half v2.4.1
       Fresh lebe v0.5.2
       Fresh smallvec v1.14.0
       Fresh color_quant v1.1.0
       Fresh bit_field v0.10.2
       Fresh vcpkg v0.2.15
       Fresh bytemuck v1.22.0
       Fresh exr v1.73.0
       Fresh qoi v0.4.1
       Fresh gif v0.13.1
       Fresh serde v1.0.218
       Fresh dasp_envelope v0.11.0
       Fresh dbus v0.9.7
       Fresh display-info v0.4.8
       Fresh tiff v0.9.1
       Fresh alsa-sys v0.3.1
       Fresh dasp_interpolate v0.11.0
       Fresh thiserror-impl v1.0.69
       Fresh dasp_window v0.11.1
       Fresh memmap2 v0.8.0
       Fresh xkeysym v0.2.1
       Fresh bitflags v2.9.0
       Fresh ryu v1.0.20
       Fresh byteorder v1.5.0
       Fresh memchr v2.7.4
       Fresh itoa v1.0.15
       Fresh alsa v0.9.1
       Fresh image v0.24.9
       Fresh xkbcommon v0.7.0
       Fresh serde_json v1.0.140
       Fresh dasp_signal v0.11.0
       Fresh thiserror v1.0.69
       Fresh screenshots v0.5.4
       Fresh dasp_slice v0.11.0
       Fresh vosk-sys v0.2.0
       Fresh log v0.4.26
       Fresh spectrust v0.2.0
       Fresh opencv v0.91.3
       Fresh dasp v0.11.0
       Fresh enigo v0.2.1
       Fresh vosk v0.3.1
       Fresh cpal v0.15.3
       Fresh opencvx v0.1.0 (/home/vlad/projects-mp/opencvx)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.10s

But my first code with imshow returned this error also

@twistedfall
Copy link
Owner

The crate supports whatever your system OpenCV installation supports, so it should be fine. The error indicates a problem linking with dnn module of OpenCV. Please do a cargo clean and then post a full output of cargo build -vv. The log will contain debug information that could help to debug the issue.

@vladceresna
Copy link
Author

cargo clean
cargo build -vv
This is output

warning: `opencv` (lib) generated 114 warnings
   Compiling opencvx v0.1.0 (/home/vlad/projects-mp/opencvx)
     Running `CARGO=/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_BIN_NAME=opencvx CARGO_CRATE_NAME=opencvx CARGO_MANIFEST_DIR=/home/vlad/projects-mp/opencvx CARGO_PKG_AUTHORS='' CARGO_PKG_DESCRIPTION='' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=opencvx CARGO_PKG_README='' CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.1.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=1 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH='/home/vlad/projects-mp/opencvx/target/debug/deps:/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib:/usr/local/lib:/usr/local/lib:' /home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name opencvx --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=124 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values())' -C metadata=9d0e339c0fd4f4ba -C extra-filename=-9d0e339c0fd4f4ba --out-dir /home/vlad/projects-mp/opencvx/target/debug/deps -C incremental=/home/vlad/projects-mp/opencvx/target/debug/incremental -L dependency=/home/vlad/projects-mp/opencvx/target/debug/deps --extern cpal=/home/vlad/projects-mp/opencvx/target/debug/deps/libcpal-7f68dc4ebf939b0c.rlib --extern dasp=/home/vlad/projects-mp/opencvx/target/debug/deps/libdasp-db949cf092fc5882.rlib --extern enigo=/home/vlad/projects-mp/opencvx/target/debug/deps/libenigo-cf261e3c273c84cd.rlib --extern opencv=/home/vlad/projects-mp/opencvx/target/debug/deps/libopencv-7a4aa8aef90d0021.rlib --extern spectrust=/home/vlad/projects-mp/opencvx/target/debug/deps/libspectrust-4b9181adc240d279.rlib --extern vosk=/home/vlad/projects-mp/opencvx/target/debug/deps/libvosk-5b0ffbdc12e2a24e.rlib -L native=/usr/lib/x86_64-linux-gnu -L native=/home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out -L /usr/local/lib -L native=/home/vlad/projects-mp/opencvx/target/debug/build/libdbus-sys-e8a43d99afac053e/out -L native=/home/vlad/projects-mp/opencvx/target/debug/build/libdbus-sys-e8a43d99afac053e/out`
warning: unused variable: `model_path`
  --> src/main.rs:46:9
   |
46 |     let model_path = "models/handpose_estimation_mediapipe_2023feb.onnx";
   |         ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_model_path`
   |
   = note: `#[warn(unused_variables)]` on by default

error: linking with `cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/vlad/.local/bin:/home/vlad/.sdkman/candidates/java/current:/home/vlad/.cargo/bin:/home/vlad/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/vlad/.local/bin:/home/vlad/.local/bin:/home/vlad/.local/bin:/home/vlad/.local/bin:/home/vlad/.local/bin" VSLANG="1033" "cc" "-m64" "/tmp/rustcuCLsfO/symbols.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.08f9xadlsz50l3r8mq8do9jps.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.13gzk74exuo4murz3evdfyv6f.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.13sg4a8jri6t0ba4lwzr07lib.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.1b44pinzbjvlwpio11bjvy7e7.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.1enfdquq9pkav9v6g0mmdg09l.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.1ern7z1nzm18xqg25j24slea9.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.2mnegx1fuu7ccgelu0ebh25t9.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.2o7tke1yw8y1hpu561vmw5rv8.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.33chr74o5slrfnco92c5tr4r0.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.362ia2w1porisptx58nf4vd03.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.386a3bsonjqlk3qmzagmbo7tc.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.39tvj5fmeo7m23nb52f7elfy9.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.3ebjkocqfc4l8epkif12o4a62.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.43dr164iam80k7pj2au798c4n.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.48x8txjanbm5p06som1n9ikdo.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.4ivaep9hr5p1yyz7eb2i6rpgv.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.4rq3oh98pqef72xnjaiqqp0gq.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.62s5tkh1b6hz7l2qj9l13cgyk.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.68lvsiuorlcxk0fgb8mops49i.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.6hnqlxqbeexfrr1hf47b85alo.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.6ux28wyr630rdyfywwzmmp93m.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.718dom1fn2p4htggsu9yw5vy1.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.7osazs5ao38jfaizadzzeqp5p.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.7rgn6h0gni0iteo2isktiys00.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.7z5ahpv31zruyo2sluh0wzwvr.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.91yvthylprb0wrvfj4u93r1jc.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.9ccft70h22jg29kwcb3e6zqdv.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.9jwefg9ajnpgfzzblpq4h54w7.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.9rlr4oqczovoamwjd3qfnt2uk.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.9yxfepsf2goe3nr847pppagtg.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.a0fy4ov759fy5bswp17ni0jqf.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.a6i2rjw5lhdtymfydzynvb6e8.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.aavsi3o6sl7vn71j9pffbt89u.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.aeqaie4usvvv53xjgb332eiq6.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.afofxqp217kib4fkquo2otybt.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.ajjzn3alpaa18nrmoebryj89s.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.avpnqd3aos92jxcrhcsbq0xbn.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.b095nbc5dlvtiiqbg5cyoscil.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.bkltku1dve8grdpwcq4x3fzcm.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.br8es922ylmytezzsolu0plnd.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.c39gsqui1cxfmmbjxvm78kr4l.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.cextoxxlc1ja6mjqxncee4sjw.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.cqccbx6pbno6pc7gwpsjv4ga3.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.cqyiu3h7gvcrj43t6q5uibyhr.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.csam98lr42vajnn7ngahdzmtg.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.d7jogknsn3ks33sew9o81bj7i.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.dof052ybkio4ay9hyl3q9cwou.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.e2tpomvdr5ldti98n1p0wlcmi.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.epnqm92bfrhcqyra7w04pgjrj.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.er8yy9pwtsh5jb3a43rr3dr33.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.es8jy1316f38ibzvlgwoddiul.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.f3h2vo64z84us0utjvl5c4jrg.rcgu.o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba.9rwsodtf1ftyxqfwjoh5bwo5b.rcgu.o" "-Wl,--as-needed" "-Wl,-Bstatic" "/home/vlad/projects-mp/opencvx/target/debug/deps/libenigo-cf261e3c273c84cd.rlib" "/home/vlad/projects-mp/opencvx/target/debug/deps/libxkeysym-d102b96f92252e41.rlib" "/home/vlad/projects-mp/opencvx/target/debug/deps/liblog-6b19a077236027eb.rlib" "/home/vlad/projects-mp/opencvx/target/debug/deps/libopencv-7a4aa8aef90d0021.rlib" "/home/vlad/projects-mp/opencvx/target/debug/deps/liblibc-7856a3e6deaaaf7d.rlib" "/home/vlad/projects-mp/opencvx/target/debug/deps/libnum_traits-713450490ce27758.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-22be60875a4ac8d7.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-4b832a03827ff95e.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-a25e7f31e2204719.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-1f1858edbb50ccb5.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-1319b75889377807.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-c9972d847170eb93.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-0868a75d0b80f801.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-f4254a923640cbea.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-f21de9b2e2c92770.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-cf868f78468d45dd.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-cce9a55233783113.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-6ef1f692f91f321e.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-d2b4a3bc57672e2c.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-9d8e4e6f4cb45592.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-858b7338441a56b6.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-d182631d04e1eed2.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-7874c355ab5ed077.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-46b25da62cc69443.rlib" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-c71612932829263c.rlib" "-Wl,-Bdynamic" "-lxdo" "-lstdc++" "-lopencv_gapi" "-lopencv_highgui" "-lopencv_ml" "-lopencv_objdetect" "-lopencv_photo" "-lopencv_stitching" "-lopencv_video" "-lopencv_calib3d" "-lopencv_features2d" "-lopencv_dnn" "-lopencv_flann" "-lopencv_videoio" "-lopencv_imgcodecs" "-lopencv_imgproc" "-lopencv_core" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/usr/lib/x86_64-linux-gnu" "-L" "/home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out" "-L" "/usr/local/lib" "-L" "/home/vlad/projects-mp/opencvx/target/debug/build/libdbus-sys-e8a43d99afac053e/out" "-L" "/home/vlad/projects-mp/opencvx/target/debug/build/libdbus-sys-e8a43d99afac053e/out" "-L" "/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/vlad/projects-mp/opencvx/target/debug/deps/opencvx-9d0e339c0fd4f4ba" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
  = note: /usr/bin/ld: /home/vlad/projects-mp/opencvx/target/debug/deps/libopencv-7a4aa8aef90d0021.rlib(f67b9ac5dada827e-dnn.o): in function `cv_dnn_blobFromImage_const__InputArrayR_double_const_SizeR_const_ScalarR_bool_bool_int':
          /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/dnn.cpp:126:(.text.cv_dnn_blobFromImage_const__InputArrayR_double_const_SizeR_const_ScalarR_bool_bool_int+0xb3): undefined reference to `cv::dnn::dnn4_v20231225::blobFromImage(cv::_InputArray const&, double, cv::Size_<int> const&, cv::Scalar_<double> const&, bool, bool, int)'
          /usr/bin/ld: /home/vlad/projects-mp/opencvx/target/debug/deps/libopencv-7a4aa8aef90d0021.rlib(f67b9ac5dada827e-dnn.o): in function `cv_dnn_readNetFromONNX_const_StringR':
          /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/dnn.cpp:364:(.text.cv_dnn_readNetFromONNX_const_StringR+0x56): undefined reference to `cv::dnn::dnn4_v20231225::readNetFromONNX(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
          /usr/bin/ld: /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/dnn.cpp:366:(.text.cv_dnn_readNetFromONNX_const_StringR+0xa6): undefined reference to `cv::dnn::dnn4_v20231225::Net::~Net()'
          /usr/bin/ld: /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/dnn.cpp:366:(.text.cv_dnn_readNetFromONNX_const_StringR+0xf8): undefined reference to `cv::dnn::dnn4_v20231225::Net::~Net()'
          /usr/bin/ld: /home/vlad/projects-mp/opencvx/target/debug/deps/libopencv-7a4aa8aef90d0021.rlib(f67b9ac5dada827e-dnn.o): in function `cv_dnn_Net_forward_const__OutputArrayR_const_vectorLStringGR':
          /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/dnn.cpp:4893:(.text.cv_dnn_Net_forward_const__OutputArrayR_const_vectorLStringGR+0x30): undefined reference to `cv::dnn::dnn4_v20231225::Net::forward(cv::_OutputArray const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)'
          /usr/bin/ld: /home/vlad/projects-mp/opencvx/target/debug/deps/libopencv-7a4aa8aef90d0021.rlib(f67b9ac5dada827e-dnn.o): in function `cv_dnn_Net_setInput_const__InputArrayR_const_StringR_double_const_ScalarR':
          /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/dnn.cpp:4956:(.text.cv_dnn_Net_setInput_const__InputArrayR_const_StringR_double_const_ScalarR+0x81): undefined reference to `cv::dnn::dnn4_v20231225::Net::setInput(cv::_InputArray const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, double, cv::Scalar_<double> const&)'
          /usr/bin/ld: /home/vlad/projects-mp/opencvx/target/debug/deps/libopencv-7a4aa8aef90d0021.rlib(f67b9ac5dada827e-dnn.o): in function `cv_dnn_Net_getUnconnectedOutLayersNames_const':
          /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/dnn.cpp:5019:(.text.cv_dnn_Net_getUnconnectedOutLayersNames_const+0x39): undefined reference to `cv::dnn::dnn4_v20231225::Net::getUnconnectedOutLayersNames[abi:cxx11]() const'
          /usr/bin/ld: /home/vlad/projects-mp/opencvx/target/debug/deps/libopencv-7a4aa8aef90d0021.rlib(f67b9ac5dada827e-dnn.o): in function `cv_dnn_Net_delete':
          /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/dnn.cpp:5162:(.text.cv_dnn_Net_delete+0x1e): undefined reference to `cv::dnn::dnn4_v20231225::Net::~Net()'
          collect2: error: ld returned 1 exit status
          
  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-lib)

warning: `opencvx` (bin "opencvx") generated 1 warning
error: could not compile `opencvx` (bin "opencvx") due to 1 previous error; 1 warning emitted

Caused by:
  process didn't exit successfully: `CARGO=/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_BIN_NAME=opencvx CARGO_CRATE_NAME=opencvx CARGO_MANIFEST_DIR=/home/vlad/projects-mp/opencvx CARGO_PKG_AUTHORS='' CARGO_PKG_DESCRIPTION='' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=opencvx CARGO_PKG_README='' CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.1.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=1 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH='/home/vlad/projects-mp/opencvx/target/debug/deps:/home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib:/usr/local/lib:/usr/local/lib:' /home/vlad/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name opencvx --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=124 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values())' -C metadata=9d0e339c0fd4f4ba -C extra-filename=-9d0e339c0fd4f4ba --out-dir /home/vlad/projects-mp/opencvx/target/debug/deps -C incremental=/home/vlad/projects-mp/opencvx/target/debug/incremental -L dependency=/home/vlad/projects-mp/opencvx/target/debug/deps --extern cpal=/home/vlad/projects-mp/opencvx/target/debug/deps/libcpal-7f68dc4ebf939b0c.rlib --extern dasp=/home/vlad/projects-mp/opencvx/target/debug/deps/libdasp-db949cf092fc5882.rlib --extern enigo=/home/vlad/projects-mp/opencvx/target/debug/deps/libenigo-cf261e3c273c84cd.rlib --extern opencv=/home/vlad/projects-mp/opencvx/target/debug/deps/libopencv-7a4aa8aef90d0021.rlib --extern spectrust=/home/vlad/projects-mp/opencvx/target/debug/deps/libspectrust-4b9181adc240d279.rlib --extern vosk=/home/vlad/projects-mp/opencvx/target/debug/deps/libvosk-5b0ffbdc12e2a24e.rlib -L native=/usr/lib/x86_64-linux-gnu -L native=/home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out -L /usr/local/lib -L native=/home/vlad/projects-mp/opencvx/target/debug/build/libdbus-sys-e8a43d99afac053e/out -L native=/home/vlad/projects-mp/opencvx/target/debug/build/libdbus-sys-e8a43d99afac053e/out` (exit status: 1)

@twistedfall
Copy link
Owner

That's not the full output unfortunately, full log would be around 1000 lines

@vladceresna
Copy link
Author

I dont know how I can get all output. Just My terminal content size is not enough to show all output.
I can copy only this:

     = help: consider using a Cargo feature instead
     = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
              [lints.rust]
              unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_flann)'] }
     = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_flann)");` to the top of the `build.rs`
     = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_gapi`
    --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/sys.rs:6353:7
     |
6353 | #[cfg(ocvrs_has_module_gapi)]
     |       ^^^^^^^^^^^^^^^^^^^^^
     |
     = help: consider using a Cargo feature instead
     = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
              [lints.rust]
              unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_gapi)'] }
     = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_gapi)");` to the top of the `build.rs`
     = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_gapi`
    --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/sys.rs:7028:7
     |
7028 | #[cfg(ocvrs_has_module_gapi)]
     |       ^^^^^^^^^^^^^^^^^^^^^
     |
     = help: consider using a Cargo feature instead
     = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
              [lints.rust]
              unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_gapi)'] }
     = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_gapi)");` to the top of the `build.rs`
     = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_highgui`
    --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/sys.rs:7031:7
     |
7031 | #[cfg(ocvrs_has_module_highgui)]
     |       ^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: consider using a Cargo feature instead
     = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
              [lints.rust]
              unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_highgui)'] }
     = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_highgui)");` to the top of the `build.rs`
     = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_highgui`
    --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/sys.rs:7109:7
     |
7109 | #[cfg(ocvrs_has_module_highgui)]
     |       ^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: consider using a Cargo feature instead
     = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
              [lints.rust]
              unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_highgui)'] }
     = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_highgui)");` to the top of the `build.rs`
     = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_imgcodecs`
    --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/sys.rs:7112:7
     |
7112 | #[cfg(ocvrs_has_module_imgcodecs)]
     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: consider using a Cargo feature instead
     = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
              [lints.rust]
              unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_imgcodecs)'] }
     = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_imgcodecs)");` to the top of the `build.rs`
     = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_imgcodecs`
    --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/sys.rs:7154:7
     |
7154 | #[cfg(ocvrs_has_module_imgcodecs)]
     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: consider using a Cargo feature instead
     = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
              [lints.rust]
              unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_imgcodecs)'] }
     = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_imgcodecs)");` to the top of the `build.rs`
     = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_imgproc`
    --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/sys.rs:7157:7
     |
7157 | #[cfg(ocvrs_has_module_imgproc)]
     |       ^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: consider using a Cargo feature instead
     = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
              [lints.rust]
              unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_imgproc)'] }
     = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_imgproc)");` to the top of the `build.rs`
     = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_imgproc`
    --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/sys.rs:7563:7
     |
7563 | #[cfg(ocvrs_has_module_imgproc)]
     |       ^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: consider using a Cargo feature instead
     = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
              [lints.rust]
              unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_imgproc)'] }
     = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_imgproc)");` to the top of the `build.rs`
     = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_ml`
    --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/sys.rs:7566:7
     |
7566 | #[cfg(ocvrs_has_module_ml)]
     |       ^^^^^^^^^^^^^^^^^^^
     |
     = help: consider using a Cargo feature instead
     = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
              [lints.rust]
              unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_ml)'] }
     = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_ml)");` to the top of the `build.rs`
     = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_ml`
    --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/sys.rs:8007:7
     |
8007 | #[cfg(ocvrs_has_module_ml)]
     |       ^^^^^^^^^^^^^^^^^^^
     |
     = help: consider using a Cargo feature instead
     = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
              [lints.rust]
              unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_ml)'] }
     = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_ml)");` to the top of the `build.rs`
     = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_objdetect`
    --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/sys.rs:8010:7
     |
8010 | #[cfg(ocvrs_has_module_objdetect)]
     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: consider using a Cargo feature instead
     = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
              [lints.rust]
              unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_objdetect)'] }
     = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_objdetect)");` to the top of the `build.rs`
     = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_objdetect`
    --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/sys.rs:8515:7
     |
8515 | #[cfg(ocvrs_has_module_objdetect)]
     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: consider using a Cargo feature instead
     = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
              [lints.rust]
              unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_objdetect)'] }
     = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_objdetect)");` to the top of the `build.rs`
     = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_photo`
    --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/sys.rs:8518:7
     |
8518 | #[cfg(ocvrs_has_module_photo)]
     |       ^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: consider using a Cargo feature instead
     = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
              [lints.rust]
              unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_photo)'] }
     = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_photo)");` to the top of the `build.rs`
     = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_photo`
    --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/sys.rs:8745:7
     |
8745 | #[cfg(ocvrs_has_module_photo)]
     |       ^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: consider using a Cargo feature instead
     = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
              [lints.rust]
              unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_photo)'] }
     = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_photo)");` to the top of the `build.rs`
     = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_stitching`
    --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/sys.rs:8748:7
     |
8748 | #[cfg(ocvrs_has_module_stitching)]
     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: consider using a Cargo feature instead
     = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
              [lints.rust]
              unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_stitching)'] }
     = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_stitching)");` to the top of the `build.rs`
     = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_stitching`
    --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/sys.rs:9694:7
     |
9694 | #[cfg(ocvrs_has_module_stitching)]
     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: consider using a Cargo feature instead
     = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
              [lints.rust]
              unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_stitching)'] }
     = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_stitching)");` to the top of the `build.rs`
     = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_video`
    --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/sys.rs:9697:7
     |
9697 | #[cfg(ocvrs_has_module_video)]
     |       ^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: consider using a Cargo feature instead
     = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
              [lints.rust]
              unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_video)'] }
     = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_video)");` to the top of the `build.rs`
     = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_video`
     --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/sys.rs:10046:7
      |
10046 | #[cfg(ocvrs_has_module_video)]
      |       ^^^^^^^^^^^^^^^^^^^^^^
      |
      = help: consider using a Cargo feature instead
      = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
               [lints.rust]
               unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_video)'] }
      = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_video)");` to the top of the `build.rs`
      = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_videoio`
     --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/sys.rs:10049:7
      |
10049 | #[cfg(ocvrs_has_module_videoio)]
      |       ^^^^^^^^^^^^^^^^^^^^^^^^
      |
      = help: consider using a Cargo feature instead
      = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
               [lints.rust]
               unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_videoio)'] }
      = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_videoio)");` to the top of the `build.rs`
      = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_videoio`
     --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/sys.rs:10146:7
      |
10146 | #[cfg(ocvrs_has_module_videoio)]
      |       ^^^^^^^^^^^^^^^^^^^^^^^^
      |
      = help: consider using a Cargo feature instead
      = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
               [lints.rust]
               unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_videoio)'] }
      = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_videoio)");` to the top of the `build.rs`
      = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_calib3d`
  --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/hub.rs:39:8
   |
39 |     #[cfg(ocvrs_has_module_calib3d)]
   |           ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider using a Cargo feature instead
   = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
            [lints.rust]
            unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_calib3d)'] }
   = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_calib3d)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_core`
  --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/hub.rs:41:8
   |
41 |     #[cfg(ocvrs_has_module_core)]
   |           ^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider using a Cargo feature instead
   = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
            [lints.rust]
            unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_core)'] }
   = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_core)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_dnn`
  --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/hub.rs:43:8
   |
43 |     #[cfg(ocvrs_has_module_dnn)]
   |           ^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider using a Cargo feature instead
   = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
            [lints.rust]
            unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_dnn)'] }
   = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_dnn)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_features2d`
  --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/hub.rs:45:8
   |
45 |     #[cfg(ocvrs_has_module_features2d)]
   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider using a Cargo feature instead
   = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
            [lints.rust]
            unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_features2d)'] }
   = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_features2d)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_flann`
  --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/hub.rs:47:8
   |
47 |     #[cfg(ocvrs_has_module_flann)]
   |           ^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider using a Cargo feature instead
   = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
            [lints.rust]
            unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_flann)'] }
   = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_flann)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_gapi`
  --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/hub.rs:49:8
   |
49 |     #[cfg(ocvrs_has_module_gapi)]
   |           ^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider using a Cargo feature instead
   = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
            [lints.rust]
            unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_gapi)'] }
   = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_gapi)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_highgui`
  --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/hub.rs:51:8
   |
51 |     #[cfg(ocvrs_has_module_highgui)]
   |           ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider using a Cargo feature instead
   = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
            [lints.rust]
            unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_highgui)'] }
   = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_highgui)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_imgcodecs`
  --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/hub.rs:53:8
   |
53 |     #[cfg(ocvrs_has_module_imgcodecs)]
   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider using a Cargo feature instead
   = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
            [lints.rust]
            unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_imgcodecs)'] }
   = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_imgcodecs)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_imgproc`
  --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/hub.rs:55:8
   |
55 |     #[cfg(ocvrs_has_module_imgproc)]
   |           ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider using a Cargo feature instead
   = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
            [lints.rust]
            unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_imgproc)'] }
   = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_imgproc)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_ml`
  --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/hub.rs:57:8
   |
57 |     #[cfg(ocvrs_has_module_ml)]
   |           ^^^^^^^^^^^^^^^^^^^
   |
   = help: consider using a Cargo feature instead
   = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
            [lints.rust]
            unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_ml)'] }
   = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_ml)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_objdetect`
  --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/hub.rs:59:8
   |
59 |     #[cfg(ocvrs_has_module_objdetect)]
   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider using a Cargo feature instead
   = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
            [lints.rust]
            unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_objdetect)'] }
   = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_objdetect)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_photo`
  --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/hub.rs:61:8
   |
61 |     #[cfg(ocvrs_has_module_photo)]
   |           ^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider using a Cargo feature instead
   = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
            [lints.rust]
            unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_photo)'] }
   = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_photo)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_stitching`
  --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/hub.rs:63:8
   |
63 |     #[cfg(ocvrs_has_module_stitching)]
   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider using a Cargo feature instead
   = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
            [lints.rust]
            unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_stitching)'] }
   = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_stitching)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_video`
  --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/hub.rs:65:8
   |
65 |     #[cfg(ocvrs_has_module_video)]
   |           ^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider using a Cargo feature instead
   = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
            [lints.rust]
            unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_video)'] }
   = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_video)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_videoio`
  --> /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/hub.rs:67:8
   |
67 |     #[cfg(ocvrs_has_module_videoio)]
   |           ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider using a Cargo feature instead
   = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
            [lints.rust]
            unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_videoio)'] }
   = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_videoio)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_has_module_core`
  --> /home/vlad/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opencv-0.91.3/src/lib.rs:16:8
   |
16 |     #[cfg(ocvrs_has_module_core)]
   |           ^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider using a Cargo feature instead
   = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
            [lints.rust]
            unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_has_module_core)'] }
   = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_has_module_core)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_opencv_branch_32`
 --> /home/vlad/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opencv-0.91.3/src/cond_macros.rs:1:7
  |
1 | #[cfg(ocvrs_opencv_branch_32)]
  |       ^^^^^^^^^^^^^^^^^^^^^^
  |
  = help: consider using a Cargo feature instead
  = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
           [lints.rust]
           unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_opencv_branch_32)'] }
  = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_opencv_branch_32)");` to the top of the `build.rs`
  = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_opencv_branch_32`
  --> /home/vlad/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opencv-0.91.3/src/cond_macros.rs:31:11
   |
31 | #[cfg(not(ocvrs_opencv_branch_32))]
   |           ^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider using a Cargo feature instead
   = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
            [lints.rust]
            unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_opencv_branch_32)'] }
   = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_opencv_branch_32)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_opencv_branch_32`
  --> /home/vlad/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opencv-0.91.3/src/cond_macros.rs:60:11
   |
60 | #[cfg(not(ocvrs_opencv_branch_32))]
   |           ^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider using a Cargo feature instead
   = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
            [lints.rust]
            unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_opencv_branch_32)'] }
   = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_opencv_branch_32)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_opencv_branch_32`
  --> /home/vlad/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opencv-0.91.3/src/cond_macros.rs:67:7
   |
67 | #[cfg(ocvrs_opencv_branch_32)]
   |       ^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider using a Cargo feature instead
   = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
            [lints.rust]
            unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_opencv_branch_32)'] }
   = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_opencv_branch_32)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_opencv_branch_34`
  --> /home/vlad/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opencv-0.91.3/src/cond_macros.rs:75:7
   |
75 | #[cfg(ocvrs_opencv_branch_34)]
   |       ^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider using a Cargo feature instead
   = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
            [lints.rust]
            unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_opencv_branch_34)'] }
   = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_opencv_branch_34)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_opencv_branch_34`
   --> /home/vlad/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opencv-0.91.3/src/cond_macros.rs:104:11
    |
104 | #[cfg(not(ocvrs_opencv_branch_34))]
    |           ^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: consider using a Cargo feature instead
    = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
             [lints.rust]
             unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_opencv_branch_34)'] }
    = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_opencv_branch_34)");` to the top of the `build.rs`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_opencv_branch_34`
   --> /home/vlad/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opencv-0.91.3/src/cond_macros.rs:132:11
    |
132 | #[cfg(not(ocvrs_opencv_branch_34))]
    |           ^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: consider using a Cargo feature instead
    = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
             [lints.rust]
             unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_opencv_branch_34)'] }
    = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_opencv_branch_34)");` to the top of the `build.rs`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_opencv_branch_34`
   --> /home/vlad/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opencv-0.91.3/src/cond_macros.rs:138:7
    |
138 | #[cfg(ocvrs_opencv_branch_34)]
    |       ^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: consider using a Cargo feature instead
    = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
             [lints.rust]
             unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_opencv_branch_34)'] }
    = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_opencv_branch_34)");` to the top of the `build.rs`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_opencv_branch_4`
   --> /home/vlad/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opencv-0.91.3/src/cond_macros.rs:167:7
    |
167 | #[cfg(ocvrs_opencv_branch_4)]
    |       ^^^^^^^^^^^^^^^^^^^^^
    |
    = help: consider using a Cargo feature instead
    = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
             [lints.rust]
             unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_opencv_branch_4)'] }
    = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_opencv_branch_4)");` to the top of the `build.rs`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_opencv_branch_4`
   --> /home/vlad/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opencv-0.91.3/src/cond_macros.rs:173:11
    |
173 | #[cfg(not(ocvrs_opencv_branch_4))]
    |           ^^^^^^^^^^^^^^^^^^^^^
    |
    = help: consider using a Cargo feature instead
    = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
             [lints.rust]
             unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_opencv_branch_4)'] }
    = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_opencv_branch_4)");` to the top of the `build.rs`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_opencv_branch_4`
   --> /home/vlad/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opencv-0.91.3/src/cond_macros.rs:180:11
    |
180 | #[cfg(not(ocvrs_opencv_branch_4))]
    |           ^^^^^^^^^^^^^^^^^^^^^
    |
    = help: consider using a Cargo feature instead
    = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
             [lints.rust]
             unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_opencv_branch_4)'] }
    = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_opencv_branch_4)");` to the top of the `build.rs`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition name: `ocvrs_opencv_branch_4`
   --> /home/vlad/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opencv-0.91.3/src/cond_macros.rs:209:7
    |
209 | #[cfg(ocvrs_opencv_branch_4)]
    |       ^^^^^^^^^^^^^^^^^^^^^
    |
    = help: consider using a Cargo feature instead
    = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
             [lints.rust]
             unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_opencv_branch_4)'] }
    = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_opencv_branch_4)");` to the top of the `build.rs`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unused return value of `Box::<T, A>::into_raw` that must be used
     --> /home/vlad/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opencv-0.91.3/src/templ.rs:38:4
      |
38    |             Box::into_raw(callback);
      |             ^^^^^^^^^^^^^^^^^^^^^^^
      |
     ::: /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/core.rs:33655:4
      |
33655 | ...   callback_arg!(callback_trampoline(status: i32, user_data: *mut c_void) -> () => user_data in callbacks => callback(status: i32) -> (...
      |       -------------------------------------------------------------------------------------------------------------------------------------- in this macro invocation
      |
      = note: losing the pointer will leak memory
      = note: `#[warn(unused_must_use)]` on by default
      = note: this warning originates in the macro `callback_arg` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `let _ = ...` to ignore the resulting value
      |
38    |             let _ = Box::into_raw(callback);
      |             +++++++

warning: unused return value of `Box::<T, A>::into_raw` that must be used
   --> /home/vlad/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opencv-0.91.3/src/templ.rs:38:4
    |
38  |             Box::into_raw(callback);
    |             ^^^^^^^^^^^^^^^^^^^^^^^
    |
   ::: /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/highgui.rs:627:3
    |
627 | ...   callback_arg!(on_change_trampoline(state: i32, userdata: *mut c_void) -> () => userdata in callbacks => on_change(state: i32) -> (...
    |       ------------------------------------------------------------------------------------------------------------------------------------ in this macro invocation
    |
    = note: losing the pointer will leak memory
    = note: this warning originates in the macro `callback_arg` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `let _ = ...` to ignore the resulting value
    |
38  |             let _ = Box::into_raw(callback);
    |             +++++++

warning: unused return value of `Box::<T, A>::into_raw` that must be used
   --> /home/vlad/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opencv-0.91.3/src/templ.rs:38:4
    |
38  |             Box::into_raw(callback);
    |             ^^^^^^^^^^^^^^^^^^^^^^^
    |
   ::: /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/highgui.rs:671:3
    |
671 | ...   callback_arg!(on_change_trampoline(state: i32, userdata: *mut c_void) -> () => userdata in callbacks => on_change(state: i32) -> (...
    |       ------------------------------------------------------------------------------------------------------------------------------------ in this macro invocation
    |
    = note: losing the pointer will leak memory
    = note: this warning originates in the macro `callback_arg` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `let _ = ...` to ignore the resulting value
    |
38  |             let _ = Box::into_raw(callback);
    |             +++++++

warning: unused return value of `Box::<T, A>::into_raw` that must be used
   --> /home/vlad/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opencv-0.91.3/src/templ.rs:38:4
    |
38  |             Box::into_raw(callback);
    |             ^^^^^^^^^^^^^^^^^^^^^^^
    |
   ::: /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/highgui.rs:713:3
    |
713 | ...   callback_arg!(on_change_trampoline(pos: i32, userdata: *mut c_void) -> () => userdata in callbacks => on_change(pos: i32) -> (...
    |       -------------------------------------------------------------------------------------------------------------------------------- in this macro invocation
    |
    = note: losing the pointer will leak memory
    = note: this warning originates in the macro `callback_arg` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `let _ = ...` to ignore the resulting value
    |
38  |             let _ = Box::into_raw(callback);
    |             +++++++

warning: unused return value of `Box::<T, A>::into_raw` that must be used
    --> /home/vlad/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opencv-0.91.3/src/templ.rs:38:4
     |
38   |             Box::into_raw(callback);
     |             ^^^^^^^^^^^^^^^^^^^^^^^
     |
    ::: /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/highgui.rs:1465:3
     |
1465 | ...   callback_arg!(on_mouse_trampoline(event: i32, x: i32, y: i32, flags: i32, userdata: *mut c_void) -> () => userdata in callbacks => on_mouse(event: i32, x: i32, y: i32, flags: i32) -> (...
     |       ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ in this macro invocation
     |
     = note: losing the pointer will leak memory
     = note: this warning originates in the macro `callback_arg` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `let _ = ...` to ignore the resulting value
     |
38   |             let _ = Box::into_raw(callback);
     |             +++++++

warning: unused return value of `Box::<T, A>::into_raw` that must be used
    --> /home/vlad/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opencv-0.91.3/src/templ.rs:38:4
     |
38   |             Box::into_raw(callback);
     |             ^^^^^^^^^^^^^^^^^^^^^^^
     |
    ::: /home/vlad/projects-mp/opencvx/target/debug/build/opencv-53fe0ad924dd4910/out/opencv/highgui.rs:1535:3
     |
1535 | ...   callback_arg!(on_opengl_draw_trampoline(userdata: *mut c_void) -> () => userdata in callbacks => on_opengl_draw() -> (...
     |       ------------------------------------------------------------------------------------------------------------------------ in this macro invocation
     |
     = note: losing the pointer will leak memory
     = note: this warning originates in the macro `callback_arg` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `let _ = ...` to ignore the resulting value
     |
38   |             let _ = Box::into_raw(callback);
     |             +++++++

@twistedfall
Copy link
Owner

cargo build -vv 2>&1 | tee build_log.txt should work

@twistedfall
Copy link
Owner

I already see something weird though, you're saying you're using crate version 0.94, but in this last log snippet I can see references to opencv-0.91.3.

@vladceresna
Copy link
Author

Yes, but with 0.94 I have this errors also

@vladceresna
Copy link
Author

build_log.txt

@twistedfall
Copy link
Owner

It looks like the linker is trying to link to a different OpenCV (not the one that was used for binding generation) which lacks the necessary DNN features. Maybe the 4.7.0 version that you used previously is still lingering?

@vladceresna
Copy link
Author

I dont know how I can check it, but I have been removing opencv package lib dev before installing 4.9.0

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