All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/gstreamer1/gst1-plugins-bad: dvbsubenc needs gcc 4.9
@ 2020-11-09 21:38 Fabrice Fontaine
  2020-11-10  8:54 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2020-11-09 21:38 UTC (permalink / raw)
  To: buildroot

dvbsubenc fails to build with gcc 4.8 due to restrict keyword and for
loop declarations:

../gst/dvbsubenc/libimagequant/blur.c:10:46: error: expected ';', ',' or ')' before 'src'
 transposing_1d_blur (unsigned char *restrict src, unsigned char *restrict dst,
                                              ^
../gst/dvbsubenc/libimagequant/blur.c: In function 'liq_min3':
../gst/dvbsubenc/libimagequant/blur.c:101:5: error: 'for' loop initial declarations are only allowed in C99 mode
     for (unsigned int i = 0; i < width - 1; i++) {
     ^

Fixes:
 - http://autobuild.buildroot.org/results/183e876d63340b5c204f47a4653cbfebb0523277

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/gstreamer1/gst1-plugins-bad/Config.in | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/gstreamer1/gst1-plugins-bad/Config.in b/package/gstreamer1/gst1-plugins-bad/Config.in
index 191820df1d..87a047b779 100644
--- a/package/gstreamer1/gst1-plugins-bad/Config.in
+++ b/package/gstreamer1/gst1-plugins-bad/Config.in
@@ -89,9 +89,13 @@ config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DEBUGUTILS
 
 config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DVBSUBENC
 	bool "dvbsubenc"
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 	help
 	  DVB subpicture encoding support
 
+comment "dvbsubenc plugin needs a toolchain w/ gcc >= 4.9"
+	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+
 config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DVBSUBOVERLAY
 	bool "dvbsuboverlay"
 	help
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH 1/1] package/gstreamer1/gst1-plugins-bad: dvbsubenc needs gcc 4.9
  2020-11-09 21:38 [Buildroot] [PATCH 1/1] package/gstreamer1/gst1-plugins-bad: dvbsubenc needs gcc 4.9 Fabrice Fontaine
@ 2020-11-10  8:54 ` Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2020-11-10  8:54 UTC (permalink / raw)
  To: buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > dvbsubenc fails to build with gcc 4.8 due to restrict keyword and for
 > loop declarations:

 > ../gst/dvbsubenc/libimagequant/blur.c:10:46: error: expected ';', ',' or ')' before 'src'
 >  transposing_1d_blur (unsigned char *restrict src, unsigned char *restrict dst,
 >                                               ^
 > ../gst/dvbsubenc/libimagequant/blur.c: In function 'liq_min3':
 > ../gst/dvbsubenc/libimagequant/blur.c:101:5: error: 'for' loop initial declarations are only allowed in C99 mode
 >      for (unsigned int i = 0; i < width - 1; i++) {
 >      ^

I have instead pushed a commit to pass -std=c99 in CFLAGS. The festival
plugin also had issues with this toolchain because of the old glibc
version, so I pushed another commit to fix that as well.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-10  8:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-09 21:38 [Buildroot] [PATCH 1/1] package/gstreamer1/gst1-plugins-bad: dvbsubenc needs gcc 4.9 Fabrice Fontaine
2020-11-10  8:54 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.