From patchwork Wed Sep 28 14:10:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Salvini X-Patchwork-Id: 13345 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72910C32771 for ; Wed, 28 Sep 2022 14:11:49 +0000 (UTC) Received: from mail.koansoftware.com (mail.koansoftware.com [172.104.12.216]) by mx.groups.io with SMTP id smtpd.web12.8456.1664374304937475565 for ; Wed, 28 Sep 2022 07:11:45 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: koansoftware.com, ip: 172.104.12.216, mailfrom: m.salvini@koansoftware.com) Received: from localhost (localhost [127.0.0.1]) by mail.koansoftware.com (Postfix) with ESMTP id 9EE2B3E401; Wed, 28 Sep 2022 16:11:43 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail Received: from mail.koansoftware.com ([127.0.0.1]) by localhost (mail.koansoftware.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qj0Eb-ycIZXp; Wed, 28 Sep 2022 16:11:42 +0200 (CEST) From: Mauro Salvini To: meta-freescale@lists.yoctoproject.org Cc: Mauro Salvini Subject: [PATCH] qt4-imx-support: fix build for imxgpu2d SOCs Date: Wed, 28 Sep 2022 16:10:47 +0200 Message-Id: <20220928141047.31598-1-m.salvini@koansoftware.com> X-Mailer: git-send-email 2.17.1 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 28 Sep 2022 14:11:49 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-freescale/message/24860 Before this change, when imxgpu2d is selected, the qt4 do_configure fails with the following error: | EGL (EGL/egl.h) auto-detection... () | compiling egl.cpp ... | /home/wrk/yocto/build-qt4/tmp/work/imx8mmevk-fslc-linux/qt4-embedded/4.8.7-r0/recipe-sysroot/usr/include/EGL/eglplatform.h:150:10: fatal error: X11/Xlib.h: No such file or directory | 150 | #include | | ^~~~~~~~~~~~ | compilation terminated. | Makefile:178: recipe for target 'egl.o' failed | make: *** [egl.o] Error 1 | EGL (EGL/egl.h) disabled. | EGL (GLES/egl.h) auto-detection... () ... | /home/wrk/yocto/build-qt4/tmp/work/imx8mmevk-fslc-linux/qt4-embedded/4.8.7-r0/recipe-sysroot/usr/include/EGL/eglplatform.h:150:10: fatal error: X11/Xlib.h: No such file or directory | 150 | #include | | ^~~~~~~~~~~~ | compilation terminated. | Makefile:178: recipe for target 'egl4gles1.o' failed | make: *** [egl4gles1.o] Error 1 | EGL (GLES/egl.h) disabled. | The EGL functionality test failed! This is because the -DLINUX=1 and -DEGL_API_FB=1 flags added to QT_CONFIG_FLAGS are not pushed down during these configuration tests. This commit adds these two flags directly to the related .pro files in Qt4 sources. Since it's been a long time that meta-qt4 is not updated anymore, the patch can be backported to LTS releases. Signed-off-by: Mauro Salvini --- .../qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc | 2 ++ .../qt4/egl-pro-add-defines-to-compile-with-viv-fb.patch | 9 +++++++++ ...gl4gles1-pro-add-defines-to-compile-with-viv-fb.patch | 9 +++++++++ 3 files changed, 20 insertions(+) create mode 100644 dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4/egl-pro-add-defines-to-compile-with-viv-fb.patch create mode 100644 dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4/egl4gles1-pro-add-defines-to-compile-with-viv-fb.patch diff --git a/dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc b/dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc index 03e09e57..ac009a3a 100644 --- a/dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc +++ b/dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc @@ -12,6 +12,8 @@ SRC_URI:append:imxgpu2d += " \ file://0001-Add-support-for-i.MX-codecs-to-phonon.patch \ file://0002-i.MX-video-renderer-Allow-v4l-device-from-environmen.patch \ file://0003-i.MX6-force-egl-visual-ID-33.patch \ + file://egl-pro-add-defines-to-compile-with-viv-fb.patch \ + file://egl4gles1-pro-add-defines-to-compile-with-viv-fb.patch \ " DEPENDS:append:imxgpu2d = " virtual/kernel virtual/libgles2" diff --git a/dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4/egl-pro-add-defines-to-compile-with-viv-fb.patch b/dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4/egl-pro-add-defines-to-compile-with-viv-fb.patch new file mode 100644 index 00000000..e512fd47 --- /dev/null +++ b/dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4/egl-pro-add-defines-to-compile-with-viv-fb.patch @@ -0,0 +1,9 @@ +--- a/config.tests/unix/egl/egl.pro 2015-05-07 16:14:42.000000000 +0200 ++++ b/config.tests/unix/egl/egl.pro 2022-09-28 15:36:53.819893439 +0200 +@@ -6,5 +6,6 @@ for(p, QMAKE_LIBDIR_EGL) { + + !isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL + !isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL ++DEFINES += LINUX=1 EGL_API_FB=1 + + CONFIG -= qt diff --git a/dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4/egl4gles1-pro-add-defines-to-compile-with-viv-fb.patch b/dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4/egl4gles1-pro-add-defines-to-compile-with-viv-fb.patch new file mode 100644 index 00000000..61b40eb7 --- /dev/null +++ b/dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4/egl4gles1-pro-add-defines-to-compile-with-viv-fb.patch @@ -0,0 +1,9 @@ +--- a/config.tests/unix/egl4gles1/egl4gles1.pro 2015-05-07 16:14:42.000000000 +0200 ++++ b/config.tests/unix/egl4gles1/egl4gles1.pro 2022-09-28 15:36:53.827893490 +0200 +@@ -6,5 +6,6 @@ for(p, QMAKE_LIBDIR_EGL) { + + !isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL + !isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL ++DEFINES += LINUX=1 EGL_API_FB=1 + + CONFIG -= qt