Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 666716 - media-libs/opencv-3.4.1-r4: Unhandled automagic dependency on >=dev-games/ogre-1.10[experimental] contrib
Summary: media-libs/opencv-3.4.1-r4: Unhandled automagic dependency on >=dev-games/ogr...
Status: CONFIRMED
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:
Depends on:
Blocks:
 
Reported: 2018-09-21 18:02 UTC by Andreas Sturmlechner
Modified: 2020-01-13 07:28 UTC (History)
3 users (show)

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


Attachments
build.log (media-libs:opencv-3.4.1-r4:20180921-161210.log,853.30 KB, text/x-log)
2018-09-21 18:02 UTC, Andreas Sturmlechner
Details
Fix building against ogre-1.12.x (opencv-3.4.1-fix_ovis_with_ogre-1.12.x.patch,588 bytes, patch)
2020-01-13 07:28 UTC, Sven Eden
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Sturmlechner gentoo-dev 2018-09-21 18:02:25 UTC
Created attachment 547494 [details]
build.log

opencv_contrib-3.4.1/modules/ovis/CMakeLists.txt has:

find_package(OGRE 1.10 QUIET)

...en-/disabling ovis module based on availability of >=ogre-1.10.
Comment 1 Andreas Sturmlechner gentoo-dev 2018-09-21 18:08:38 UTC
Oh, and the build error as follows:

/var/tmp/portage/media-libs/opencv-3.4.1-r4/work/opencv_contrib-3.4.1/modules/ovis/src/ovis.cpp:7:10: fatal error: OgreApplicationContext.h: No such file or directory
 #include <OgreApplicationContext.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.


@Sven, do you have an idea where this should be coming from (USE-flag)?
Comment 2 Andreas Sturmlechner gentoo-dev 2018-09-21 19:03:09 UTC
Found it.

@Sven, is USE=experimental going to stay with >=ogre-1.11 and >=ogre-2 as well, will it be a different USE flag or part of the default installation? That will influence how this dependency needs to be declared in opencv ebuild.
Comment 3 Jouni Kosonen 2018-09-22 00:23:02 UTC
Bug 647266 comment 22 suggests that the dependency should be 
contrib? ( dev-games/ogre[experimental(+)] )
Comment 4 Sven Eden 2018-09-23 09:34:47 UTC
(In reply to Andreas Sturmlechner from comment #2)
> Found it.
> 
> @Sven, is USE=experimental going to stay with >=ogre-1.11 and >=ogre-2 as
> well, will it be a different USE flag or part of the default installation?
> That will influence how this dependency needs to be declared in opencv
> ebuild.

The referenced "BITES" component is only marked as experimental in the Ogre 1.10 series, and a core component from Ogre 1.11 on. So this flag is only needed with Ogre 1.10 enabled. (*)

However, it is really only "ovis" that uses Ogre. Maybe an "ogre" USE flag that enables the "Ogre VISualizer" would be in order?
Or maybe, as there are several contrib_* flags already, a contrib_ovis flag? It could read:
  "OVIS module requires dev-games/ogre"
which would nicely fall in line as well.

(*) I _think_ that the OpenCV ovis module is only compatible with Ogre-1.10, but I haven't checked against Ogre-1.11 or 2.1, yet.
Comment 5 Jouni Kosonen 2018-10-08 10:03:55 UTC
(In reply to Sven Eden from comment #4)
> (*) I _think_ that the OpenCV ovis module is only compatible with Ogre-1.10,
> but I haven't checked against Ogre-1.11 or 2.1, yet.
FWIW, at least opencv-3.4.3 does build against ogre-1.11.2[-experimental] too.
Comment 6 Sven Eden 2020-01-13 07:28:56 UTC
Created attachment 603134 [details, diff]
Fix building against ogre-1.12.x

As long as OpenCV has no USE flag to allow or deny building of the OVIS app, the build system will automagically enable it when it detects the presence of Ogre.

Unfortunately it does not detect the version.

The latest stable Ogre release is 1.12.4, which is currently masked in the tree for reverse dependency checking. One of these is OpenCV, but only implicitly.

The provided patch removes the only single point of failure to build against ogre-1.12.4. 

As a side note: OpenCV-4.1.2 does not build against ogre-1.9.0 and *needs* ogre-1.12.4.

Now to the evil part:
While this patch makes the ovis app in opencv-3.x to compile against ogre-1.12.4, it also breaks building against ogre-1.9.0.