Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 472234 - media-libs/gst-plugins-base-0.10.36: build depend on host when cross compiling
Summary: media-libs/gst-plugins-base-0.10.36: build depend on host when cross compiling
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: GStreamer package maintainers
URL:
Whiteboard:
Keywords: PATCH, STABLE
Depends on:
Blocks: cross-compile
  Show dependency tree
 
Reported: 2013-06-03 23:22 UTC by Bertrand Jacquin
Modified: 2019-06-22 08:49 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,461.67 KB, text/x-log)
2013-06-03 23:23 UTC, Bertrand Jacquin
Details
emerge --info (info.log,12.24 KB, text/x-log)
2013-06-03 23:23 UTC, Bertrand Jacquin
Details
gst-plugins-base-0.10.36.ebuild-GST_CONFIGPATH.diff (gst-plugins-base-0.10.36.ebuild-GST_CONFIGPATH.diff,571 bytes, patch)
2013-06-03 23:24 UTC, Bertrand Jacquin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bertrand Jacquin 2013-06-03 23:22:54 UTC
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
Comment 1 Bertrand Jacquin 2013-06-03 23:23:10 UTC
Created attachment 350034 [details]
build.log
Comment 2 Bertrand Jacquin 2013-06-03 23:23:19 UTC
Created attachment 350036 [details]
emerge --info
Comment 3 Bertrand Jacquin 2013-06-03 23:24:05 UTC
Created attachment 350038 [details, diff]
gst-plugins-base-0.10.36.ebuild-GST_CONFIGPATH.diff
Comment 4 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-06-15 18:54:21 UTC
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.
Comment 5 Mart Raudsepp gentoo-dev 2019-06-22 08:49:01 UTC
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.