Trying to cross compile media-libs/gst-plugins-base-0.10.36 for i686-w64-mingw32 make the fail build as attached in build.log The fact is that sami_* functions are used in gst/subparse/samiparse.{c,h}. Theses files are compiled only if USE_XML is defined From gst/subparse/Makefile.am if USE_XML SAMIPARSE_SOURCES = samiparse.c samiparse.h else SAMIPARSE_SOURCES = endif USE_XML itself if defined to 0 or 1 by configure(.ac) like this : dnl check for gstreamer core features (subsystems) dnl FIXME: this assumes srcdir == builddir for uninstalled setups GST_CONFIGPATH=`$PKG_CONFIG --variable=includedir gstreamer-0.10`"/gst/gstconfig.h" AG_GST_PARSE_SUBSYSTEM_DISABLES($GST_CONFIGPATH) AM_CONDITIONAL(USE_XML, test $GST_DISABLE_XML != "1") "$PKG_CONFIG --variable=includedir gstreamer-0.10" at the src_configure moment is equivalent to this in case of cross compiling : # i686-w64-mingw32-pkg-config --variable=includedir gstreamer-0.10 /usr/include/gstreamer-0.10 This is ok, but then configure do the following : grep >/dev/null "#undef GST_DISABLE_XML" $GST_CONFIGPATH if test $? = 0; then GST_DISABLE_XML=0 else GST_DISABLE_XML=1 fi if test $GST_DISABLE_XML != "1"; then USE_XML_TRUE= USE_XML_FALSE='#' else USE_XML_TRUE='#' USE_XML_FALSE= fi That is terribly wrong as the 'grep' is done on HOST gstconfig.h instead of $ROOT/usr/include/gstreamer-0.10/gst/gstconfig.h This can be observed in the build.log as grep: /usr/include/gstreamer-0.10/gst/gstconfig.h: No such file or directory The way all this is done is quiet irrelevant, but here is a patch proposal to fix this. Also attached, emerge --info and full build.log Reproducible: Always Steps to Reproduce: 1. crossdev -t i686-w64-mingw32 2. emerge -Cv gstreamer 3. i686-w64-mingw32-emerge -vt gst-plugins-base:0.10
Created attachment 350034 [details] build.log
Created attachment 350036 [details] emerge --info
Created attachment 350038 [details, diff] gst-plugins-base-0.10.36.ebuild-GST_CONFIGPATH.diff
I am wondering if there is a more generic/upstreamable way we can fix this. For example, having configure.ac set GST_CONFIGPATH only if it's already unset. Then the ebuild can e.g. pass GST_CONFIGPATH=${ROOT}/$($(tc-getPKG_CONFIG) --variable=includedir gstreamer-0.10) as an argument to configure if it knows that it's cross-compiling. In any case, the same would have to do be done for all of the -good and -bad plugins too because they also the AG_GST_PARSE_SUBSYSTEM_DISABLES macro. So whatever the fix is, it should go into gstreamer's eclasses.
gstreamer 0.10 has been finally removed from the tree. If this is an issue with the 1.0 series too, please file a new bug against that version. Also the next 1.18 version (and maybe a 1.16.x version) will be built with meson, changing all cross-compile things.