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

Binding Generator fails: internal error: entered unreachable code: Unsupported decl for OpenCV namespace: Entity #519

Closed
Hpmason opened this issue Dec 3, 2023 · 3 comments

Comments

@Hpmason
Copy link

Hpmason commented Dec 3, 2023

I'm running into an error while compiling opencv

thread 'main' panicked at C:\Users\hpmas\.cargo\registry\src\index.crates.io-6f17d22bba15001f\opencv-binding-generator-0.80.0\src\walker.rs:100:17:
internal error: entered unreachable code: Unsupported decl for OpenCV namespace: Entity {
    kind: LinkageSpec,
    display_name: None,
     location: Some(
         SourceLocation {
             file: Some(
                 File {
                     path: "C:\\dev\\OpenCV\\opencv\\build\\include\\opencv2/core/utility.hpp",
                 },
             ),
             line: 162,
             column: 8,
             offset: 6790,
         },
     ),
 }

The line of utility.hpp is here

  1. Operating system
    Windows 11
  2. The way you installed OpenCV: package, official binary distribution, manual compilation, etc.
    Tried with both vcpkg and official binaries
  3. OpenCV version
    4.8.0
  4. rustc version (rustc --version)
    rustc 1.74.0 (79e9716c9 2023-11-13)
  5. Attach the full output of the following command from your project directory:
    RUST_BACKTRACE=full cargo build -vv 

output.txt

@twistedfall
Copy link
Owner

twistedfall commented Dec 4, 2023

Looks like it's clang-17 change that broke it. I'll take a look, meanwhile as a workaround you could try switching back to clang-16

@Hpmason
Copy link
Author

Hpmason commented Dec 5, 2023

Switching back to clang-16 seems to work!

@twistedfall
Copy link
Owner

This should now be fixed in 0.88.2

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