Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

Windows: OpenCVConfig.cmake contains wrong candidate directories #10

Closed
Tobias-Fischer opened this issue Dec 3, 2018 · 18 comments
Closed

Comments

@Tobias-Fischer
Copy link

Hi @mbrunettini,
I am trying to use the newest iCub 1.12 (https://github.com/robotology/icub-main/releases/download/v1.12.0/iCub_1.12.0_v14_x86_1.exe) on Windows. However, OpenCV cannot be used and fails with a confusing error message: https://ci.appveyor.com/project/robotology/icub-client/builds/20528773

I checked where things go wrong, and found that it is because of wrong candidate paths in the OpenCVConfig.cmake (see https://ci.appveyor.com/project/robotology/icub-client/builds/20562207#L125). The actual directories do not contain OpenCV_ARCH and/or OpenCV_RUNTIME (see https://ci.appveyor.com/project/robotology/icub-client/builds/20535578).

It would be great if you could fix this for the next release - this should do it: https://github.com/robotology/icub-hri/blob/f91f9bd8b4070912a1af62582c4defb7c5a6bad7/conf/fix_opencv_cmake.patch

Thanks a lot,
Tobias
/cc @pattacini and other Windows users - did you encounter the same problems? Not sure whether it also affects the x64 version.

@pattacini
Copy link
Contributor

Hi @Tobias-Fischer

I don't use our preinstalled packages since I do rely on vcpkg for managing the ecosystem's dependencies.

@Tobias-Fischer
Copy link
Author

Alright, I see. Guess that's not a viable option for AppVeyor though - I should have mentioned that I encountered this problem in https://github.com/robotology/icub-hri

@traversaro
Copy link

cc @InesSorrentino

@Tobias-Fischer
Copy link
Author

See also opencv/opencv#7331 - it seems like that setting OpenCV_INSTALL_BINARIES_PREFIX "" may do the job.

@traversaro
Copy link

Apparently this affects also other users of the robotology-superbuild and combined with the vcpkg problem means that it is basically impossible to have OpenCV + Qt libraries using in any way.

@traversaro
Copy link

Debugging with @GiulioRomualdi , we also experienced that the OpenCVConfig.cmake files are installed in <prefix>/lib, but the IMPORT_PREFIX option seems to indicate that were meant to be installed in the directory <prefix>/lib/something1/something2. However, I wonder why @Tobias-Fischer did not experienced this issue.

@mbrunettini the location of those files was modified after the OpenCV installation? With what configuration of iCub did you tested it?

@ras0219-msft
Copy link

@traversaro Could you link me to the issue with the current "vcpkg problem"?

@traversaro
Copy link

Hi @ras0219-msft, thanks for chiming in : )

We are experiencing issue with vcpkg-based qt described when building our software as described in robotology/robotology-superbuild#134 . We did not open an issue in vcpkg because we wanted before to have a minimal working example reproducing the problem, but to be honest I am afraid no one worked in this direction in the last weeks.

@claudiofantacci
Copy link

@traversaro, @ras0219-msft, I upgraded my Windows workstation with the latest commit of vcpkg and upgrading the packages right now. It's taking some times as I'm experiencing some installation issues with qt5 (see microsoft/vcpkg#4563). Anyway, tomorrow I should have my workstation with the latest qt5 and opencv installation so that i can test robotology/robotology-superbuild#134.

@traversaro
Copy link

Thanks a lot @claudiofantacci !

@claudiofantacci
Copy link

claudiofantacci commented Dec 19, 2018

I upgraded vcpkgs and ports to the latest version. See robotology/robotology-superbuild#134 (comment)

@traversaro
Copy link

Hi @claudiofantacci , feel free to post those updates in robotology/robotology-superbuild#134 , as this issue is actually on the malformed OpenCVConfig.cmake , thanks!

@claudiofantacci
Copy link

I posted here by mistake and already amended 👍

@claudiofantacci
Copy link

claudiofantacci commented Dec 19, 2018

Apparently this affects also other users of the robotology-superbuild and combined with the vcpkg problem means that it is basically impossible to have OpenCV + Qt libraries using in any way.

I just noticed that my installation of vcpkg install opencv[contrib,cuda,eigen,ffmpeg,flann,ipp,jpeg,opengl,png,qt,sfm,tiff,vtk] is incomplete. vcpkg reports that is completed and is listed in the vcpkg list, but the cuda module is not compiled properly or the OpenCVConfig.cmake turns out to be incomplete and, as a consequence, I cannot use cuda-related code. I'm trying to re-compile opencv again to see what happens.
Is this the "vcpkg problem" you was referring to @traversaro? Maybe @ras0219-msft is also interested in this.

UPDATE:
Probably I'm facing an unrelatedproblem, sorry for bothering you.
It seems that OpenCV is not capable of finding CUDA even though I have everything in place to find it (and I'm able to find CUDA with some personal projects).

CMake Warning at cmake/OpenCVFindLibsPerf.cmake:46 (message):
  OpenCV is not able to find/configure CUDA SDK (required by WITH_CUDA).

  CUDA support will be disabled in OpenCV build.

  To eliminate this warning remove WITH_CUDA=ON CMake configuration option.

I'm investigating this. If this is not the problem @traversaro was referring to, please ignore this comment.

@Tobias-Fischer
Copy link
Author

Any news on this?

@traversaro
Copy link

As far as I know, unfortunately no.

Regarding the robotology-superbuild, we have documented the situation in robotology/robotology-superbuild#148 and we are currently recommending to use the official OpenCV installers instead of the iCub-provided once, but that clearly is a sub-optimal solution.

@drdanz
Copy link
Member

drdanz commented Feb 2, 2019

@mbrunettini This is probably related to the problems with azure pipeline.

@mbrunettini
Copy link
Contributor

we moved to a new binary packages system

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants