Bug 261519 - graphics/opencv: Fix build with VTK option
Summary: graphics/opencv: Fix build with VTK option
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Tobias C. Berner
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2022-01-27 16:22 UTC by Oleg Sidorkin
Modified: 2022-01-28 11:43 UTC (History)
1 user (show)

See Also:
tcberner: maintainer-feedback+
koobs: merge-quarterly?


Attachments
Attempt to fix deps and plist of graphics/opencv port (1.02 KB, patch)
2022-01-27 16:22 UTC, Oleg Sidorkin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Sidorkin 2022-01-27 16:22:37 UTC
Created attachment 231391 [details]
Attempt to fix deps and plist of graphics/opencv port

Enable VTK in grapics/opencv port option and try to build it with poudriere.
It will fail:

CMake Error at /usr/local/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:14 (message):
  The imported target "Qt5::Core" references the file

     "/usr/local/lib/qt5/bin/qmake"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/usr/local/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /usr/local/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake:9 (_qt5_Core_check_file_exists)
  /usr/local/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:232 (include)
  /usr/local/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:99 (find_package)
  /usr/local/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:99 (find_package)
  /usr/local/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
  /usr/local/lib/cmake/vtk-9.1/VTK-vtk-module-find-packages.cmake:115 (find_package)
  /usr/local/lib/cmake/vtk-9.1/vtk-config.cmake:150 (include)
  cmake/OpenCVDetectVTK.cmake:2 (find_package)
  CMakeLists.txt:815 (include)


-- Configuring incomplete, errors occurred!
See also "/wrkdirs/usr/ports/graphics/opencv/work/.build/CMakeFiles/CMakeOutput.log".
*** Error code 1



1) Some plist entries were lost during opencv update to 4.5.5 - restore them

2) Add qmake and moc to the list of dependencies (fixes poudriere builds, however probably there is a better place to put the dependencies)
Comment 1 Tobias C. Berner freebsd_committer freebsd_triage 2022-01-27 16:53:17 UTC
Moin moin


VTK_USE=		QT=buildtools_build,qmake_build

should be enough, no?


mfg Tobias
Comment 2 Oleg Sidorkin 2022-01-27 17:07:50 UTC
(In reply to Tobias C. Berner from comment #1)
Didn't worked for me (ports were updated today):

CMake Error at /usr/local/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:14 (message):
  The imported target "Qt5::Core" references the file

     "/usr/local/lib/qt5/bin/qmake"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/usr/local/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /usr/local/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake:9 (_qt5_Core_check_file_exists)
  /usr/local/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:232 (include)
  /usr/local/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:99 (find_package)
  /usr/local/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:99 (find_package)
  /usr/local/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
  /usr/local/lib/cmake/vtk-9.1/VTK-vtk-module-find-packages.cmake:115 (find_package)
  /usr/local/lib/cmake/vtk-9.1/vtk-config.cmake:150 (include)
  cmake/OpenCVDetectVTK.cmake:2 (find_package)
  CMakeLists.txt:815 (include)


-- Configuring incomplete, errors occurred!
See also "/wrkdirs/usr/ports/graphics/opencv/work/.build/CMakeFiles/CMakeOutput.log".
*** Error code 1
Comment 3 Tobias C. Berner freebsd_committer freebsd_triage 2022-01-27 17:13:49 UTC
(In reply to Oleg Sidorkin from comment #2)
sorry, I maybe missunderstood you :) I thought the patch you had was working, and suggested an improvement. If oyu stil get the Qt::Core error, then you'll need to depend on USE_QT=core additionally.

I'll take a look.
Comment 4 Oleg Sidorkin 2022-01-27 17:27:37 UTC
The path I've attached worked for me. 

I've just tried your version without my changes in the Makefile and it didn't worked.

Anyway, thanks for looking at this :)
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2022-01-28 00:45:58 UTC
^Triage: Set feedback pending maintainer
Comment 6 commit-hook freebsd_committer freebsd_triage 2022-01-28 11:43:04 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b5ce2eb869cf89fe02e6954ddd72e1127e7bdf1f

commit b5ce2eb869cf89fe02e6954ddd72e1127e7bdf1f
Author:     Tobias C. Berner <tcberner@FreeBSD.org>
AuthorDate: 2022-01-28 11:40:44 +0000
Commit:     Tobias C. Berner <tcberner@FreeBSD.org>
CommitDate: 2022-01-28 11:42:16 +0000

    graphics/opencv: fix VTK option

    As VTK is built with Qt5 support, bring in the required
    dependencies for the build system.

    Submitted by:   Oleg Sidorkin <osidorkin@gmail.com>
    PR:             261519

 graphics/opencv/Makefile  | 2 ++
 graphics/opencv/pkg-plist | 3 +++
 2 files changed, 5 insertions(+)