Hello. I encountered a problem with opencv after updating from version 3.x to 4.x. It would seem that factory supplied opencv headers (or any other project header for that matter) are missing other factory supplied opencv headers due to a changed install path of the library. Previously, all opencv headers were installed in /usr/include/opencv2, but now that was changed to /usr/include/opencv4/opencv2, which causes older include paths not to work any more. If I create a /usr/include/opencv2 symlink to /usr/include/opencv4/opencv2, the problems seem to disappear. I find this change in install path to be pretty severe and unnecessary, especially considering how much damage it does. All previously working projects stopped building because of it, and now all project files using opencv includes now need updating. Additionally, renaming the /usr/share/pkgconfig/opencv.pc file to opencv4.pc is equally damaging, as qmake is now incapable of finding the opencv lib, unless all qmake build files are updated to use PKGCONFIG += opencv4 instead of opencv. These renames and path changes break backwards compatibility, not to mention the fact, that by adding major version numbers to the file and folder names will guarantee such breakages in the future. Considering all this, a change back to the original path and names should be considered to avoid such problems in the future. Thanks for reading. Reproducible: Always
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e402fc2e336e59a514557c6c1bdb014cb590fad1 commit e402fc2e336e59a514557c6c1bdb014cb590fad1 Author: Ross Charles Campbell <rossbridger.cc@gmail.com> AuthorDate: 2020-12-24 06:05:46 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2020-12-27 04:34:08 +0000 media-libs/opencv: version bump, remove old - Added constraint on CPU flags on x86 - Also closed out bugs that wasn't reported reproducible on newer versions Closes: https://bugs.gentoo.org/751781 Closes: https://bugs.gentoo.org/703658 Closes: https://bugs.gentoo.org/706040 Closes: https://bugs.gentoo.org/721706 Closes: https://bugs.gentoo.org/689838 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Ross Charles Campbell <rossbridger.cc@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/18801 Signed-off-by: Sam James <sam@gentoo.org> media-libs/opencv/Manifest | 4 ++-- ...{opencv-4.4.0-r1.ebuild => opencv-4.5.1.ebuild} | 26 +++++++++++++++------- 2 files changed, 20 insertions(+), 10 deletions(-)
Apparently this is an issue which comes up when using e.g. shotwell, although it's not clear to me if that's just something shotwell would solve when porting to newer opencv? (bug 706040).
(In reply to Sam James from comment #2) > (bug 706040). bug 739642