Error while building: "perhaps two different versions of crate `image` are being used?"

This page summarizes the projects mentioned and recommended in the original post on /r/learnrust

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • bardecoder

    Detect and decode QR Codes, written in 100% Rust.

  • The culprit appears to be bardecoder 0.4.1. This issue describes the desire to support image 0.24. It looks like the developer added support by setting the version constraints to allow either 0.23 or 0.24 in a patch version bump. Since this crate appears as part of its public API I would consider this to be a breaking change. It has certainly broken the project you were trying to build because it is trying to use the newer image 0.24 from the other dependencies. You should be able to confirm by running cargo tree.

  • nokhwa

    Cross Platform Rust Library for Powerful Webcam/Camera Capture

  • It looks like the issue is with nokhwa. There are three open issues that reference the error: 72, 94 and 100. It looks like someone had luck switching from NV12 to YUYV after opening the stream but then I think you might end up with issue 90 where everything is pink so hyperbacked will infinitely loop waiting for an image since it can't actually read anything. The YUYV issue might have been fixed but the crate has been failing to build since the last release. That rules out setting the dependency to use the git repository. I think you just need to wait for a new release of nokhwa that fixes the issues but I don't know when that will be.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • hyperbacked

    🔐 Superbacked, but in Rust

  • Hi, I'm not a developer. I'm just trying to install this app on a m1 mac. I run cargo build but I got this error:

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts