After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 765804 - GstPlayer build error due to not finding GstVideo-1.0.gir
GstPlayer build error due to not finding GstVideo-1.0.gir
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.9.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-04-29 10:42 UTC by A Ashley
Modified: 2016-11-18 10:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
horrible hack to work around GstPlayer build error (2.05 KB, patch)
2016-04-29 10:45 UTC, A Ashley
none Details | Review
player: Add required paths via pkg-config for gstreamer-video-1.0 for gobject-introspection (1.59 KB, patch)
2016-04-29 10:54 UTC, Sebastian Dröge (slomo)
none Details | Review
player: add gstreamer-base and gstreamer-video to pkg-config path (1.97 KB, patch)
2016-04-29 11:23 UTC, A Ashley
committed Details | Review
Re-Add GstVideo Gir to PKG Config Path (1.63 KB, patch)
2016-11-18 09:30 UTC, Stuart Axon
none Details | Review

Description A Ashley 2016-04-29 10:42:29 UTC
I'm compiling in gst-uninstalled mode on Ubuntu 16.04.

I am unable to compile gst-plugins-bad because the build of GstPlayer-1.0.gir fails. It fails because it cannot find GstVideo-1.0.gir. The .typelib rule also fails for the same problem.

The GstVideo-1.0.gir file is in gst-plugins-base package, but that is not referenced from the Makefile. I suspect that the reason builds have only recently stopped working is that there used to be a version of GstVideo-1.0.gir in one of the default directories that was being used by the introspection scanner.
Comment 1 A Ashley 2016-04-29 10:45:57 UTC
Created attachment 327000 [details] [review]
horrible hack to work around GstPlayer build error

The GstPlayer app needs .gir files from gstreamer and gst-plugins-base. When compiling using gst-uninstalled, the Makefile fails to find these required files and the build fails.

This patch is a nasty hack that assumes gst-plugins-base is at the same directory level as gst-plugins-bad. I'm sure there are automake macros that should be used to do this properly, but I don't what they are.
Comment 2 Sebastian Dröge (slomo) 2016-04-29 10:54:28 UTC
Created attachment 327001 [details] [review]
player: Add required paths via pkg-config for gstreamer-video-1.0 for gobject-introspection
Comment 3 Sebastian Dröge (slomo) 2016-04-29 10:54:44 UTC
What about this patch? Does it work for you?
Comment 4 A Ashley 2016-04-29 11:08:43 UTC
Alas, that didn't fix the problem. It's been a few days since I wrote the work-around and forgot that it was also failing to find GstBase.

Here's the build output where it fails:

  GEN      GstPlayer-1.0.gir
g-ir-scanner: warning: Option --strip-prefix has been deprecated;
see --identifier-prefix and --symbol-prefix.
Couldn't find include 'GstBase-1.0.gir' (search path: ['../../../gst-libs', '/home/alex/src/gst/master/gstreamer/gst', '/home/alex/src/gst/master/gst-plugins-base/gst-libs/gst/video', '/usr/share/ubuntu/gir-1.0', '/usr/share/gnome/gir-1.0', '/usr/local/share/gir-1.0', '/usr/share/gir-1.0', '/var/lib/snapd/desktop/gir-1.0', '/usr/share/gir-1.0', '/usr/share/gir-1.0', '/usr/share/gir-1.0'])
Makefile:1296: recipe for target 'GstPlayer-1.0.gir' failed
make[4]: *** [GstPlayer-1.0.gir] Error 1
make[4]: Leaving directory '/home/alex/src/gst/master/freedesktop-gst-plugins-bad/gst-libs/gst/player'
Makefile:1092: recipe for target 'player' failed
Comment 5 Sebastian Dröge (slomo) 2016-04-29 11:12:50 UTC
I assume those only need to be added to the first one then, not the typelib. Does that work? Adding gstreamer-base-1.0 there in addition to gstreamer-video-1.0?
Comment 6 A Ashley 2016-04-29 11:22:06 UTC
(In reply to Sebastian Dröge (slomo) from comment #5)
> I assume those only need to be added to the first one then, not the typelib.
> Does that work? Adding gstreamer-base-1.0 there in addition to
> gstreamer-video-1.0?

Adding is just to the .gir target still causes the typelib one to fail

  GEN      GstPlayer-1.0.typelib
Could not find GIR file 'GstBase-1.0.gir'; check XDG_DATA_DIRS or use --includedir
/home/alex/src/gst/master/gst-plugins-base/gst-libs/gst/video/GstVideo-1.0.gir:10:43: error: Failed to parse included gir GstBase-1.0
error parsing file GstPlayer-1.0.gir: Failed to parse included gir GstVideo-1.0
Makefile:1325: recipe for target 'GstPlayer-1.0.typelib' failed
make[4]: *** [GstPlayer-1.0.typelib] Error 1

Adding it in both places fixes it. I'll upload a new patch.
Comment 7 A Ashley 2016-04-29 11:23:08 UTC
Created attachment 327006 [details] [review]
player: add gstreamer-base and gstreamer-video to pkg-config path
Comment 8 Sebastian Dröge (slomo) 2016-04-29 12:15:56 UTC
commit 7acb1a35cbd0041620109f0486b3c4a101bd57dc
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Fri Apr 29 13:54:01 2016 +0300

    player: Add required paths via pkg-config for gstreamer-base-1.0 and gstreamer-video-1.0 for gobject-introspection
    
    The GstBase-1.0.gir and GstVideo-1.0.gir files are required by GstPlayer.
    Uninstalled builds fail if these files cannot be found.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=765804
Comment 9 A Ashley 2016-04-29 13:38:37 UTC
Thanks Sebastion
Comment 10 Stuart Axon 2016-11-17 15:55:49 UTC
It seems like this bug is back, the fix is similar - add gstreamer-video back to Makefile.am:




diff --git a/gst-libs/gst/gl/Makefile.am b/gst-libs/gst/gl/Makefile.am
index 68cc619..0e589f7 100644
--- a/gst-libs/gst/gl/Makefile.am
+++ b/gst-libs/gst/gl/Makefile.am
@@ -168,6 +168,7 @@ GstGL-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstgl-@GST_API_VERSION@
                $(GL_CFLAGS) \
                --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
                --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+               --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-video-@GST_API_VERSION@` \
                --library=libgstgl-@GST_API_VERSION@.la \
                --include=Gst-@GST_API_VERSION@ \
                --include=GstBase-@GST_API_VERSION@ \
@@ -199,6 +200,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
                --includedir=$(builddir) \
                --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
                --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+               --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-video-@GST_API_VERSION@` \
                $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
 
 CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
Comment 11 Stuart Axon 2016-11-17 15:57:17 UTC
(Build conducted on raspberry pi with Gstreamer Uninstalled).
Comment 12 Stuart Axon 2016-11-18 09:30:30 UTC
Created attachment 340225 [details] [review]
Re-Add GstVideo Gir to PKG Config Path
Comment 13 David Evans 2016-11-18 10:10:01 UTC
(In reply to Stuart Axon from comment #12)
> Created attachment 340225 [details] [review] [review]
> Re-Add GstVideo Gir to PKG Config Path

https://bugzilla.gnome.org/show_bug.cgi?id=765804
Comment 14 David Evans 2016-11-18 10:10:42 UTC
Apologies, I meant: https://bugzilla.gnome.org/show_bug.cgi?id=774624