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

Unexpectedly weird errors while compiling a project with opencv-rust #524

Open
timleg002 opened this issue Dec 12, 2023 · 7 comments
Open

Comments

@timleg002
Copy link

timleg002 commented Dec 12, 2023

12.12.2023 OPENCV-RUST LOG.txt

  1. Operating system

    Windows 11 Pro 21H2

  2. The way you installed OpenCV: package, official binary distribution, manual compilation, etc.

    Via chocolatey

  3. OpenCV version

    4.8.1

  4. rustc version (rustc --version)

    rustc 1.76.0-nightly (21cce21d8 2023-12-11)

I have attached the full log, but in short: very weird errors. I haven't been able to find anything at all about this. This error occurs with opencv bindgen, failing to run the bindings generator for every opencv module. This line keeps repeating (with some variations): c:/MinGW64/x86_64-w64-mingw32/include\stdlib.h:388:47: error: expected ';' after top level declarator. It seems as if I was using some weird compilator? I don't know. I tried both the msvc and the gnu target triple (for x64 Windows), both give the same error.

@twistedfall
Copy link
Owner

I think you haven't in fact attached the full build log unless I'm missing something

@timleg002
Copy link
Author

I think you haven't in fact attached the full build log unless I'm missing something

You're right - I uploaded the file, but for some reason it wasn't there. Thank you for the fast reply - it's attached now!

@twistedfall
Copy link
Owner

Looks like the stdlib headers are not processed correctly. I'm not sure how to help here to be honest and I've never tested build with mingw. There is also this warning that's very suspicious in the logs:

warning: "__STRICT_ANSI__ seems to have been undefined; this is not supported"

@timleg002
Copy link
Author

I also tried building with MSVC, but got the same errors (with the stdlib headers). It all feels like I made a mistake configuring all of this, but I retraced all of my steps and don't think I found anything wrong.

@icedcoffeeee
Copy link

Sorry for bumping, currently facing the same issue. Any work arounds?

@twistedfall
Copy link
Owner

Are you using mingw on Windows too?

@icedcoffeeee
Copy link

Yes, I am. My errors are equivalent to OP.

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

3 participants