Skip to contentSkip to conversation

gstreamer1.0-plugins-good: backport qmlglsink EGL build fix

PATCH In review Gowtham Tammana 2 participants 3 messages Mar 12, 2021 – Mar 16, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gstreamer1.0-plugins-good: backport qmlglsink EGL build fix

Backport qmlglsink build fix for EGL platform with no X11 headers.

---
 ...ild-on-EGL-platform-without-X11-head.patch | 36 +++++++++++++++++++
 .../gstreamer1.0-plugins-good_1.16.%.bbappend |  3 +-
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qmlglsink-fix-build-on-EGL-platform-without-X11-head.patch
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qmlglsink-fix-build-on-EGL-platform-without-X11-head.patch new file +36 -0
new file mode 100644
index 00000000..79db0e27
@@ -0,0 +1,36 @@
+From 85229adbddcd8e7cacd5ebd9467c834352a882d0 Mon Sep 17 00:00:00 2001
+From: Philipp Zabel <[email protected]>
+Date: Tue, 3 Dec 2019 11:36:07 +0100
+Subject: [PATCH] qmlglsink: fix build on EGL platform without X11 headers
+
+If Mesa is built without X11 headers, building against Mesa EGL headers
+requires a dependency on egl.pc, to define MESA_EGL_NO_X11_HEADERS.
+This fixes a build error when compiling ext/qt/gstqtglutility.cc:
+
+  In file included from /usr/include/EGL/egl.h:39,
+                   from /usr/include/gstreamer-1.0/gst/gl/egl/gstegl.h:44,
+                   from ../gst-plugins-good-1.16.1/ext/qt/gstqtglutility.cc:43:
+  /usr/include/EGL/eglplatform.h:124:10: fatal error: X11/Xlib.h: No such file or directory
+
+Upstream-Status: Backport [c47a585052fba6830a2cddd8caa18e2305596ed0]
+
+Signed-off-by: Gowtham Tammana <[email protected]>
+---
+ ext/qt/meson.build | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/ext/qt/meson.build b/ext/qt/meson.build
+index 5f040c844..43ddc6092 100644
+--- a/ext/qt/meson.build
++++ b/ext/qt/meson.build
+@@ -89,6 +89,8 @@ if have_cxx and build_gstgl
+     if gst_gl_have_platform_egl
+       # Embedded linux (e.g. i.MX6) with or without windowing support
+       qt_defines += ['-DHAVE_QT_EGLFS']
++      egl_dep = dependency('egl', required : false)
++      optional_deps += egl_dep
+       have_qt_windowing = true
+       if have_qpa_include
+         # Wayland windowing
+--
+2.17.1
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.%.bbappend +2 -1
index 004a9968..e2ddbc27 100644
@@ -7,6 +7,7 @@ SRC_URI += " \
     file://0002-v4l2src-Use-generic-dmabuf-import-in-v4l2src.patch \
     file://0001-v4l2object-Update-formats-table-to-include-YUV422-mu.patch \
     file://0001-v4l2src-Check-for-drm-memory-support-in-try_import.patch \
+    file://0001-qmlglsink-fix-build-on-EGL-platform-without-X11-head.patch \
 "
 
-PR_append = ".arago2"
+PR_append = ".arago3"
Signature · 1 line
2.29.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 18 lines · Gowtham Tammana

Backport qmlglsink build fix for EGL platform with no X11 headers.

---
 ...ild-on-EGL-platform-without-X11-head.patch | 36 +++++++++++++++++++
 .../gstreamer1.0-plugins-good_1.16.%.bbappend |  3 +-
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qmlglsink-fix-build-on-EGL-platform-without-X11-head.patch
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qmlglsink-fix-build-on-EGL-platform-without-X11-head.patch new file +3 -0
new file mode 100644
index 00000000..79db0e27
@@ -0,0 +1,36 @@
+From 85229adbddcd8e7cacd5ebd9467c834352a882d0 Mon Sep 17 00:00:00 2001
+From: Philipp Zabel <[email protected]>
+Date: Tue, 3 Dec 2019 11:36:07 +0100

meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qmlglsink-fix-build-on-EGL-platform-without-X11-head.patch line 13

Quoted 10 lines
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qmlglsink-fix-build-on-EGL-platform-without-X11-head.patch new file +10 -0
+Subject: [PATCH] qmlglsink: fix build on EGL platform without X11 headers
+
+If Mesa is built without X11 headers, building against Mesa EGL headers
+requires a dependency on egl.pc, to define MESA_EGL_NO_X11_HEADERS.
+This fixes a build error when compiling ext/qt/gstqtglutility.cc:
+
+  In file included from /usr/include/EGL/egl.h:39,
+                   from /usr/include/gstreamer-1.0/gst/gl/egl/gstegl.h:44,
+                   from ../gst-plugins-good-1.16.1/ext/qt/gstqtglutility.cc:43:
+  /usr/include/EGL/eglplatform.h:124:10: fatal error: X11/Xlib.h: No such file or directory

Thanks for the backport! We've seen this issue in the past in other places too, e.g.:

https://github.com/meta-qt5/meta-qt5/commit/41666ddba78ff1f094310589489e0a070e0094d8
http://arago-project.org/git/meta-arago.git?p=meta-arago.git;a=commitdiff;h=1e83ebf61bd22ca8ad04d5538db044d81330df2c

meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qmlglsink-fix-build-on-EGL-platform-without-X11-head.patch line 15

Quoted 1 line
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qmlglsink-fix-build-on-EGL-platform-without-X11-head.patch new file +1 -0
+Upstream-Status: Backport [c47a585052fba6830a2cddd8caa18e2305596ed0]

Special thanks for Upstream-Status! :)

meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qmlglsink-fix-build-on-EGL-platform-without-X11-head.patch line 17

Quoted 1 line
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qmlglsink-fix-build-on-EGL-platform-without-X11-head.patch new file +1 -0
+Signed-off-by: Gowtham Tammana <[email protected]>
Quoted 34 lines
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qmlglsink-fix-build-on-EGL-platform-without-X11-head.patch new file +19 -0
+---
+ ext/qt/meson.build | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/ext/qt/meson.build b/ext/qt/meson.build
+index 5f040c844..43ddc6092 100644
+--- a/ext/qt/meson.build
++++ b/ext/qt/meson.build
+@@ -89,6 +89,8 @@ if have_cxx and build_gstgl
+     if gst_gl_have_platform_egl
+       # Embedded linux (e.g. i.MX6) with or without windowing support
+       qt_defines += ['-DHAVE_QT_EGLFS']
++      egl_dep = dependency('egl', required : false)
++      optional_deps += egl_dep
+       have_qt_windowing = true
+       if have_qpa_include
+         # Wayland windowing
+--
+2.17.1
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.%.bbappend +2 -1
index 004a9968..e2ddbc27 100644
@@ -7,6 +7,7 @@ SRC_URI += " \
     file://0002-v4l2src-Use-generic-dmabuf-import-in-v4l2src.patch \
     file://0001-v4l2object-Update-formats-table-to-include-YUV422-mu.patch \
     file://0001-v4l2src-Check-for-drm-memory-support-in-try_import.patch \
+    file://0001-qmlglsink-fix-build-on-EGL-platform-without-X11-head.patch \
 "
 
-PR_append = ".arago2"
+PR_append = ".arago3"
Signature · 1 line
2.29.0
Signature · 4 lines
Regards,
Denys Dmytriyenko <[email protected]>
PGP: 0x420902729A92C964 - https://denix.org/0x420902729A92C964
Fingerprint: 25FC E4A5 8A72 2F69 1186  6D76 4209 0272 9A92 C964
#2 lore raw
Quoted 47 lines

-----Original Message-----
From: Denys Dmytriyenko <[email protected]>
Sent: Friday, March 12, 2021 4:51 PM
To: Tammana, Gowtham <[email protected]>
Cc: [email protected]
Subject: [EXTERNAL] Re: [meta-arago] [PATCH] gstreamer1.0-plugins-good:
backport qmlglsink EGL build fix

Quoted 8 lines · Gowtham Tammana

Backport qmlglsink build fix for EGL platform with no X11 headers.

---
 ...ild-on-EGL-platform-without-X11-head.patch | 36 +++++++++++++++++++
 .../gstreamer1.0-plugins-good_1.16.%.bbappend |  3 +-
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 meta-arago-extras/recipes-

multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qmlglsink-fix-build-on- EGL-platform-without-X11-head.patch

Review

Quoted 2 lines
(quoted diff) +0 -0

plugins-good/0001-qmlglsink-fix-build-on-EGL-platform-without-X11- head.patch b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0- plugins-good/0001-qmlglsink-fix-build-on-EGL-platform-without-X11- head.patch

meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-

Quoted 4 lines

new file mode 100644
index 00000000..79db0e27

meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0- new file +0 -0

plugins-good/0001-qmlglsink-fix-build-on-EGL-platform-without-X11- head.patch

meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0- line 4

Quoted 5 lines
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0- new file +4 -0
@@ -0,0 +1,36 @@
+From 85229adbddcd8e7cacd5ebd9467c834352a882d0 Mon Sep 17 00:00:00 2001
+From: Philipp Zabel <[email protected]>
+Date: Tue, 3 Dec 2019 11:36:07 +0100
+Subject: [PATCH] qmlglsink: fix build on EGL platform without X11

headers

meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0- line 11

Quoted 7 lines
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0- new file +7 -0
+
+If Mesa is built without X11 headers, building against Mesa EGL headers
+requires a dependency on egl.pc, to define MESA_EGL_NO_X11_HEADERS.
+This fixes a build error when compiling ext/qt/gstqtglutility.cc:
+
+  In file included from /usr/include/EGL/egl.h:39,
+                   from /usr/include/gstreamer-

1.0/gst/gl/egl/gstegl.h:44,

Quoted 7 lines

meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0- line 12

Quoted 1 line
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0- new file +1 -0
+                   from ../gst-plugins-good-

1.16.1/ext/qt/gstqtglutility.cc:43:

meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0- line 13

Quoted 1 line
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0- new file +1 -0
+  /usr/include/EGL/eglplatform.h:124:10: fatal error: X11/Xlib.h: No

such file or directory

Thanks for the backport! We've seen this issue in the past in other places too, e.g.:

That is correct, earlier we were explicitly adding the #define in the headers as a quick workaround. Got around this again as part of migration, and noticed the dependency miss and the patch in master.

Quoted 4 lines

https://github.com/meta-qt5/meta-
qt5/commit/41666ddba78ff1f094310589489e0a070e0094d8
http://arago-project.org/git/meta-arago.git?p=meta-
arago.git;a=commitdiff;h=1e83ebf61bd22ca8ad04d5538db044d81330df2c

Thanks for these links, will submit patches to revert these as followup.

Quoted 9 lines

meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0- line 14

Quoted 2 lines
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0- new file +1 -0
+Upstream-Status: Backport [c47a585052fba6830a2cddd8caa18e2305596ed0]

Special thanks for Upstream-Status! :)

meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0- line 15

Quoted 1 line
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0- new file +1 -0
+Signed-off-by: Gowtham Tammana <[email protected]>

Thanks for the review.
Gowtham

Quoted 48 lines

Review

Quoted 21 lines
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0- new file +19 -0
+---
+ ext/qt/meson.build | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/ext/qt/meson.build b/ext/qt/meson.build
+index 5f040c844..43ddc6092 100644
+--- a/ext/qt/meson.build
++++ b/ext/qt/meson.build
+@@ -89,6 +89,8 @@ if have_cxx and build_gstgl
+     if gst_gl_have_platform_egl
+       # Embedded linux (e.g. i.MX6) with or without windowing support
+       qt_defines += ['-DHAVE_QT_EGLFS']
++      egl_dep = dependency('egl', required : false)
++      optional_deps += egl_dep
+       have_qt_windowing = true
+       if have_qpa_include
+         # Wayland windowing
+--
+2.17.1
(quoted diff) +0 -0

plugins-good_1.16.%.bbappend b/meta-arago-extras/recipes- multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.%.bbappend

Quoted 2 lines

index 004a9968..e2ddbc27 100644
--- a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-

plugins-good_1.16.%.bbappend

Quoted 1 line

+++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-

plugins-good_1.16.%.bbappend

Review SRC_URI += " \ · line 8

Quoted 3 lines
(quoted diff) +0 -0
@@ -7,6 +7,7 @@ SRC_URI += " \
     file://0002-v4l2src-Use-generic-dmabuf-import-in-v4l2src.patch \
     file://0001-v4l2object-Update-formats-table-to-include-YUV422-

mu.patch \

Review SRC_URI += " \ · line 9

Quoted 1 line
(quoted diff) +0 -0
     file://0001-v4l2src-Check-for-drm-memory-support-in-try_import.patch

\

Review SRC_URI += " \ · line 10

Quoted 1 line
(quoted diff) +1 -0
+    file://0001-qmlglsink-fix-build-on-EGL-platform-without-X11-

head.patch \

Quoted 6 lines
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.%.bbappend +1 -2
 "
 
-PR_append = ".arago2"
+PR_append = ".arago3"
--

2.29.0

--
Regards,
Denys Dmytriyenko <[email protected]>
PGP: 0x420902729A92C964 - https://denix.org/0x420902729A92C964
Fingerprint: 25FC E4A5 8A72 2F69 1186 6D76 4209 0272 9A92 C964