GNOME Bugzilla – Bug 765804
GstPlayer build error due to not finding GstVideo-1.0.gir
Last modified: 2016-11-18 10:10:42 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.
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.
Created attachment 327001 [details] [review] player: Add required paths via pkg-config for gstreamer-video-1.0 for gobject-introspection
What about this patch? Does it work for you?
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
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?
(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.
Created attachment 327006 [details] [review] player: add gstreamer-base and gstreamer-video to pkg-config path
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
Thanks Sebastion
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)
(Build conducted on raspberry pi with Gstreamer Uninstalled).
Created attachment 340225 [details] [review] Re-Add GstVideo Gir to PKG Config Path
(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
Apologies, I meant: https://bugzilla.gnome.org/show_bug.cgi?id=774624