FS#42715 - [opencv] Incompatiblity with Qt5

Attached to Project: Arch Linux
Opened by Hao XIE (oaheix) - Saturday, 08 November 2014, 10:45 GMT
Last edited by Doug Newgard (Scimmia) - Tuesday, 03 January 2017, 16:59 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Ray Rashif (schivmeister)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

It seems that the new opencv package now by default depends on vtk, which might depend on Qt4, thus a project involving both opencv and Qt5 will have a runtime error, indicating that the GUI library of Qt4 is not found. I temporarily solved it by downgrading it to version 2.4.9-5.

Additional info:
* package version(s) 2.4.10-1
* config and/or log files etc.

Steps to reproduce:
This task depends upon

Closed by  Doug Newgard (Scimmia)
Tuesday, 03 January 2017, 16:59 GMT
Reason for closing:  Fixed
Additional comments about closing:  opencv 3.1.0
Comment by Ray Rashif (schivmeister) - Sunday, 09 November 2014, 12:06 GMT
  • Field changed: Architecture (x86_64 → All)
Thanks for reporting, I was not aware of this peculiarity but I do see it now in the detectVTK cmake code. I don't have a useful project to test this.

Could you elaborate on your specific use-case? An example runtime error output or a minimal working sample code for reproduction would be good.

If there is no other way around then we'll have to remove support for vtk altogether.
Comment by Hao XIE (oaheix) - Monday, 10 November 2014, 12:00 GMT
Ray, Thanks for your reply! I made a minimal working project with a CMakeLists.txt file and a simple "Hello World" source file, shown in the attachment. This project could be compiled and run normally with opencv-2.4.9-5, but failed when upgrading to 2.4.10-1. Hope this would reproduce the situation.
Comment by Ray Rashif (schivmeister) - Tuesday, 11 November 2014, 12:38 GMT
You are right, it barfs. This gets messed up because viz links to qt4, so in the end when you build your project (which links to qt5) you have something like this:

$ ldd test_opencv| grep -i qt
libQt5OpenGL.so.5 => /usr/lib/libQt5OpenGL.so.5 (0xb76f3000)
libQt5Widgets.so.5 => /usr/lib/libQt5Widgets.so.5 (0xb6fed000)
libQt5Gui.so.5 => /usr/lib/libQt5Gui.so.5 (0xb5990000)
libQt5Core.so.5 => /usr/lib/libQt5Core.so.5 (0xb54d4000)
libQtGui.so.4 => /usr/lib/libQtGui.so.4 (0xaf0c1000) <-- Qt4!
libQtCore.so.4 => /usr/lib/libQtCore.so.4 (0xaedbd000) <-- Qt4!

Qt does not like this (by design, not just a matter of namespaces it seems). Initially the viz->qt dep did not look troublesome because I assumed it should have nothing to do with highgui and therefore would have no effect on projects.

I will rebuild without vtk and split a build with qt (and maybe also qt5). I'm hoping that'll be the end of this.

Loading...