Bug#955155: pocketsphinx FTCBFS: uses the build architecture pkg-config

Helmut Grohne helmut at subdivi.de
Fri Mar 27 17:21:52 GMT 2020


Source: pocketsphinx
Version: 0.8+5prealpha+1-11
Tags: patch upstream
User: debian-cross at lists.debian.org
Usertags: ftcbfs

pocketsphinx fails to cross build from source. One reason is that it
uses the build architecture pkg-config via AC_CHECK_PROG. The attached
patch replaces the use with PKG_PROG_PKG_CONFIG.

Another reason is that configure.ac decides that during cross
compilation, it should skip the gstreamer stuff (search for
AM_CONDITIONAL and BUILD_GST). Thus dh_install complains about missing
files. I think this upstream choice is unfortunate. I think upstream
should leave that choice to users (e.g. using an AC_ARG_WITH). Thus
users could enable it despite cross compilation. Do you think that would
work with upstream? It could look like:

AC_ARG_WITH(gstreamer, AS_HELP_STRING([--with-gstreamer],[Enable GStreamer plugin, autodetect unless cross building]))
AS_IF([test "x$with_gstreamer" != xno],[
  PKG_CHECK_MODULES(GStreamer, ..., HAVE_GST=yes, HAVE_GST=no)
  AS_IF([test "x$with_gstreamer" = xyes && test "$HAVE_GST" = no],[
    AC_MSG_ERROR(["gstreamer not found])])
])
AM_CONDITIONAL(BUILD_GST, test "x$with_gstreamer" != xno && test "$HAVE_GST" = yes && { test "x$with_gstreamer" = yes || test "$cross_compiling" = no; })

Even after enabling BUILD_GST, the cross build fails, because
dh_gstscancodecs does not work during cross building (even though the
plugin was successfully cross built). We don't presently have a solution
to this.

Please consider applying the attached patch to fix the pkg-config issue.
Please consider talking to upstream and propose the --with-gstreamer
switch to allow cross building the gstreamer plugin and unconditionally
pass --with-gstreamer to the build if that was successful. Please close
this bug even if pocketsphinx fails in dh_gstscancodecs.

Helmut
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cross.patch
Type: text/x-diff
Size: 986 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-a11y-devel/attachments/20200327/75f1181c/attachment.patch>


More information about the Pkg-a11y-devel mailing list