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

[opencv4[qt]] build failure with latest commit version 0ab1a9e #11138

Closed
imaqqqq opened this issue May 3, 2020 · 6 comments · Fixed by #11130
Closed

[opencv4[qt]] build failure with latest commit version 0ab1a9e #11138

imaqqqq opened this issue May 3, 2020 · 6 comments · Fixed by #11130
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@imaqqqq
Copy link

imaqqqq commented May 3, 2020

Host Environment

  • OS: win10 1909 Build18363.815
  • Compiler: VS2019 16.5.4

To Reproduce
Steps to reproduce the behavior:
./vcpkg install opencv4[qt] --recurse

Failure logs
Computing installation plan...
The following packages will be rebuilt:

  • qt5[activeqt,core,declarative,essentials,imageformats,multimedia,networkauth,quickcontrols2,svg,tools]:x86-windows
    The following packages will be built and installed:
    opencv4[core,dnn,jpeg,opengl,png,qt,tiff,webp]:x86-windows
    Additional packages (*) will be modified to complete this operation.
    Starting package 1/3: qt5:x86-windows
    Removing package qt5:x86-windows...
    Removing package qt5:x86-windows... done
    Elapsed time for package qt5:x86-windows: 10.5 ms
    Starting package 2/3: qt5:x86-windows
    Building package qt5[activeqt,core,declarative,essentials,imageformats,multimedia,networkauth,quickcontrols2,svg,tools]:x86-windows...
    -- Performing post-build validation
    -- Performing post-build validation done
    Building package qt5[activeqt,core,declarative,essentials,imageformats,multimedia,networkauth,quickcontrols2,svg,tools]:x86-windows... done
    Installing package qt5[activeqt,core,declarative,essentials,imageformats,multimedia,networkauth,quickcontrols2,svg,tools]:x86-windows...
    Installing package qt5[activeqt,core,declarative,essentials,imageformats,multimedia,networkauth,quickcontrols2,svg,tools]:x86-windows... done
    Elapsed time for package qt5:x86-windows: 12.33 s
    Starting package 3/3: opencv4:x86-windows
    Building package opencv4[core,dnn,jpeg,opengl,png,qt,tiff,webp]:x86-windows...
    Error: Building package opencv4:x86-windows failed with: CASCADED_DUE_TO_MISSING_DEPENDENCIES
    Please ensure you're using the latest portfiles with .\vcpkg update, then
    submit an issue at https://github.com/Microsoft/vcpkg/issues including:
    Package: opencv4:x86-windows
    Vcpkg version: 2020.02.04-nohash-external

Additionally, attach any relevant sections from the log files above.

Additional context
I removed all the qt5 stuff, and rebuilt from scratch, the same error.

@imaqqqq imaqqqq added the category:port-bug The issue is with a library, which is something the port should already support label May 3, 2020
@cenit
Copy link
Contributor

cenit commented May 3, 2020

I was able to reproduce your issue. There might be a circular reference inside features for qt5 CONTROL file @Neumann-A; this should be reproducible easily with an empty port, just depending on "qt5" .
Changing opencv4 dependency from qt5 to qt5-base seems to fix the issue, but I am not sure it is enough to satisfy dependencies

@Neumann-A
Copy link
Contributor

Found in cmake\OpenCVFindLibsGUI.cmake:

if(WITH_QT)
  if(NOT WITH_QT EQUAL 4)
    find_package(Qt5 COMPONENTS Core Gui Widgets Test Concurrent REQUIRED NO_MODULE)
    if(Qt5_FOUND)
      set(HAVE_QT5 ON)
      set(HAVE_QT  ON)
      find_package(Qt5 COMPONENTS OpenGL QUIET)
      if(Qt5OpenGL_FOUND)
        set(QT_QTOPENGL_FOUND ON)
      endif()
    endif()
  endif()

  if(NOT HAVE_QT)
    find_package(Qt4 REQUIRED QtCore QtGui QtTest)
    if(QT4_FOUND)
      set(HAVE_QT TRUE)
    endif()
  endif()
endif()

Depending on only qt5-base seems correct if you ask me

@cenit
Copy link
Contributor

cenit commented May 3, 2020

Yes I just completed a build and it seems ok.
I am going to fix it in the next opencv 4.3 update.

Do you have time in any case to investigate circular dependency problems when a port file depends on qt5 (not qt5-base), since you are well into the matter? It seems that vcpkg in that case cannot resolve anymore the chain of dependencies and just throws hands up

@Neumann-A
Copy link
Contributor

Since depending on the metaport qt5 is probably always wrong having it fail feels more like a feature than a bug :). I look into it if I got some free time but it currently seems like a low priority issue.

It seems that vcpkg in that case cannot resolve anymore the chain of dependencies and just throws hands up

That seems like a bug which needs to be resolved in vcpkg sources.

@venabled
Copy link
Contributor

venabled commented May 3, 2020

This also breaks on macOS as well.

@venabled
Copy link
Contributor

venabled commented May 3, 2020

And confirmed that changing the dependency for the qt feature to point to qt5-base works on macOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants
@cenit @venabled @imaqqqq @Neumann-A @NancyLi1013 and others