Bug#862024: gstreamer1.0-plugins-bad: Dependency on libopencv-contrib3.2 pulls over 236MB.

Michael Biebl biebl at debian.org
Fri Oct 20 20:16:33 UTC 2017

On Thu, 19 Oct 2017 22:35:33 -0300 Daniel Serpell
<daniel.serpell at gmail.com> wrote:
> Package: gstreamer1.0-plugins-bad
> Version: 1.12.3-2
> Followup-For: Bug #862024
> Hi!
> Biggest culprit are the new opencv packages, there libopencv-contrib3.2
> pulls libvtk (150MB) and other big packages, about 236MB in total.
> Next in the list is libopencv-calib3d3.2, at 60MB,
> libopencv-objdetect3.2 at 58MB, libopencv-imgcodecs3.2 at 57MB.
> So, simply splitting /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstopencv.so
> out in another package will reduce the size of dependencies to the
> previous level.

Sebastian what do you think about splitting out less common used plugins
with heavy dependencies into a separate binary package like

The first plugin moved to this -extra package would be libgstopencv.so
and we could move more plugins as we see fit (that's why I think using a
rather generic name like -extra would be preferrable).

The main gstreamer1.0-plugins-bad package would have a suggests:

A middle ground would be to investigate why  gstreamer1.0-plugins-bad
needs libopencv-contrib3.2 with opencv and if this could be avoided.
Emilio mentioned this on #debian-devel:

> <pochu> https://sources.debian.net/src/gst-plugins-bad1.0/1.12.2-1/configure.ac/#L2739
> <pochu>   PKG_CHECK_MODULES(OPENCV, opencv >= 2.3.0 opencv <= 3.2.0 , [
> <pochu> that's for opencv 2.x
> <pochu>     PKG_CHECK_MODULES(OPENCV_3, opencv >= 3, [
> <pochu>       dnl check opencv_contrib headers (not always present in opencv distributions)
> <pochu>       AC_CHECK_HEADERS([opencv2/bgsegm.hpp], [], [something_not_found=yes])],
> <pochu> sounds like it's looking for contrib in opencv 3?
> <mapreri> oh, yes
> <mapreri> wonders what it does with that
> <mbiebl_> pochu: oh right. since opencv had an update from 2.x to 3.x in the mean time
> <mapreri> then, please file a bug against it, there is nothing much I can do to trim down libopencv-contrib dependencies
> <mapreri> "  PKG_CHECK_MODULES(OPENCV, opencv >= 2.3.0 opencv <= 3.2.0 , [" this sounds like it will be sad with the upcoming opencv 3.3
> <mapreri> (well, it would ignore the opencv bits, it looks optional and build-time detected)
> <Sebastinas> mapreri: That was changed to <= 3.3.0 in 1.22.3
> <mapreri> Sebastinas: right - https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=6ef65f550b5fed24e4f8592a82b901140c0cf342
> <pochu> mapreri: but then installation would fail because of the lack of the opencv plugin
> <mapreri> pochu: ok, I always fear silent breakages with those optional configure-time detected things.
> <mbiebl_> mapreri: the comment in configure.ac is:     dnl Only required for OpenCV >= 3, we have compat code for older versions
> <mapreri> yes, I've read that
> <mbiebl_> pochu: that's only a check for a header though
> <mbiebl_> pochu: have you seen where it adds the link dependency?
> <mbiebl_> maybe I'm just blind
> <pochu> mbiebl_: it gets linked to it because opencv.pc has -lopencv_contrib in Libs
> <mapreri> does that means that linking with --as-needed would avoid it?
> <pochu> mbiebl_: the question is why with opencv 2.4, it was also linking against opencv_contrib, yet there was no dependency on libopencv-contrib2.4
> <mapreri> because there was no such package
> <mapreri> contrib is a thing only since 3.X
> <pochu> are you sure
> <pochu> cause I see
> <pochu>  libopencv-contrib-dev (=,
> <pochu>  libopencv-contrib2.4v5 (=,
> <pochu> https://buildd.debian.org/status/fetch.php?pkg=gst-plugins-bad1.0&arch=i386&ver=1.12.3-1&stamp=1505772817&raw=0
> <mapreri> oh, sorry, confused with upstream where starting with 3.x they moved contrib to a separate tarball/repository
> <pochu> and the plugin is linking with -lopencv_contrib
> <pochu> ah, it's linking with --as-needed though in both cases, but maybe it used no symbols from contrib with 2.4 and it does with 3.x
> <mbiebl_> pochu: ext/opencv/gstsegmentation.h
> <pochu> yep
> <pochu> #if (CV_MAJOR_VERSION >= 3)
> <pochu>   cv::Ptr<cv::BackgroundSubtractor> mog;                   /* cv::BackgroundSubtractorMOG */
> <pochu>   cv::Ptr<cv::BackgroundSubtractorMOG2> mog2;                   /* cv::BackgroundSubtractorMOG2 */
> <pochu> so either get upstream to not do that
> <pochu> or get slomo to disable or split this plugin :)

Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-gstreamer-maintainers/attachments/20171020/f719b822/attachment.sig>

More information about the pkg-gstreamer-maintainers mailing list