Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 706040 - media-libs/opencv-4.1.2-r2 : changed library install path and pkgconf *.pc file name result in missing headers and build system problems
Summary: media-libs/opencv-4.1.2-r2 : changed library install path and pkgconf *.pc fi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Amy Liffey
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-01-21 22:30 UTC by PusRob
Modified: 2020-12-27 04:36 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description PusRob 2020-01-21 22:30:12 UTC
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
Comment 1 Larry the Git Cow gentoo-dev 2020-12-27 04:34:16 UTC
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(-)
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-12-27 04:36:30 UTC
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).
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-12-27 04:36:53 UTC
(In reply to Sam James from comment #2)
> (bug 706040).

bug 739642