GNOME Bugzilla – Bug 794708
g-i: gl: Cannot cross compile gst-plugins-base because an introspection problem
Last modified: 2018-03-27 10:52:25 UTC
I am trying to cross compile gst-plugins-base 1.14.0 for an i.MX6 target using Yocto. But it fails. Here is the error: Couldn't find include 'GstVideo-1.0.gir' (search path: '['/home/test/BuildSetups/yocto-setup/build/tmp/work/armv7ahf-neon-imx-linux-gnueabi/gstreamer1.0-plugins-base/1.14.0-r0/recipe-sysroot/usr/share/gir-1.0', '/usr/share/gir-1.0', '/usr/share/gir-1.0', '/usr/share/gir-1.0', '/home/test/BuildSetups/yocto-setup/build/tmp/work/armv7ahf-neon-imx-linux-gnueabi/gstreamer1.0-plugins-base/1.14.0-r0/recipe-sysroot/usr/share/gir-1.0', '/home/test/BuildSetups/yocto-setup/build/tmp/work/armv7ahf-neon-imx-linux-gnueabi/gstreamer1.0-plugins-base/1.14.0-r0/recipe-sysroot-native/usr/share/gir-1.0', '/usr/share/gir-1.0', '/home/test/BuildSetups/yocto-setup/build/tmp/work/armv7ahf-neon-imx-linux-gnueabi/gstreamer1.0-plugins-base/1.14.0-r0/recipe-sysroot-native/usr/share/gir-1.0']') Makefile:1506: recipe for target 'GstGL-1.0.gir' failed The error happens because the .gir file is in gst-libs/gst/video/ , and this is not a search path. What also stands out is that for some reason, '/usr/share/gir-1.0' is added. This is a big mistake when cross compiling - NEVER refer to include and library directories of the host. I do not know why this path is there.
Created attachment 370181 [details] [review] gl: pick up GstVideo-1.0.gir from local build Can you give this a spin?
Well, it fixes that problem ... but there's a next one :) PKG_CONFIG_PATH="../../../pkgconfig:/home/test/BuildSetups/yocto-setup/build/tmp/work/armv7ahf-neon-imx-linux-gnueabi/gstreamer1.0-plugins-base/1.14.0-r0/recipe-sysroot/usr/lib/pkgconfig:/home/test/BuildSetups/yocto-setup/build/tmp/work/armv7ahf-neon-imx-linux-gnueabi/gstreamer1.0-plugins-base/1.14.0-r0/recipe-sysroot/usr/share/pkgconfig" \ /home/test/BuildSetups/yocto-setup/build/tmp/work/armv7ahf-neon-imx-linux-gnueabi/gstreamer1.0-plugins-base/1.14.0-r0/recipe-sysroot/usr/bin/g-ir-compiler-wrapper \ --includedir=../../../../gst-plugins-base-1.14.0/gst-libs/gst/gl \ --includedir=. \ --includedir=`PKG_CONFIG_PATH="../../../pkgconfig:/home/test/BuildSetups/yocto-setup/build/tmp/work/armv7ahf-neon-imx-linux-gnueabi/gstreamer1.0-plugins-base/1.14.0-r0/recipe-sysroot/usr/lib/pkgconfig:/home/test/BuildSetups/yocto-setup/build/tmp/work/armv7ahf-neon-imx-linux-gnueabi/gstreamer1.0-plugins-base/1.14.0-r0/recipe-sysroot/usr/share/pkgconfig" /home/test/BuildSetups/yocto-setup/build/tmp/work/armv7ahf-neon-imx-linux-gnueabi/gstreamer1.0-plugins-base/1.14.0-r0/recipe-sysroot-native/usr/bin/pkg-config --variable=girdir gstreamer-1.0` \ --includedir=`PKG_CONFIG_PATH="../../../pkgconfig:/home/test/BuildSetups/yocto-setup/build/tmp/work/armv7ahf-neon-imx-linux-gnueabi/gstreamer1.0-plugins-base/1.14.0-r0/recipe-sysroot/usr/lib/pkgconfig:/home/test/BuildSetups/yocto-setup/build/tmp/work/armv7ahf-neon-imx-linux-gnueabi/gstreamer1.0-plugins-base/1.14.0-r0/recipe-sysroot/usr/share/pkgconfig" /home/test/BuildSetups/yocto-setup/build/tmp/work/armv7ahf-neon-imx-linux-gnueabi/gstreamer1.0-plugins-base/1.14.0-r0/recipe-sysroot-native/usr/bin/pkg-config --variable=girdir gstreamer-base-1.0` \ --includedir=`PKG_CONFIG_PATH="../../../pkgconfig:/home/test/BuildSetups/yocto-setup/build/tmp/work/armv7ahf-neon-imx-linux-gnueabi/gstreamer1.0-plugins-base/1.14.0-r0/recipe-sysroot/usr/lib/pkgconfig:/home/test/BuildSetups/yocto-setup/build/tmp/work/armv7ahf-neon-imx-linux-gnueabi/gstreamer1.0-plugins-base/1.14.0-r0/recipe-sysroot/usr/share/pkgconfig" /home/test/BuildSetups/yocto-setup/build/tmp/work/armv7ahf-neon-imx-linux-gnueabi/gstreamer1.0-plugins-base/1.14.0-r0/recipe-sysroot-native/usr/bin/pkg-config --variable=girdir gstreamer-video-1.0` \ GstGL-1.0.gir -o GstGL-1.0.typelib Could not find GIR file 'GstVideo-1.0.gir'; check XDG_DATA_DIRS or use --includedir error parsing file GstGL-1.0.gir: Failed to parse included gir GstVideo-1.0 If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the recipe should help. (typically like this: GIR_EXTRA_LIBS_PATH="${B}/something/.libs" ) Makefile:1538: recipe for target 'GstGL-1.0.typelib' failed make[5]: *** [GstGL-1.0.typelib] Error 1
Created attachment 370182 [details] [review] gl: pick up GstVideo-1.0.gir from local build dir (v2) Next try.
This works now, thanks!
Thanks! commit df66d00876d035ab64c1e3b6a17e16b920fae2b9 Author: Tim-Philipp Müller <tim@centricular.com> Date: Tue Mar 27 10:43:16 2018 +0100 gl: pick up GstVideo-1.0.gir from local build dir https://bugzilla.gnome.org/show_bug.cgi?id=794708