GithubHelp home page GithubHelp logo

Compile issue on linux about nokhwa HOT 7 OPEN

DomtronVox avatar DomtronVox commented on June 12, 2024
Compile issue on linux

from nokhwa.

Comments (7)

stolinski avatar stolinski commented on June 12, 2024

@DomtronVox did you find a work around? Also stuck here.

from nokhwa.

OlivierLDff avatar OlivierLDff commented on June 12, 2024

Just use github dependency:

[dependencies.nokhwa]
git = "https://github.com/l1npengtul/nokhwa.git"
rev = "ea971242a888987222375189fb78c84fa85e5a4e"

from nokhwa.

stolinski avatar stolinski commented on June 12, 2024

Just use github dependency:

[dependencies.nokhwa]
git = "https://github.com/l1npengtul/nokhwa.git"
rev = "ea971242a888987222375189fb78c84fa85e5a4e"

Dang. Still getting the same with that version.

Compiling nokhwa-core v0.1.2 (https://github.com/l1npengtul/nokhwa.git?rev=ea971242a888987222375189fb78c84fa85e5a4e#ea971242)
error[E0308]: mismatched types
   --> /Users/scotttolinski/.cargo/git/checkouts/nokhwa-66b597f0abb1b795/ea97124/nokhwa-core/src/traits.rs:230:32
    |
230 |                 bytes_per_row: width_nonzero,
    |                                ^^^^^^^^^^^^^ expected enum `Option`, found `u32`
    |
    = note: expected enum `Option<u32>`
               found type `u32`
help: try wrapping the expression in `Some`
    |
230 |                 bytes_per_row: Some(width_nonzero),
    |                                +++++             +

error[E0308]: mismatched types
   --> /Users/scotttolinski/.cargo/git/checkouts/nokhwa-66b597f0abb1b795/ea97124/nokhwa-core/src/traits.rs:231:33
    |
231 |                 rows_per_image: height_nonzero,
    |                                 ^^^^^^^^^^^^^^ expected enum `Option`, found `u32`
    |
    = note: expected enum `Option<u32>`
               found type `u32`
help: try wrapping the expression in `Some`
    |
231 |                 rows_per_image: Some(height_nonzero),
    |                                 +++++              +

For more information about this error, try `rustc --explain E0308`.
error: could not compile `nokhwa-core` due to 2 previous errors

from nokhwa.

DomtronVox avatar DomtronVox commented on June 12, 2024

@DomtronVox did you find a work around? Also stuck here.

I did not. Even tried going into the code to fix the specific error but it just made more errors and I'm not familiar enough with nokhwa to figure out what exactly it should have there. But I also haven't messed with it since then.

However, it does look like OlivierLDff's suggestion fixed it for me, maybe.

Just use github dependency:

[dependencies.nokhwa]
git = "https://github.com/l1npengtul/nokhwa.git"
rev = "ea971242a888987222375189fb78c84fa85e5a4e"

I don't have time to test it more right now, but it seems to have built fine using that specific checkout.

from nokhwa.

stolinski avatar stolinski commented on June 12, 2024

It builds for me until I add features = ["input-native", "output-wgpu"] then it fails with the same error.
If it's working for you now, it's probably because I'm on MacOS trying this. I'll have to open a 2nd issue.
I ended up downgrading to =0.10.0 and was able to build on MacOS

from nokhwa.

OlivierLDff avatar OlivierLDff commented on June 12, 2024

I haven't tried wgpu feature so yes maybe it is broken

from nokhwa.

anselanza avatar anselanza commented on June 12, 2024

Wow, I'm really struggling to get any kind of example working. I'm also on MacOS.

After lots of fiddling I settled on

[dependencies]
nokhwa = { version = "=0.10.3", features=["input-native","output-threaded"]}

which at least got rid of compile-time errors.

Then I tried to use the example from ./examples/threaded-capture/src/main.rs and that compiled but immediately returns runtime errors such as thread 'main' panicked at 'called Result::unwrap()on anErr value: ProcessFrameError { src: NV12, destination: "RGB", error: "bad input buffer size" }', src/main.rs:47:56

from nokhwa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.