Skip to contentSkip to conversation

mesa: Convert recipe to use meson build system

RFC PATCH Superseded Fabio Berton 4 participants 7 messages Feb 20, 2019 – Feb 21, 2019 Arm/Amlogic Meson SoC support

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

RFC PATCH v3 1/1 mesa: Convert recipe to use meson build system

- Remove all non related meson patches
- Change radeon driver to r100

Based on https://patchwork.openembedded.org/patch/158748/

---
 ...0001-Simplify-wayland-scanner-lookup.patch | 42 --------------
 ...ing-include-stddef.h-in-egldevice.h.patch} |  4 +-
 ...k-for-all-linux-host_os-combinations.patch | 50 ++++++++++++++++
 ...-winsys-svga-drm-Include-sys-types.h.patch | 34 -----------
 ...M-version-when-using-LLVM-Git-releas.patch | 44 --------------
 ...R-for-defining-WAYLAND_PROTOCOLS_DAT.patch | 35 -----------
 meta/recipes-graphics/mesa/mesa.inc           | 58 +++++++++----------
 meta/recipes-graphics/mesa/mesa_18.3.4.bb     |  7 +--
 8 files changed, 81 insertions(+), 193 deletions(-)
 delete mode 100644 meta/recipes-graphics/mesa/files/0001-Simplify-wayland-scanner-lookup.patch
 rename meta/recipes-graphics/mesa/files/{0005-egl-add-missing-include-stddef.h-in-egldevice.h.patch => 0001-egl-add-missing-include-stddef.h-in-egldevice.h.patch} (91%)
 create mode 100644 meta/recipes-graphics/mesa/files/0002-meson.build-check-for-all-linux-host_os-combinations.patch
 delete mode 100644 meta/recipes-graphics/mesa/files/0002-winsys-svga-drm-Include-sys-types.h.patch
 delete mode 100644 meta/recipes-graphics/mesa/files/0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch
 delete mode 100644 meta/recipes-graphics/mesa/files/0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch
meta/recipes-graphics/mesa/files/0001-Simplify-wayland-scanner-lookup.patch deleted +0 -42
deleted file mode 100644
index 1c2ded0e60..0000000000
@@ -1,42 +0,0 @@
-From 81bcaa1aeecf1e66b4d94181e9a827d68e970b03 Mon Sep 17 00:00:00 2001
-From: Fabio Berton <[email protected]>
-Date: Wed, 20 Feb 2019 16:17:00 -0300
-Subject: [PATCH 1/5] Simplify wayland-scanner lookup
-Organization: O.S. Systems Software LTDA.
-
-Don't use pkg-config to lookup the path of a binary that's in the path.
-
-Alternatively we'd have to prefix the path returned by pkg-config with
-PKG_CONFIG_SYSROOT_DIR.
-
-Upstream-Status: Pending
-Signed-off-by: Jussi Kukkonen <[email protected]>
-Signed-off-by: Otavio Salvador <[email protected]>
----
- configure.ac | 7 +------
- 1 file changed, 1 insertion(+), 6 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index cd9ff259fad..402b4a91946 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1841,16 +1841,11 @@ for plat in $platforms; do
-         fi
-         WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
-
--        PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
--                          WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
--                          WAYLAND_SCANNER='')
-         PKG_CHECK_EXISTS([wayland-scanner >= 1.15],
-                           AC_SUBST(SCANNER_ARG, 'private-code'),
-                           AC_SUBST(SCANNER_ARG, 'code'))
-
--        if test "x$WAYLAND_SCANNER" = x; then
--            AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
--        fi
-+        AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
-
-         if test "x$WAYLAND_SCANNER" = "x:"; then
-                 AC_MSG_ERROR([wayland-scanner is needed to compile the wayland platform])
---
-2.20.1
meta/recipes-graphics/mesa/files/0001-egl-add-missing-include-stddef.h-in-egldevice.h.patch renamed from meta/recipes-graphics/mesa/files/0005-egl-add-missing-include-stddef.h-in-egldevice.h.patch +2 -2
similarity index 91%
rename from meta/recipes-graphics/mesa/files/0005-egl-add-missing-include-stddef.h-in-egldevice.h.patch
rename to meta/recipes-graphics/mesa/files/0001-egl-add-missing-include-stddef.h-in-egldevice.h.patch
index 1782576db2..08d128e919 100644
@@ -1,7 +1,7 @@
-From f452e30ab664fe608acc107cc03d2efa8731d938 Mon Sep 17 00:00:00 2001
+From d2d5acdcb10465c024c8b0931d49e49660210d2c Mon Sep 17 00:00:00 2001
 From: Gurchetan Singh <[email protected]>
 Date: Wed, 28 Nov 2018 08:39:34 -0800
-Subject: [PATCH 5/5] egl: add missing #include <stddef.h> in egldevice.h
+Subject: [PATCH 1/2] egl: add missing #include <stddef.h> in egldevice.h
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
meta/recipes-graphics/mesa/files/0002-meson.build-check-for-all-linux-host_os-combinations.patch new file +50 -0

50 lines not on this page · raw message

meta/recipes-graphics/mesa/files/0002-winsys-svga-drm-Include-sys-types.h.patch deleted +0 -34
deleted file mode 100644
index 12dca61e19..0000000000
@@ -1,34 +0,0 @@
-From 34c3d07b67e6c08f555473a86ff158951abb6000 Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Wed, 16 Aug 2017 18:58:20 -0700
-Subject: [PATCH 2/5] winsys/svga/drm: Include sys/types.h
-Organization: O.S. Systems Software LTDA.
-
-vmw_screen.h uses dev_t which is defines in sys/types.h
-this header is required to be included for getting dev_t
-definition. This issue happens on musl C library, it is hidden
-on glibc since sys/types.h is included through another
-system headers
-
-Signed-off-by: Khem Raj <[email protected]>
-Upstream-Status: Backport [7dfdfbf8c37e52e7b9b09f7d1d434edad3ebc864]
-Signed-off-by: Otavio Salvador <[email protected]>
----
- src/gallium/winsys/svga/drm/vmw_screen.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/gallium/winsys/svga/drm/vmw_screen.h b/src/gallium/winsys/svga/drm/vmw_screen.h
-index a87c087d9c5..cb34fec48e7 100644
---- a/src/gallium/winsys/svga/drm/vmw_screen.h
-+++ b/src/gallium/winsys/svga/drm/vmw_screen.h
-@@ -41,6 +41,7 @@
- #include "svga_winsys.h"
- #include "pipebuffer/pb_buffer_fenced.h"
- #include <os/os_thread.h>
-+#include <sys/types.h>
- 
- #define VMW_GMR_POOL_SIZE (16*1024*1024)
- #define VMW_QUERY_POOL_SIZE (8192)
--- 
-2.20.1
-
meta/recipes-graphics/mesa/files/0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch deleted +0 -44

44 lines not on this page · raw message

meta/recipes-graphics/mesa/files/0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch deleted +0 -35
deleted file mode 100644
index 8c91790249..0000000000
@@ -1,35 +0,0 @@
-From f48b8f073f921ce5be859130313e9d392ef3e78e Mon Sep 17 00:00:00 2001
-From: Fabio Berton <[email protected]>
-Date: Fri, 15 Feb 2019 10:57:06 -0200
-Subject: [PATCH 4/5] use PKG_CHECK_VAR for defining WAYLAND_PROTOCOLS_DATADIR
-Organization: O.S. Systems Software LTDA.
-
-This allows to override the wayland-protocols pkgdatadir with the
-WAYLAND_PROTOCOLS_DATADIR from environment.
-
-pkgconfig would return an absolute path in
-/usr/share/wayland-protocols
-for the pkgdatadir value, which is not suitable for cross-compiling.
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <[email protected]>
-Signed-off-by: Otavio Salvador <[email protected]>
-Signed-off-by: Fabio Berton <[email protected]>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 0065376f4b7..b21fb2210c6 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1839,7 +1839,7 @@ for plat in $platforms; do
-         if test "x$enable_egl" = xyes; then
-           PKG_CHECK_MODULES([WAYLAND_EGL], [wayland-egl-backend >= $WAYLAND_EGL_BACKEND_REQUIRED])
-         fi
--        WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
-+        PKG_CHECK_VAR([WAYLAND_PROTOCOLS_DATADIR], [wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED], pkgdatadir)
- 
-         PKG_CHECK_EXISTS([wayland-scanner >= 1.15],
-                           AC_SUBST(SCANNER_ARG, 'private-code'),
meta/recipes-graphics/mesa/mesa.inc +27 -31

126 lines not on this page · raw message

meta/recipes-graphics/mesa/mesa_18.3.4.bb +2 -5
index 27f4f0241f..7afb15be10 100644
@@ -1,11 +1,8 @@
 require ${BPN}.inc
 
 SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
-           file://0001-Simplify-wayland-scanner-lookup.patch \
-           file://0002-winsys-svga-drm-Include-sys-types.h.patch \
-           file://0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch \
-           file://0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch \
-           file://0005-egl-add-missing-include-stddef.h-in-egldevice.h.patch \
+           file://0001-egl-add-missing-include-stddef.h-in-egldevice.h.patch \
+           file://0002-meson.build-check-for-all-linux-host_os-combinations.patch \
 "
 
 SRC_URI[md5sum] = "6f2a5e01dd5cb91d05a9534f5a80c35d"
Signature · 1 line
2.20.1
#1 lore raw
Quoted 2 lines · Fabio Berton

+PACKAGECONFIG[xvmc] = "-gallium-xvmc=true,-Dgallium- xvmc=false,libxvmc"

This is missing a '-D' ... Was a problem with my original patch as well.

#2 lore raw

still seeing errors when building for rpi3-64

| checking for xrandr... no
| configure: error: Package requirements (xrandr) were not met:
|
| No package 'xrandr' found
|
| Consider adjusting the PKG_CONFIG_PATH environment variable if you
| installed software in a non-standard prefix.
Quoted 12 lines · Anuj
Quoted 2 lines · Fabio Berton

+PACKAGECONFIG[xvmc] = "-gallium-xvmc=true,-Dgallium- xvmc=false,libxvmc"

This is missing a '-D' ... Was a problem with my original patch as well.
--
_______________________________________________
Openembedded-core mailing list [email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#3 lore raw
Quoted 11 lines · Khem Raj

still seeing errors when building for rpi3-64

| checking for xrandr... no
| configure: error: Package requirements (xrandr) were not met:
|
| No package 'xrandr' found
|
| Consider adjusting the PKG_CONFIG_PATH environment variable if you
| installed software in a non-standard prefix.

This is fixed with latest commit so we can move on but there is new one on aarch64/rpi

https://errors.yoctoproject.org/Errors/Details/229582/

seems to be due to this commit.

https://gitlab.freedesktop.org/mesa/drm/commit/b541d21a0a908bf98d44375720f4430297720743

probably a revert of the above patch is what can get us further.

Quoted 14 lines · Anuj
Quoted 12 lines · Fabio Berton
Quoted 2 lines

+PACKAGECONFIG[xvmc] = "-gallium-xvmc=true,-Dgallium- xvmc=false,libxvmc"

This is missing a '-D' ... Was a problem with my original patch as well.
--
_______________________________________________
Openembedded-core mailing list [email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#4 lore raw
Quoted 14 lines · Khem Raj
Quoted 10 lines

still seeing errors when building for rpi3-64

| checking for xrandr... no
| configure: error: Package requirements (xrandr) were not met:
|
| No package 'xrandr' found
|
| Consider adjusting the PKG_CONFIG_PATH environment variable if you
| installed software in a non-standard prefix.

This is fixed with latest commit so we can move on but there is new one on aarch64/rpi

Quoted 7 lines

https://errors.yoctoproject.org/Errors/Details/229582/

seems to be due to this commit.

https://gitlab.freedesktop.org/mesa/drm/commit/b541d21a0a908bf98d44375720f4430297720743

probably a revert of the above patch is what can get us further.

Shouldn't we rather add a dependency on the component providing the missing include?

Alex

#5 lore raw
Quoted 18 lines · Alexander Kanavin
Quoted 16 lines · Khem Raj
Quoted 10 lines

still seeing errors when building for rpi3-64

| checking for xrandr... no
| configure: error: Package requirements (xrandr) were not met:
|
| No package 'xrandr' found
|
| Consider adjusting the PKG_CONFIG_PATH environment variable if you
| installed software in a non-standard prefix.

This is fixed with latest commit so we can move on but there is new one on aarch64/rpi

https://errors.yoctoproject.org/Errors/Details/229582/

Quoted 8 lines
Quoted 5 lines

seems to be due to this commit.

https://gitlab.freedesktop.org/mesa/drm/commit/b541d21a0a908bf98d44375720f4430297720743

probably a revert of the above patch is what can get us further.

Shouldn't we rather add a dependency on the component providing the missing include?

fredreno build uses its own copy of libdrm IIRC and this might end up in unexpected results
so revert would be safest

Quoted 2 lines

Alex

#6 lore raw
Quoted 25 lines · Khem Raj
Quoted 22 lines · Alexander Kanavin
Quoted 20 lines · Khem Raj
Quoted 10 lines

still seeing errors when building for rpi3-64

| checking for xrandr... no
| configure: error: Package requirements (xrandr) were not met:
|
| No package 'xrandr' found
|
| Consider adjusting the PKG_CONFIG_PATH environment variable if you
| installed software in a non-standard prefix.

This is fixed with latest commit so we can move on but there is new one on aarch64/rpi

https://errors.yoctoproject.org/Errors/Details/229582/

seems to be due to this commit.

https://gitlab.freedesktop.org/mesa/drm/commit/b541d21a0a908bf98d44375720f4430297720743

Quoted 9 lines
Quoted 4 lines
Quoted 1 line

probably a revert of the above patch is what can get us further.

Shouldn't we rather add a dependency on the component providing the missing include?

fredreno build uses its own copy of libdrm IIRC and this might end up in unexpected results
so revert would be safest

infact upstream has reverted it too
https://gitlab.freedesktop.org/mesa/drm/commit/e09f327765902f3b7d31874ccf0f45b783299bc0

Quoted 2 lines
Quoted 2 lines

Alex