Skip to contentSkip to conversation

package/gst1-plugins-base: fix build with gcc 4.8

PATCH New Fabrice Fontaine 3 participants 3 messages Dec 14, 2020 – Dec 30, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/gst1-plugins-base: fix build with gcc 4.8

Fix build of gst1-plugins-base in version 1.18.2 with gcc 4.8

Fixes:
- http://autobuild.buildroot.org/results/91f8a78a012fb30f323d82d1d7094f28d018a768

---
 ...eo-gstvideoaggregator.c-fix-build-wi.patch | 45 +++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 package/gstreamer1/gst1-plugins-base/0001-gst-libs-gst-video-gstvideoaggregator.c-fix-build-wi.patch
package/gstreamer1/gst1-plugins-base/0001-gst-libs-gst-video-gstvideoaggregator.c-fix-build-wi.patch new file +45 -0
new file mode 100644
index 0000000000..87cd6493f5
@@ -0,0 +1,45 @@
+From 012ca1bcd234ee02f576dd58b1f09baba18b89b0 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Mon, 14 Dec 2020 07:42:55 +0100
+Subject: [PATCH] gst-libs/gst/video/gstvideoaggregator.c: fix build with gcc
+ 4.8
+
+Fix the following build failure with gcc 4.8 which has been added with
+https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/commit/d268c193ad39fb970351ed62898be806ebd0a71e:
+
+../gst-libs/gst/video/gstvideoaggregator.c: In function 'gst_video_aggregator_init':
+../gst-libs/gst/video/gstvideoaggregator.c:2762:3: error: 'for' loop initial declarations are only allowed in C99 mode
+   for (gint i = 0; i < gst_caps_get_size (src_template); i++) {
+   ^
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Upstream status:
+https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/974]
+---
+ gst-libs/gst/video/gstvideoaggregator.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/gst-libs/gst/video/gstvideoaggregator.c b/gst-libs/gst/video/gstvideoaggregator.c
+index 2e3d813be..04dad6563 100644
+--- a/gst-libs/gst/video/gstvideoaggregator.c
++++ b/gst-libs/gst/video/gstvideoaggregator.c
+@@ -2786,6 +2786,7 @@ gst_video_aggregator_init (GstVideoAggregator * vagg,
+ {
+   GstCaps *src_template;
+   GstPadTemplate *pad_template;
++  gint i;
+ 
+   vagg->priv = gst_video_aggregator_get_instance_private (vagg);
+   vagg->priv->current_caps = NULL;
+@@ -2800,7 +2801,7 @@ gst_video_aggregator_init (GstVideoAggregator * vagg,
+   pad_template =
+       gst_element_class_get_pad_template (GST_ELEMENT_CLASS (klass), "src");
+   src_template = gst_pad_template_get_caps (pad_template);
+-  for (gint i = 0; i < gst_caps_get_size (src_template); i++) {
++  for (i = 0; i < gst_caps_get_size (src_template); i++) {
+     const GValue *v =
+         gst_structure_get_value (gst_caps_get_structure (src_template, i),
+         "format");
+-- 
+2.29.2
+
Signature · 1 line
2.29.2
#1 lore raw

PATCH 1/1 package/gst1-plugins-base: fix build with gcc 4.8

Hello Fabrice,

Quoted 24 lines · Fabrice Fontaine

Fix build of gst1-plugins-base in version 1.18.2 with gcc 4.8

Fixes:
- http://autobuild.buildroot.org/results/91f8a78a012fb30f323d82d1d7094f28d018a768

---
 ...eo-gstvideoaggregator.c-fix-build-wi.patch | 45 +++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 package/gstreamer1/gst1-plugins-base/0001-gst-libs-gst-video-gstvideoaggregator.c-fix-build-wi.patch
package/gstreamer1/gst1-plugins-base/0001-gst-libs-gst-video-gstvideoaggregator.c-fix-build-wi.patch new file +7 -0
new file mode 100644
index 0000000000..87cd6493f5
@@ -0,0 +1,45 @@
+From 012ca1bcd234ee02f576dd58b1f09baba18b89b0 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Mon, 14 Dec 2020 07:42:55 +0100
+Subject: [PATCH] gst-libs/gst/video/gstvideoaggregator.c: fix build with gcc
+ 4.8
+
+Fix the following build failure with gcc 4.8 which has been added with

package/gstreamer1/gst1-plugins-base/0001-gst-libs-gst-video-gstvideoaggregator.c-fix-build-wi.patch line 17

Quoted 10 lines
package/gstreamer1/gst1-plugins-base/0001-gst-libs-gst-video-gstvideoaggregator.c-fix-build-wi.patch new file +10 -0
+https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/commit/d268c193ad39fb970351ed62898be806ebd0a71e:
+
+../gst-libs/gst/video/gstvideoaggregator.c: In function 'gst_video_aggregator_init':
+../gst-libs/gst/video/gstvideoaggregator.c:2762:3: error: 'for' loop initial declarations are only allowed in C99 mode
+   for (gint i = 0; i < gst_caps_get_size (src_template); i++) {
+   ^
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Upstream status:
+https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/974]

As the patch is accepted upstream ([1])

Regards,
Peter

[1] https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/commit/d86cf6314f8f178c59600f55321ce73d4ca95d97

Quoted 28 lines
package/gstreamer1/gst1-plugins-base/0001-gst-libs-gst-video-gstvideoaggregator.c-fix-build-wi.patch new file +28 -0
+---
+ gst-libs/gst/video/gstvideoaggregator.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/gst-libs/gst/video/gstvideoaggregator.c b/gst-libs/gst/video/gstvideoaggregator.c
+index 2e3d813be..04dad6563 100644
+--- a/gst-libs/gst/video/gstvideoaggregator.c
++++ b/gst-libs/gst/video/gstvideoaggregator.c
+@@ -2786,6 +2786,7 @@ gst_video_aggregator_init (GstVideoAggregator * vagg,
+ {
+   GstCaps *src_template;
+   GstPadTemplate *pad_template;
++  gint i;
+
+   vagg->priv = gst_video_aggregator_get_instance_private (vagg);
+   vagg->priv->current_caps = NULL;
+@@ -2800,7 +2801,7 @@ gst_video_aggregator_init (GstVideoAggregator * vagg,
+   pad_template =
+       gst_element_class_get_pad_template (GST_ELEMENT_CLASS (klass), "src");
+   src_template = gst_pad_template_get_caps (pad_template);
+-  for (gint i = 0; i < gst_caps_get_size (src_template); i++) {
++  for (i = 0; i < gst_caps_get_size (src_template); i++) {
+     const GValue *v =
+         gst_structure_get_value (gst_caps_get_structure (src_template, i),
+         "format");
+--
+2.29.2
+
#2 lore raw

PATCH 1/1 package/gst1-plugins-base: fix build with gcc 4.8

In reply to Fabrice Fontaine
Quoted 10 lines · On Mon, 14 Dec 2020 08:02:32 +0100 Fabrice Fontaine…

Fix build of gst1-plugins-base in version 1.18.2 with gcc 4.8

Fixes:
- http://autobuild.buildroot.org/results/91f8a78a012fb30f323d82d1d7094f28d018a768

---
 ...eo-gstvideoaggregator.c-fix-build-wi.patch | 45 +++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 package/gstreamer1/gst1-plugins-base/0001-gst-libs-gst-video-gstvideoaggregator.c-fix-build-wi.patch

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com