[v3] gst1-plugins-bad: fix build against openjpeg 2.2

Message ID 20170908133156.10357-1-ps.report@gmx.net
State Accepted
Commit 3a5d4db9549f6a777b06819bc00146a30d687d22
Headers show
Series
  • [v3] gst1-plugins-bad: fix build against openjpeg 2.2
Related show

Commit Message

Peter Seiderer Sept. 8, 2017, 1:31 p.m.
Add upstream patch to fix build against openjpeg 2.2.

Fixes [1]:

  gstopenjpeg.h:42:37: fatal error: openjpeg-2.1/openjpeg.h: No such file or directory

[1] http://autobuild.buildroot.net/results/90f1f7838f08e3a557be27470406d4d84dbcc828

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Changes v2 -> v3:
  - add _GETTEXTIZE (instead of Makefile.in.in patch, suggested by Thomas Petazzoni)

Changes v1 ->v2:
 - add _AUTORECONF (suggested by Peter Korsgaard)
---
 ...1-openjpeg-Fix-build-against-openjpeg-2.2.patch | 93 ++++++++++++++++++++++
 .../gst1-plugins-bad/gst1-plugins-bad.mk           |  4 +
 2 files changed, 97 insertions(+)
 create mode 100644 package/gstreamer1/gst1-plugins-bad/0001-openjpeg-Fix-build-against-openjpeg-2.2.patch

Comments

Aleksander Morgado Sept. 9, 2017, 8:26 p.m. | #1
Hey Thomas and Peter,

> Changes v2 -> v3:
>   - add _GETTEXTIZE (instead of Makefile.in.in patch, suggested by Thomas Petazzoni)
>
> Changes v1 ->v2:
>  - add _AUTORECONF (suggested by Peter Korsgaard)

Re-running gettextize just to make autoreconf work is a bit overkill;
gettextize is something that the package maintainer runs to get the
i18n setup ready and among other things it may update gnulib imported
files in unexpected ways. I'd bet that letting just autopoint work as
expected (as a step part of autoreconf) would be way more than enough
here (i.e. no _GETTEXTIZE needed), but that step is currently disabled
in buildroot by default since some years ago.

See for reference this patch I sent last month, that makes autopoint
work again during autoreconf:
http://lists.busybox.net/pipermail/buildroot/2017-August/200941.html
Aleksander Morgado Sept. 9, 2017, 8:42 p.m. | #2
>> Changes v2 -> v3:
>>   - add _GETTEXTIZE (instead of Makefile.in.in patch, suggested by Thomas Petazzoni)
>>
>> Changes v1 ->v2:
>>  - add _AUTORECONF (suggested by Peter Korsgaard)
>
> Re-running gettextize just to make autoreconf work is a bit overkill;
> gettextize is something that the package maintainer runs to get the
> i18n setup ready and among other things it may update gnulib imported
> files in unexpected ways. I'd bet that letting just autopoint work as
> expected (as a step part of autoreconf) would be way more than enough
> here (i.e. no _GETTEXTIZE needed), but that step is currently disabled
> in buildroot by default since some years ago.
>
> See for reference this patch I sent last month, that makes autopoint
> work again during autoreconf:
> http://lists.busybox.net/pipermail/buildroot/2017-August/200941.html
>

BTW, autopoint would also copy the latest available po/Makefile.in.in
when run as part of autoreconf (and overwrite whatever was provided in
the dist tarball), so probably the gettext min version bump to 0.19
would not be required in this case either.
Thomas Petazzoni Sept. 9, 2017, 8:48 p.m. | #3
Hello,

On Sat, 9 Sep 2017 22:26:19 +0200, Aleksander Morgado wrote:

> Re-running gettextize just to make autoreconf work is a bit overkill;
> gettextize is something that the package maintainer runs to get the
> i18n setup ready and among other things it may update gnulib imported
> files in unexpected ways. I'd bet that letting just autopoint work as
> expected (as a step part of autoreconf) would be way more than enough
> here (i.e. no _GETTEXTIZE needed), but that step is currently disabled
> in buildroot by default since some years ago.
> 
> See for reference this patch I sent last month, that makes autopoint
> work again during autoreconf:
> http://lists.busybox.net/pipermail/buildroot/2017-August/200941.html

The problem with your patch is that nothing guarantees that
host-gettext is available when <pkg>_AUTORECONF = YES. Indeed
<pkg>_AUTORECONF = YES only pulls in host-autoconf, host-automake and
host-libtool, but not host-gettext.

And we of course don't want to have <pkg>_AUTORECONF = YES pull
host-gettext, as it is a fairly heavy dependency.

To be honest, I don't really understand this gettextize vs. autopoint
thing. Since you seem to understand what's the point of this, could you
give some background?

If autopoint is indeed sufficient to replace the gettextize invocation,
then we could change <pkg>_GETTEXTIZE to simply pull-in host-gettext
and pass AUTOPOINT=/correct/path/to/autopoint during autoreconf. Of
course, all existing packages that use GETTEXTIZE = YES would have to
be verified.

Best regards,

Thomas
Aleksander Morgado Sept. 10, 2017, 7:10 a.m. | #4
>> Re-running gettextize just to make autoreconf work is a bit overkill;
>> gettextize is something that the package maintainer runs to get the
>> i18n setup ready and among other things it may update gnulib imported
>> files in unexpected ways. I'd bet that letting just autopoint work as
>> expected (as a step part of autoreconf) would be way more than enough
>> here (i.e. no _GETTEXTIZE needed), but that step is currently disabled
>> in buildroot by default since some years ago.
>>
>> See for reference this patch I sent last month, that makes autopoint
>> work again during autoreconf:
>> http://lists.busybox.net/pipermail/buildroot/2017-August/200941.html
>
> The problem with your patch is that nothing guarantees that
> host-gettext is available when <pkg>_AUTORECONF = YES. Indeed
> <pkg>_AUTORECONF = YES only pulls in host-autoconf, host-automake and
> host-libtool, but not host-gettext.
>
> And we of course don't want to have <pkg>_AUTORECONF = YES pull
> host-gettext, as it is a fairly heavy dependency.
>

If host-gettext isn't available, $(AUTOPOINT) would just be an empty
variable and autoreconf just ignores the autopoint step all together,
equivalent to setting it to /bin/true (that seemed the case in my
tests anyway). For my usecase I had the package that was requiring
this autoreconf just pull host-gettext, and that made everything work
(ModemManager building from git):

MODEM_MANAGER_DEPENDENCIES = host-pkgconf host-gettext libglib2 libgudev
MODEM_MANAGER_AUTORECONF = YES

I'm assuming that other packages would also have autopoint enabled in
that case, but probably didn't affect them much as the ones requiring
some kind of i18n update were running gettextize anyway, and the ones
not needing i18n wouldn't be affected.

> To be honest, I don't really understand this gettextize vs. autopoint
> thing. Since you seem to understand what's the point of this, could you
> give some background?
>

I'm totally not an expert on this, allI just happened to be fighting
with all this some weeks ago... :)

gettextize prepares the package to have i18n support, so it usually is
something done by the maintainer of the package. This process will
import and update gnulib files required during the setup, and even
modify the top-level Makefile.am and configure.ac (!). A couple of
weeks ago I was playing with all this trying to setup buildroot
ModemManager git builds, and _GETTEXTIZE actually made my builds fail
as gettextize touched too much (the configure.ac changes it did in
particular).

autopoint is meant to be run during autoreconf, it checks whether i18n
support is enabled in the package, and updates the i18n support with
the currently available one in the system. This is a step required
when autoreconf-ing a package that has i18n support. No configure.ac
or Makefile.am is updated in this case, the i18n support is already
available in the package, autopoint just updates it.

> If autopoint is indeed sufficient to replace the gettextize invocation,
> then we could change <pkg>_GETTEXTIZE to simply pull-in host-gettext
> and pass AUTOPOINT=/correct/path/to/autopoint during autoreconf. Of
> course, all existing packages that use GETTEXTIZE = YES would have to
> be verified.
>

That's an option I guess. Although it would be much much easier to
just have _AUTORECONF=yes pull host-gettext, truth be told. It's a
fairly heavy dep, but it's a host-dep anyway. This could maybe even
allow removing a lot of (all?) the explicit _GETTEXTIZE=yes
requirements from the different packages.
Peter Seiderer Sept. 10, 2017, 7:59 a.m. | #5
Hello Aleksander,

On Sat, 9 Sep 2017 22:26:19 +0200, Aleksander Morgado <aleksander@aleksander.es> wrote:

> Hey Thomas and Peter,
> 
> > Changes v2 -> v3:
> >   - add _GETTEXTIZE (instead of Makefile.in.in patch, suggested by Thomas Petazzoni)
> >
> > Changes v1 ->v2:
> >  - add _AUTORECONF (suggested by Peter Korsgaard)  
> 
> Re-running gettextize just to make autoreconf work is a bit overkill;
> gettextize is something that the package maintainer runs to get the
> i18n setup ready and among other things it may update gnulib imported
> files in unexpected ways. I'd bet that letting just autopoint work as
> expected (as a step part of autoreconf) would be way more than enough
> here (i.e. no _GETTEXTIZE needed), but that step is currently disabled
> in buildroot by default since some years ago.
> 
> See for reference this patch I sent last month, that makes autopoint
> work again during autoreconf:
> http://lists.busybox.net/pipermail/buildroot/2017-August/200941.html
> 

Sorry, did a quick test of your patch for the gst1-plugins-bad test
case, did not work, I still get the following error message:

  *** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version 0.17 but the autoconf macros are from gettext version 0.19

Regards,
Peter


And the defconfig used:

BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_GSTREAMER1=y
# BR2_PACKAGE_GSTREAMER1_PARSE is not set
# BR2_PACKAGE_GSTREAMER1_GST_DEBUG is not set
# BR2_PACKAGE_GSTREAMER1_PLUGIN_REGISTRY is not set
# BR2_PACKAGE_GSTREAMER1_INSTALL_TOOLS is not set
# BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIOCONVERT is not set
BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIORATE=y
BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIOTESTSRC=y
BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_ENCODING=y
BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_GIO=y
# BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_PLAYBACK is not set
# BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIORESAMPLE is not set
BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_SUBPARSE=y
# BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VOLUME is not set
BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_TREMOR=y
BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_OPUS=y
BR2_PACKAGE_GST1_PLUGINS_BAD=y
BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ACCURIP=y
BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ADPCMDEC=y
BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_AUDIOFXBAD=y
BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_BAYER=y
BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_CAMERABIN2=y
BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DEBUGUTILS=y
BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DVBSUBOVERLAY=y
BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FACEOVERLAY=y
BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_INTER=y
BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_IVFPARSE=y
BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEGPSMUX=y
BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_PCAPPARSE=y
BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_REMOVESILENCE=y
BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_RTMP=y
BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SPEED=y
BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_BZ2=y
BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DVB=y
BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_HLS=y
BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_LIBMMS=y
BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MUSEPACK=y
BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_OPENJPEG=y
BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SHM=y
BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_WEBP=y
BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_WEBRTCDSP=y
BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_X265=y
BR2_PACKAGE_JPEG=y
Aleksander Morgado Sept. 10, 2017, 7:25 p.m. | #6
Hey Peter,

Do you have host-gettext explicitly enabled? Could you attach the output of
the make command when rebuilding the package?

On Sep 10, 2017 09:59, "Peter Seiderer" <ps.report@gmx.net> wrote:

> Hello Aleksander,
>
> On Sat, 9 Sep 2017 22:26:19 +0200, Aleksander Morgado <
> aleksander@aleksander.es> wrote:
>
> > Hey Thomas and Peter,
> >
> > > Changes v2 -> v3:
> > >   - add _GETTEXTIZE (instead of Makefile.in.in patch, suggested by
> Thomas Petazzoni)
> > >
> > > Changes v1 ->v2:
> > >  - add _AUTORECONF (suggested by Peter Korsgaard)
> >
> > Re-running gettextize just to make autoreconf work is a bit overkill;
> > gettextize is something that the package maintainer runs to get the
> > i18n setup ready and among other things it may update gnulib imported
> > files in unexpected ways. I'd bet that letting just autopoint work as
> > expected (as a step part of autoreconf) would be way more than enough
> > here (i.e. no _GETTEXTIZE needed), but that step is currently disabled
> > in buildroot by default since some years ago.
> >
> > See for reference this patch I sent last month, that makes autopoint
> > work again during autoreconf:
> > http://lists.busybox.net/pipermail/buildroot/2017-August/200941.html
> >
>
> Sorry, did a quick test of your patch for the gst1-plugins-bad test
> case, did not work, I still get the following error message:
>
>   *** error: gettext infrastructure mismatch: using a Makefile.in.in from
> gettext version 0.17 but the autoconf macros are from gettext version 0.19
>
> Regards,
> Peter
>
>
> And the defconfig used:
>
> BR2_INIT_NONE=y
> BR2_SYSTEM_BIN_SH_NONE=y
> # BR2_PACKAGE_BUSYBOX is not set
> BR2_PACKAGE_GSTREAMER1=y
> # BR2_PACKAGE_GSTREAMER1_PARSE is not set
> # BR2_PACKAGE_GSTREAMER1_GST_DEBUG is not set
> # BR2_PACKAGE_GSTREAMER1_PLUGIN_REGISTRY is not set
> # BR2_PACKAGE_GSTREAMER1_INSTALL_TOOLS is not set
> # BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIOCONVERT is not set
> BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIORATE=y
> BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIOTESTSRC=y
> BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_ENCODING=y
> BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_GIO=y
> # BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_PLAYBACK is not set
> # BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIORESAMPLE is not set
> BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_SUBPARSE=y
> # BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VOLUME is not set
> BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_TREMOR=y
> BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_OPUS=y
> BR2_PACKAGE_GST1_PLUGINS_BAD=y
> BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ACCURIP=y
> BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ADPCMDEC=y
> BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_AUDIOFXBAD=y
> BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_BAYER=y
> BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_CAMERABIN2=y
> BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DEBUGUTILS=y
> BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DVBSUBOVERLAY=y
> BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FACEOVERLAY=y
> BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_INTER=y
> BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_IVFPARSE=y
> BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEGPSMUX=y
> BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_PCAPPARSE=y
> BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_REMOVESILENCE=y
> BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_RTMP=y
> BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SPEED=y
> BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_BZ2=y
> BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DVB=y
> BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_HLS=y
> BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_LIBMMS=y
> BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MUSEPACK=y
> BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_OPENJPEG=y
> BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SHM=y
> BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_WEBP=y
> BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_WEBRTCDSP=y
> BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_X265=y
> BR2_PACKAGE_JPEG=y
>
<div dir="auto">Hey Peter,<div dir="auto"><br></div><div dir="auto">Do you have host-gettext explicitly enabled? Could you attach the output of the make command when rebuilding the package?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sep 10, 2017 09:59, &quot;Peter Seiderer&quot; &lt;<a href="mailto:ps.report@gmx.net">ps.report@gmx.net</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Aleksander,<br>
<br>
On Sat, 9 Sep 2017 22:26:19 +0200, Aleksander Morgado &lt;<a href="mailto:aleksander@aleksander.es">aleksander@aleksander.es</a>&gt; wrote:<br>
<br>
&gt; Hey Thomas and Peter,<br>
&gt;<br>
&gt; &gt; Changes v2 -&gt; v3:<br>
&gt; &gt;   - add _GETTEXTIZE (instead of <a href="http://Makefile.in.in" rel="noreferrer" target="_blank">Makefile.in.in</a> patch, suggested by Thomas Petazzoni)<br>
&gt; &gt;<br>
&gt; &gt; Changes v1 -&gt;v2:<br>
&gt; &gt;  - add _AUTORECONF (suggested by Peter Korsgaard)<br>
&gt;<br>
&gt; Re-running gettextize just to make autoreconf work is a bit overkill;<br>
&gt; gettextize is something that the package maintainer runs to get the<br>
&gt; i18n setup ready and among other things it may update gnulib imported<br>
&gt; files in unexpected ways. I&#39;d bet that letting just autopoint work as<br>
&gt; expected (as a step part of autoreconf) would be way more than enough<br>
&gt; here (i.e. no _GETTEXTIZE needed), but that step is currently disabled<br>
&gt; in buildroot by default since some years ago.<br>
&gt;<br>
&gt; See for reference this patch I sent last month, that makes autopoint<br>
&gt; work again during autoreconf:<br>
&gt; <a href="http://lists.busybox.net/pipermail/buildroot/2017-August/200941.html" rel="noreferrer" target="_blank">http://lists.busybox.net/<wbr>pipermail/buildroot/2017-<wbr>August/200941.html</a><br>
&gt;<br>
<br>
Sorry, did a quick test of your patch for the gst1-plugins-bad test<br>
case, did not work, I still get the following error message:<br>
<br>
  *** error: gettext infrastructure mismatch: using a <a href="http://Makefile.in.in" rel="noreferrer" target="_blank">Makefile.in.in</a> from gettext version 0.17 but the autoconf macros are from gettext version 0.19<br>
<br>
Regards,<br>
Peter<br>
<br>
<br>
And the defconfig used:<br>
<br>
BR2_INIT_NONE=y<br>
BR2_SYSTEM_BIN_SH_NONE=y<br>
# BR2_PACKAGE_BUSYBOX is not set<br>
BR2_PACKAGE_GSTREAMER1=y<br>
# BR2_PACKAGE_GSTREAMER1_PARSE is not set<br>
# BR2_PACKAGE_GSTREAMER1_GST_<wbr>DEBUG is not set<br>
# BR2_PACKAGE_GSTREAMER1_PLUGIN_<wbr>REGISTRY is not set<br>
# BR2_PACKAGE_GSTREAMER1_<wbr>INSTALL_TOOLS is not set<br>
# BR2_PACKAGE_GST1_PLUGINS_BASE_<wbr>PLUGIN_AUDIOCONVERT is not set<br>
BR2_PACKAGE_GST1_PLUGINS_BASE_<wbr>PLUGIN_AUDIORATE=y<br>
BR2_PACKAGE_GST1_PLUGINS_BASE_<wbr>PLUGIN_AUDIOTESTSRC=y<br>
BR2_PACKAGE_GST1_PLUGINS_BASE_<wbr>PLUGIN_ENCODING=y<br>
BR2_PACKAGE_GST1_PLUGINS_BASE_<wbr>PLUGIN_GIO=y<br>
# BR2_PACKAGE_GST1_PLUGINS_BASE_<wbr>PLUGIN_PLAYBACK is not set<br>
# BR2_PACKAGE_GST1_PLUGINS_BASE_<wbr>PLUGIN_AUDIORESAMPLE is not set<br>
BR2_PACKAGE_GST1_PLUGINS_BASE_<wbr>PLUGIN_SUBPARSE=y<br>
# BR2_PACKAGE_GST1_PLUGINS_BASE_<wbr>PLUGIN_VOLUME is not set<br>
BR2_PACKAGE_GST1_PLUGINS_BASE_<wbr>PLUGIN_TREMOR=y<br>
BR2_PACKAGE_GST1_PLUGINS_BASE_<wbr>PLUGIN_OPUS=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD_<wbr>PLUGIN_ACCURIP=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD_<wbr>PLUGIN_ADPCMDEC=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD_<wbr>PLUGIN_AUDIOFXBAD=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD_<wbr>PLUGIN_BAYER=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD_<wbr>PLUGIN_CAMERABIN2=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD_<wbr>PLUGIN_DEBUGUTILS=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD_<wbr>PLUGIN_DVBSUBOVERLAY=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD_<wbr>PLUGIN_FACEOVERLAY=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD_<wbr>PLUGIN_INTER=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD_<wbr>PLUGIN_IVFPARSE=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD_<wbr>PLUGIN_MPEGPSMUX=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD_<wbr>PLUGIN_PCAPPARSE=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD_<wbr>PLUGIN_REMOVESILENCE=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD_<wbr>PLUGIN_RTMP=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD_<wbr>PLUGIN_SPEED=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD_<wbr>PLUGIN_BZ2=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD_<wbr>PLUGIN_DVB=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD_<wbr>PLUGIN_HLS=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD_<wbr>PLUGIN_LIBMMS=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD_<wbr>PLUGIN_MUSEPACK=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD_<wbr>PLUGIN_OPENJPEG=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD_<wbr>PLUGIN_SHM=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD_<wbr>PLUGIN_WEBP=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD_<wbr>PLUGIN_WEBRTCDSP=y<br>
BR2_PACKAGE_GST1_PLUGINS_BAD_<wbr>PLUGIN_X265=y<br>
BR2_PACKAGE_JPEG=y<br>
</blockquote></div></div>
Peter Seiderer Sept. 10, 2017, 9:24 p.m. | #7
Hello Aleksander,

On Sun, 10 Sep 2017 21:25:06 +0200, Aleksander Morgado <aleksander@aleksander.es> wrote:

> Hey Peter,
> 
> Do you have host-gettext explicitly enabled? Could you attach the output of

Tested with your patch applied, my patch applied with the following changes:

--- a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk
+++ b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk
@@ -15,7 +15,7 @@ GST1_PLUGINS_BAD_LICENSE = LGPL-2.0+, LGPL-2.1+
 
 # patch 0001-openjpeg-Fix-build-against-openjpeg-2.2.patch touches configure.ac
 GST1_PLUGINS_BAD_AUTORECONF = YES
-GST1_PLUGINS_BAD_GETTEXTIZE = YES
+#GST1_PLUGINS_BAD_GETTEXTIZE = YES
 
 GST1_PLUGINS_BAD_CONF_OPTS = \
        --disable-examples \
@@ -65,7 +65,7 @@ GST1_PLUGINS_BAD_CONF_OPTS += \
        --disable-gtk3 \
        --disable-qt
 
-GST1_PLUGINS_BAD_DEPENDENCIES = gst1-plugins-base gstreamer1
+GST1_PLUGINS_BAD_DEPENDENCIES = host-gettext gst1-plugins-base gstreamer1
 
 ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
 # RPI has odd locations for several required headers.


> the make command when rebuilding the package?

Yes, see attachment make-gst1_plugins-bad.log.gz.

Regards,
Peter

> 
> On Sep 10, 2017 09:59, "Peter Seiderer" <ps.report@gmx.net> wrote:
> 
> > Hello Aleksander,
> >
> > On Sat, 9 Sep 2017 22:26:19 +0200, Aleksander Morgado <  
> > aleksander@aleksander.es> wrote:  
> >  
> > > Hey Thomas and Peter,
> > >  
> > > > Changes v2 -> v3:
> > > >   - add _GETTEXTIZE (instead of Makefile.in.in patch, suggested by  
> > Thomas Petazzoni)  
> > > >
> > > > Changes v1 ->v2:
> > > >  - add _AUTORECONF (suggested by Peter Korsgaard)  
> > >
> > > Re-running gettextize just to make autoreconf work is a bit overkill;
> > > gettextize is something that the package maintainer runs to get the
> > > i18n setup ready and among other things it may update gnulib imported
> > > files in unexpected ways. I'd bet that letting just autopoint work as
> > > expected (as a step part of autoreconf) would be way more than enough
> > > here (i.e. no _GETTEXTIZE needed), but that step is currently disabled
> > > in buildroot by default since some years ago.
> > >
> > > See for reference this patch I sent last month, that makes autopoint
> > > work again during autoreconf:
> > > http://lists.busybox.net/pipermail/buildroot/2017-August/200941.html
> > >  
> >
> > Sorry, did a quick test of your patch for the gst1-plugins-bad test
> > case, did not work, I still get the following error message:
> >
> >   *** error: gettext infrastructure mismatch: using a Makefile.in.in from
> > gettext version 0.17 but the autoconf macros are from gettext version 0.19
> >
> > Regards,
> > Peter
> >
> >
> > And the defconfig used:
> >
> > BR2_INIT_NONE=y
> > BR2_SYSTEM_BIN_SH_NONE=y
> > # BR2_PACKAGE_BUSYBOX is not set
> > BR2_PACKAGE_GSTREAMER1=y
> > # BR2_PACKAGE_GSTREAMER1_PARSE is not set
> > # BR2_PACKAGE_GSTREAMER1_GST_DEBUG is not set
> > # BR2_PACKAGE_GSTREAMER1_PLUGIN_REGISTRY is not set
> > # BR2_PACKAGE_GSTREAMER1_INSTALL_TOOLS is not set
> > # BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIOCONVERT is not set
> > BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIORATE=y
> > BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIOTESTSRC=y
> > BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_ENCODING=y
> > BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_GIO=y
> > # BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_PLAYBACK is not set
> > # BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIORESAMPLE is not set
> > BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_SUBPARSE=y
> > # BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VOLUME is not set
> > BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_TREMOR=y
> > BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_OPUS=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ACCURIP=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ADPCMDEC=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_AUDIOFXBAD=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_BAYER=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_CAMERABIN2=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DEBUGUTILS=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DVBSUBOVERLAY=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FACEOVERLAY=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_INTER=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_IVFPARSE=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEGPSMUX=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_PCAPPARSE=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_REMOVESILENCE=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_RTMP=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SPEED=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_BZ2=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DVB=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_HLS=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_LIBMMS=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MUSEPACK=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_OPENJPEG=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SHM=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_WEBP=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_WEBRTCDSP=y
> > BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_X265=y
> > BR2_PACKAGE_JPEG=y
> >
Aleksander Morgado Sept. 11, 2017, 10 a.m. | #8
>> Do you have host-gettext explicitly enabled? Could you attach the output of
>
> Tested with your patch applied, my patch applied with the following changes:
>
> --- a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk
> +++ b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk
> @@ -15,7 +15,7 @@ GST1_PLUGINS_BAD_LICENSE = LGPL-2.0+, LGPL-2.1+
>
>  # patch 0001-openjpeg-Fix-build-against-openjpeg-2.2.patch touches configure.ac
>  GST1_PLUGINS_BAD_AUTORECONF = YES
> -GST1_PLUGINS_BAD_GETTEXTIZE = YES
> +#GST1_PLUGINS_BAD_GETTEXTIZE = YES
>
>  GST1_PLUGINS_BAD_CONF_OPTS = \
>         --disable-examples \
> @@ -65,7 +65,7 @@ GST1_PLUGINS_BAD_CONF_OPTS += \
>         --disable-gtk3 \
>         --disable-qt
>
> -GST1_PLUGINS_BAD_DEPENDENCIES = gst1-plugins-base gstreamer1
> +GST1_PLUGINS_BAD_DEPENDENCIES = host-gettext gst1-plugins-base gstreamer1
>
>  ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
>  # RPI has odd locations for several required headers.
>
>
>> the make command when rebuilding the package?
>
> Yes, see attachment make-gst1_plugins-bad.log.gz.
>

I'll try to reproduce this issue myself once I find some free time,
and will let you know what I find. In the meantime, just go on and
merge the latest patch if it's ok, and sorry for hijacking the thread
with the gettext vs autopoint issue :)
Peter Korsgaard Sept. 24, 2017, 7:56 a.m. | #9
>>>>> "Peter" == Peter Seiderer <ps.report@gmx.net> writes:

 > Add upstream patch to fix build against openjpeg 2.2.
 > Fixes [1]:

 >   gstopenjpeg.h:42:37: fatal error: openjpeg-2.1/openjpeg.h: No such file or directory

 > [1] http://autobuild.buildroot.net/results/90f1f7838f08e3a557be27470406d4d84dbcc828

 > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
 > ---
 > Changes v2 -> v3:
 >   - add _GETTEXTIZE (instead of Makefile.in.in patch, suggested by Thomas Petazzoni)

 > Changes v1 ->v2:
 >  - add _AUTORECONF (suggested by Peter Korsgaard)

Committed, thanks.
Peter Korsgaard Sept. 24, 2017, 2:47 p.m. | #10
>>>>> "Peter" == Peter Seiderer <ps.report@gmx.net> writes:

 > Add upstream patch to fix build against openjpeg 2.2.
 > Fixes [1]:

 >   gstopenjpeg.h:42:37: fatal error: openjpeg-2.1/openjpeg.h: No such file or directory

 > [1] http://autobuild.buildroot.net/results/90f1f7838f08e3a557be27470406d4d84dbcc828

 > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
 > ---
 > Changes v2 -> v3:
 >   - add _GETTEXTIZE (instead of Makefile.in.in patch, suggested by Thomas Petazzoni)

 > Changes v1 ->v2:
 >  - add _AUTORECONF (suggested by Peter Korsgaard)

Committed to 2017.02.x after dropping the meson changes, thanks.

Patch

diff --git a/package/gstreamer1/gst1-plugins-bad/0001-openjpeg-Fix-build-against-openjpeg-2.2.patch b/package/gstreamer1/gst1-plugins-bad/0001-openjpeg-Fix-build-against-openjpeg-2.2.patch
new file mode 100644
index 0000000000..d9268bc9b6
--- /dev/null
+++ b/package/gstreamer1/gst1-plugins-bad/0001-openjpeg-Fix-build-against-openjpeg-2.2.patch
@@ -0,0 +1,93 @@ 
+From daaf649bda7231fd0d760802232a36ba62a4ea2d Mon Sep 17 00:00:00 2001
+From: Clemens Lang <cal@macports.org>
+Date: Sun, 13 Aug 2017 21:17:18 +0200
+Subject: [PATCH] openjpeg: Fix build against openjpeg 2.2
+
+OpenJPEG 2.2 has some API changes and thus ships its headers in a new
+include path. Add a configure check (to both meson and autoconf) to
+detect the newer version of OpenJPEG and add conditional includes.
+
+Fix the autoconf test for OpenJPEG 2.1, which checked for HAVE_OPENJPEG,
+which was always set even for 2.0.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=786250
+
+Upstream: https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/patch/?id=15f24fef53a955c7c76fc966302cb0453732e657
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ configure.ac               |  7 ++++++-
+ ext/openjpeg/gstopenjpeg.h |  4 +++-
+ ext/openjpeg/meson.build   | 21 +++++++++++++--------
+ 3 files changed, 22 insertions(+), 10 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 30e26b8..c4f08c7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2813,8 +2813,13 @@ AG_GST_CHECK_FEATURE(OPENJPEG, [openjpeg library], openjpeg, [
+   if test x"$HAVE_OPENJPEG" = x"yes"; then
+     dnl minor API changes in v2.1
+     AG_GST_PKG_CHECK_MODULES(OPENJPEG_2_1, libopenjp2 >= 2.1)
+-    if test x"$HAVE_OPENJPEG" = x"yes"; then
++    if test x"$HAVE_OPENJPEG_2_1" = x"yes"; then
+       AC_DEFINE([HAVE_OPENJPEG_2_1], 1, [Define if OpenJPEG 2.1 is used])
++        dnl include paths changed for v2.2
++        AG_GST_PKG_CHECK_MODULES(OPENJPEG_2_2, libopenjp2 >= 2.2)
++        if test x"$HAVE_OPENJPEG_2_2" = x"yes"; then
++          AC_DEFINE([HAVE_OPENJPEG_2_2], 1, [Define if OpenJPEG 2.2 is used])
++        fi
+     fi
+   else
+     # Fallback to v1.5
+diff --git a/ext/openjpeg/gstopenjpeg.h b/ext/openjpeg/gstopenjpeg.h
+index 03ce52e..52410a4 100644
+--- a/ext/openjpeg/gstopenjpeg.h
++++ b/ext/openjpeg/gstopenjpeg.h
+@@ -38,7 +38,9 @@
+ #define OPJ_CPRL CPRL
+ #else
+ #include <stdio.h>
+-# ifdef HAVE_OPENJPEG_2_1
++# if defined(HAVE_OPENJPEG_2_2)
++#  include <openjpeg-2.2/openjpeg.h>
++# elif defined(HAVE_OPENJPEG_2_1)
+ #  include <openjpeg-2.1/openjpeg.h>
+ # else
+ #  include <openjpeg-2.0/openjpeg.h>
+diff --git a/ext/openjpeg/meson.build b/ext/openjpeg/meson.build
+index d60974c..e9c416c 100644
+--- a/ext/openjpeg/meson.build
++++ b/ext/openjpeg/meson.build
+@@ -6,16 +6,21 @@ openjpeg_sources = [
+ 
+ openjpeg_cargs = []
+ 
+-# Check for 2.1, then 2.0
+-openjpeg_dep = dependency('libopenjp2', version : '>=2.1', required : false)
++# Check for 2.2, 2.1, then 2.0
++openjpeg_dep = dependency('libopenjp2', version : '>=2.2', required : false)
+ if openjpeg_dep.found()
+-  openjpeg_cargs += ['-DHAVE_OPENJPEG_2_1']
++  openjpeg_cargs += ['-DHAVE_OPENJPEG_2_2']
+ else
+-  openjpeg_dep = dependency('libopenjp2', required : false)
+-  # Fallback to 1.5
+-  if not openjpeg_dep.found()
+-    openjpeg_dep = dependency('libopenjpeg1', required : false)
+-    openjpeg_cargs += ['-DHAVE_OPENJPEG_1']
++  openjpeg_dep = dependency('libopenjp2', version : '>=2.1', required : false)
++  if openjpeg_dep.found()
++    openjpeg_cargs += ['-DHAVE_OPENJPEG_2_1']
++  else
++    openjpeg_dep = dependency('libopenjp2', required : false)
++    # Fallback to 1.5
++    if not openjpeg_dep.found()
++      openjpeg_dep = dependency('libopenjpeg1', required : false)
++      openjpeg_cargs += ['-DHAVE_OPENJPEG_1']
++    endif
+   endif
+ endif
+ 
+-- 
+2.12.3
+
diff --git a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk
index 7a32689b85..8b707d5eb9 100644
--- a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk
+++ b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk
@@ -13,6 +13,10 @@  GST1_PLUGINS_BAD_LICENSE_FILES = COPYING COPYING.LIB
 # enabled.
 GST1_PLUGINS_BAD_LICENSE = LGPL-2.0+, LGPL-2.1+
 
+# patch 0001-openjpeg-Fix-build-against-openjpeg-2.2.patch touches configure.ac
+GST1_PLUGINS_BAD_AUTORECONF = YES
+GST1_PLUGINS_BAD_GETTEXTIZE = YES
+
 GST1_PLUGINS_BAD_CONF_OPTS = \
 	--disable-examples \
 	--disable-valgrind \