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

LNK1181 with vcpkg-acquired "full" OpenCV on Windows #578

Open
mardab opened this issue May 28, 2024 · 3 comments
Open

LNK1181 with vcpkg-acquired "full" OpenCV on Windows #578

mardab opened this issue May 28, 2024 · 3 comments

Comments

@mardab
Copy link

mardab commented May 28, 2024

Hello, recently I had to use ximgproc feature, from an opencv-contrib libraries, and so I embarked on getting "full" OpenCV on my Windows 10 machine.

One setup that I managed to achieve reproducibly was via vcpkg, resulting in opencv4:x64-windows at version 4.8.0#18.

I am using a somewhat outdated rustc 1.80.0-nightly (c987ad527 2024-05-01), as this is the version before the recent breakage of -Zscript, which I am using for my OpenCV projects after switching from Python.

Attached to this is script's build log with full backtrace in system env variables and -vv flag.
92vv.log

Scripts not using features relying on non-base OpenCV package build on Windows every time, provided that opencv from vcpkg is replaced with official base installer.

As a sanity check, I have copied that script onto old Ubuntu machine with likely much older rustc, after installing libopencv-contrib-dev and pointing OPENCV_LINK_LIBS to /usr/lib/x86_64-linux-gnu, it just worked on the first attempt.

@mardab
Copy link
Author

mardab commented May 30, 2024

In the meantime I have managed to make a pretty decent WSL2 setup on that machine, with Alpine Linux and official Fedora 39, and while alpine does not seem to have all the packages needed for a full build, Fedora managed to run the first time after acquiring all required packages as well.

@twistedfall
Copy link
Owner

Well, from the initial build log the problem is that it tries to link the (non-existent) file named "lib.lib", but the log is missing any debug information that could help see where this requirement comes from. Can you please do a cargo clean and then re-run the build command? That is if it's still a problem that you need solving seeing that you have found an alternative setup :)

@mardab
Copy link
Author

mardab commented Jun 1, 2024

Unfortunately all deliverables have to be for msvc, with no room for flaky WSL setups on client machine, but I'd be happy to contribute as much as I can.

With that being said, how can I provide more useful information?

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