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

Cannot compile 0.84 without default features #487

Closed
HollayHorvath opened this issue Aug 10, 2023 · 4 comments
Closed

Cannot compile 0.84 without default features #487

HollayHorvath opened this issue Aug 10, 2023 · 4 comments

Comments

@HollayHorvath
Copy link

I'm trying to compile this crate with default features disabled (on my original project I have features2d enabled, but it's irrelevant for the repro) and I'm facing the following error:

error[E0277]: the trait bound `manual::core::ptr::Ptr<f32>: manual::core::ptr::ptr_extern::PtrExtern` is not satisfied
  --> ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opencv-0.84.4/src/manual/core/ptr/ptr_f32.rs:6:18
   |
6  | impl Default for Ptr<f32> {
   |                  ^^^^^^^^ the trait `manual::core::ptr::ptr_extern::PtrExtern` is not implemented for `manual::core::ptr::Ptr<f32>`
   |
   = help: the following other types implement trait `manual::core::ptr::ptr_extern::PtrExtern`:
             manual::core::ptr::Ptr<Algorithm>
             manual::core::ptr::Ptr<ConjGradSolver>
             manual::core::ptr::Ptr<DownhillSolver>
             manual::core::ptr::Ptr<FileStorage>
             manual::core::ptr::Ptr<GpuMat_Allocator>
             manual::core::ptr::Ptr<MinProblemSolver>
             manual::core::ptr::Ptr<MinProblemSolver_Function>
             manual::core::ptr::Ptr<hub::core::Formatted>
             manual::core::ptr::Ptr<hub::core::Formatter>
note: required by a bound in `manual::core::ptr::Ptr`
  --> ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opencv-0.84.4/src/manual/core/ptr.rs:19:8

(the same is recurring for Deref, DerefMut and Debug)

If I enable the stitching feature, the error goes away.

I tested with different versions and the last version that works without the stitching feature flag is 0.83.0, it seems that 0.84.0 introduced this error.

I doubt that it's relevant, but here are my details:

  1. OS: Ubuntu 22.04 (Linux Mint 21.2)
  2. OpenCV install: package manager
  3. OpenCV version: 4.5.4
  4. rustc version: rustc 1.71.1 (eb26296b5 2023-08-03)
  5. Full output of clean build
@twistedfall
Copy link
Owner

Can you please check the beta branch to see if it fixes the issue?

@HollayHorvath
Copy link
Author

Yes, the beta branch fixes this issue (just for the sake of completeness, master is having the same issue as 0.84)

@twistedfall
Copy link
Owner

Thanks for testing! Yep, master is expected to fail too. I will release the new crate version as soon as the CI finishes (successfully).

@twistedfall
Copy link
Owner

This is now released in 0.84.5

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