* [Buildroot] [RFC v2 1/7] package/mesa3d: rename OSMesa option
@ 2019-04-17 21:43 Romain Naour
2019-04-17 21:43 ` [Buildroot] [RFC v2 2/7] package/mesa3d: add OSMesa classic needs dri swrast Romain Naour
` (5 more replies)
0 siblings, 6 replies; 12+ messages in thread
From: Romain Naour @ 2019-04-17 21:43 UTC (permalink / raw)
To: buildroot
This option is renamed in order to match the naming used by the
meson buildsystem.
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
Config.in.legacy | 7 +++++++
package/mesa3d-demos/mesa3d-demos.mk | 2 +-
package/mesa3d/Config.in | 8 ++++----
package/mesa3d/mesa3d.mk | 2 +-
package/wine/wine.mk | 2 +-
5 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/Config.in.legacy b/Config.in.legacy
index ec5079da65..98c0a43387 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -146,6 +146,13 @@ endif
comment "Legacy options removed in 2019.05"
+config BR2_PACKAGE_MESA3D_OSMESA
+ bool "mesa OSMesa option renamed"
+ select BR2_PACKAGE_MESA3D_OSMESA_CLASSIC
+ help
+ The option was renamed in order to match the naming used
+ by the meson buildsystem.
+
config BR2_PACKAGE_LUNIT
bool "lunit package removed"
select BR2_LEGACY
diff --git a/package/mesa3d-demos/mesa3d-demos.mk b/package/mesa3d-demos/mesa3d-demos.mk
index ddff9b9ed9..e9aa44dc2e 100644
--- a/package/mesa3d-demos/mesa3d-demos.mk
+++ b/package/mesa3d-demos/mesa3d-demos.mk
@@ -61,7 +61,7 @@ ifeq ($(BR2_PACKAGE_LIBFREEGLUT),y)
MESA3D_DEMOS_DEPENDENCIES += libfreeglut
MESA3D_DEMOS_CONF_OPTS += --with-glut=$(STAGING_DIR)/usr
# osmesa support depends on glut
-ifeq ($(BR2_PACKAGE_MESA3D_OSMESA),y)
+ifeq ($(BR2_PACKAGE_MESA3D_OSMESA_CLASSIC),y)
MESA3D_DEMOS_CONF_OPTS += --enable-osmesa
else
MESA3D_DEMOS_CONF_OPTS += --disable-osmesa
diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index 3f44e94229..bd05116aca 100644
--- a/package/mesa3d/Config.in
+++ b/package/mesa3d/Config.in
@@ -265,11 +265,11 @@ comment "intel vulkan depends on X.org and needs a glibc toolchain w/ headers >=
comment "Off-screen Rendering"
-config BR2_PACKAGE_MESA3D_OSMESA
- bool "OSMesa library"
+config BR2_PACKAGE_MESA3D_OSMESA_CLASSIC
+ bool "OSMesa (classic) library"
help
- The OSMesa API provides functions for making off-screen
- renderings.
+ The OSMesa classic API provides functions for
+ making off-screen renderings.
if BR2_PACKAGE_MESA3D_DRIVER
diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index 02c8a8a57a..3c5f488514 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -156,7 +156,7 @@ endif
# APIs
-ifeq ($(BR2_PACKAGE_MESA3D_OSMESA),y)
+ifeq ($(BR2_PACKAGE_MESA3D_OSMESA_CLASSIC),y)
MESA3D_CONF_OPTS += --enable-osmesa
else
MESA3D_CONF_OPTS += --disable-osmesa
diff --git a/package/wine/wine.mk b/package/wine/wine.mk
index 78fa860ecf..a09fcdff23 100644
--- a/package/wine/wine.mk
+++ b/package/wine/wine.mk
@@ -195,7 +195,7 @@ else
WINE_CONF_OPTS += --without-ldap
endif
-ifeq ($(BR2_PACKAGE_MESA3D_OSMESA),y)
+ifeq ($(BR2_PACKAGE_MESA3D_OSMESA_CLASSIC),y)
WINE_CONF_OPTS += --with-osmesa
WINE_DEPENDENCIES += mesa3d
else
--
2.20.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [RFC v2 2/7] package/mesa3d: add OSMesa classic needs dri swrast
2019-04-17 21:43 [Buildroot] [RFC v2 1/7] package/mesa3d: rename OSMesa option Romain Naour
@ 2019-04-17 21:43 ` Romain Naour
2019-04-17 21:43 ` [Buildroot] [RFC v2 3/7] package/mesa3d: Only one swrast provider can be built Romain Naour
` (4 subsequent siblings)
5 siblings, 0 replies; 12+ messages in thread
From: Romain Naour @ 2019-04-17 21:43 UTC (permalink / raw)
To: buildroot
The meson build system now check if dri swrast is enabled
when OSMesa classic is enabled.
See:
https://cgit.freedesktop.org/mesa/mesa/commit/?id=cbbd5bb889a2c271a504c379f36a7cb717a85af4
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
Config.in.legacy | 1 +
package/mesa3d/Config.in | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/Config.in.legacy b/Config.in.legacy
index 98c0a43387..d10540b95e 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -148,6 +148,7 @@ comment "Legacy options removed in 2019.05"
config BR2_PACKAGE_MESA3D_OSMESA
bool "mesa OSMesa option renamed"
+ depends on BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST
select BR2_PACKAGE_MESA3D_OSMESA_CLASSIC
help
The option was renamed in order to match the naming used
diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index bd05116aca..9bb95c3fd6 100644
--- a/package/mesa3d/Config.in
+++ b/package/mesa3d/Config.in
@@ -267,10 +267,14 @@ comment "Off-screen Rendering"
config BR2_PACKAGE_MESA3D_OSMESA_CLASSIC
bool "OSMesa (classic) library"
+ depends on BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST
help
The OSMesa classic API provides functions for
making off-screen renderings.
+comment "OSMesa classic requires dri (classic) swrast"
+ depends on !BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST
+
if BR2_PACKAGE_MESA3D_DRIVER
comment "Additional API Support"
--
2.20.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [RFC v2 3/7] package/mesa3d: Only one swrast provider can be built
2019-04-17 21:43 [Buildroot] [RFC v2 1/7] package/mesa3d: rename OSMesa option Romain Naour
2019-04-17 21:43 ` [Buildroot] [RFC v2 2/7] package/mesa3d: add OSMesa classic needs dri swrast Romain Naour
@ 2019-04-17 21:43 ` Romain Naour
2019-04-17 21:43 ` [Buildroot] [RFC v2 4/7] package/mesa3d: add xvmc option Romain Naour
` (3 subsequent siblings)
5 siblings, 0 replies; 12+ messages in thread
From: Romain Naour @ 2019-04-17 21:43 UTC (permalink / raw)
To: buildroot
https://cgit.freedesktop.org/mesa/mesa/commit/?id=de24d61765011ed4bfc169b8ad8cf67e86b1f3bd
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
package/mesa3d/Config.in | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index 9bb95c3fd6..6ec395723a 100644
--- a/package/mesa3d/Config.in
+++ b/package/mesa3d/Config.in
@@ -173,11 +173,15 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST
bool "Gallium swrast driver"
+ depends on !BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
help
This is a software opengl implementation using the Gallium3D
infrastructure.
+comment "Gallium swrast: Only one swrast provider can be built"
+ depends on BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST
+
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4
bool "Gallium vc4 driver"
depends on BR2_ARM_CPU_HAS_NEON || BR2_aarch64
--
2.20.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [RFC v2 4/7] package/mesa3d: add xvmc option
2019-04-17 21:43 [Buildroot] [RFC v2 1/7] package/mesa3d: rename OSMesa option Romain Naour
2019-04-17 21:43 ` [Buildroot] [RFC v2 2/7] package/mesa3d: add OSMesa classic needs dri swrast Romain Naour
2019-04-17 21:43 ` [Buildroot] [RFC v2 3/7] package/mesa3d: Only one swrast provider can be built Romain Naour
@ 2019-04-17 21:43 ` Romain Naour
2019-04-17 21:43 ` [Buildroot] [RFC v2 5/7] package/mesa3d: Gallium xa state tracker is only available for nouveau and svga Gallium drivers Romain Naour
` (2 subsequent siblings)
5 siblings, 0 replies; 12+ messages in thread
From: Romain Naour @ 2019-04-17 21:43 UTC (permalink / raw)
To: buildroot
"XVMC state tracker requires at least one of the following gallium drivers: r600, nouveau."
https://cgit.freedesktop.org/mesa/mesa/commit/?id=22a817af8a89eb3c762fc3e07b443a3ce37d7416
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
package/mesa3d/Config.in | 14 ++++++++++++++
package/mesa3d/mesa3d.mk | 2 +-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index 6ec395723a..72548adf57 100644
--- a/package/mesa3d/Config.in
+++ b/package/mesa3d/Config.in
@@ -312,6 +312,20 @@ config BR2_PACKAGE_PROVIDES_LIBGLES
config BR2_PACKAGE_PROVIDES_LIBOPENCL
default "mesa3d" if BR2_PACKAGE_MESA3D_OPENCL
+config BR2_PACKAGE_MESA3D_XVMC
+ bool "XvMC state tracker"
+ depends on BR2_PACKAGE_XORG7
+ depends on BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU \
+ || BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600
+ select BR2_PACKAGE_XLIB_LIBXVMC
+ help
+ XVMC state tracker (needs r600 or nouveau gallium drivers).
+
+comment "XvMC depends on X.org and needs gallium drivers: r600, nouveau"
+ depends on !BR2_PACKAGE_XORG7
+ depends on !BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU \
+ || !BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600
+
endif # BR2_PACKAGE_MESA3D
comment "mesa3d needs a toolchain w/ C++, NPTL, dynamic library"
diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index 3c5f488514..b97a56dc26 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -220,7 +220,7 @@ else
MESA3D_CONF_OPTS += --disable-gles1 --disable-gles2
endif
-ifeq ($(BR2_PACKAGE_XLIB_LIBXVMC),y)
+ifeq ($(BR2_PACKAGE_MESA3D_XVMC),y)
MESA3D_DEPENDENCIES += xlib_libXvMC
MESA3D_CONF_OPTS += --enable-xvmc
else
--
2.20.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [RFC v2 5/7] package/mesa3d: Gallium xa state tracker is only available for nouveau and svga Gallium drivers
2019-04-17 21:43 [Buildroot] [RFC v2 1/7] package/mesa3d: rename OSMesa option Romain Naour
` (2 preceding siblings ...)
2019-04-17 21:43 ` [Buildroot] [RFC v2 4/7] package/mesa3d: add xvmc option Romain Naour
@ 2019-04-17 21:43 ` Romain Naour
2019-04-17 21:43 ` [Buildroot] [RFC v2 6/7] package/mesa3d: switch build system to meson Romain Naour
2019-04-17 21:43 ` [Buildroot] [RFC v2 7/7] package/mesa3d: select kmsro for etnaviv Romain Naour
5 siblings, 0 replies; 12+ messages in thread
From: Romain Naour @ 2019-04-17 21:43 UTC (permalink / raw)
To: buildroot
i915 and freedreno Gallium drivers are not currently supported by mesa3d package.
https://cgit.freedesktop.org/mesa/mesa/commit/?id=0ba909f0f111824223bc38563d1a6bc73e69c2cc
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
package/mesa3d/Config.in | 6 +++---
package/mesa3d/mesa3d.mk | 1 -
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index 72548adf57..eba218efb2 100644
--- a/package/mesa3d/Config.in
+++ b/package/mesa3d/Config.in
@@ -80,6 +80,9 @@ config BR2_PACKAGE_MESA3D_VULKAN_DRIVER
config BR2_PACKAGE_MESA3D_DRIVER
bool
+# Gallium xa state tracker.
+# Quote from mesa3d meson.build: "XA state tracker requires at least
+# one of the following gallium drivers: nouveau, freedreno, i915, svga.
config BR2_PACKAGE_MESA3D_NEEDS_XA
bool
@@ -129,7 +132,6 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600
select BR2_PACKAGE_LLVM_AMDGPU if BR2_PACKAGE_MESA3D_LLVM
select BR2_PACKAGE_ELFUTILS if BR2_PACKAGE_MESA3D_LLVM
select BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS if BR2_PACKAGE_MESA3D_LLVM
- select BR2_PACKAGE_MESA3D_NEEDS_XA
help
Driver for ATI/AMD Radeon R600/R700/HD5000/HD6000 GPUs.
@@ -151,7 +153,6 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI
select BR2_PACKAGE_LLVM_AMDGPU
select BR2_PACKAGE_ELFUTILS
select BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS
- select BR2_PACKAGE_MESA3D_NEEDS_XA
help
Driver for ATI/AMD Radeon HD7000/HD8000/Rx200 GPUs.
@@ -188,7 +189,6 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
select BR2_PACKAGE_MESA3D_GALLIUM_KMSRO
select BR2_PACKAGE_LIBDRM_VC4
- select BR2_PACKAGE_MESA3D_NEEDS_XA
select BR2_PACKAGE_MESA3D_OPENGL_EGL
help
Driver for Broadcom VC4 (rpi2/3) GPUs.
diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index b97a56dc26..c8ca9a0d0f 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -83,7 +83,6 @@ MESA3D_DEPENDENCIES += \
xorgproto \
libxcb
MESA3D_CONF_OPTS += --enable-glx --disable-mangling
-# quote from mesa3d configure "Building xa requires at least one non swrast gallium driver."
ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_XA),y)
MESA3D_CONF_OPTS += --enable-xa
else
--
2.20.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [RFC v2 6/7] package/mesa3d: switch build system to meson
2019-04-17 21:43 [Buildroot] [RFC v2 1/7] package/mesa3d: rename OSMesa option Romain Naour
` (3 preceding siblings ...)
2019-04-17 21:43 ` [Buildroot] [RFC v2 5/7] package/mesa3d: Gallium xa state tracker is only available for nouveau and svga Gallium drivers Romain Naour
@ 2019-04-17 21:43 ` Romain Naour
2019-04-25 20:56 ` Peter Seiderer
2019-04-17 21:43 ` [Buildroot] [RFC v2 7/7] package/mesa3d: select kmsro for etnaviv Romain Naour
5 siblings, 1 reply; 12+ messages in thread
From: Romain Naour @ 2019-04-17 21:43 UTC (permalink / raw)
To: buildroot
From: Bernd Kuhls <bernd.kuhls@t-online.de>
Add a new patch to remove host-python-mako dependency [1].
Update patches for meson:
0002-configure.ac-invert-order-for-wayland-scanner-check.patch
0003-set-LIBCLC_INCLUDEDIR.patch
Disable unused options that are set to "auto" mode.
(valgrind, gallium-omx, power8).
Remove --disable-static option since there is no meson equivalent.
Remove --disable-mangling since it's not yet supported by meson.
Use r100 instead of radeon as DRI name for BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON.
[1] http://patchwork.ozlabs.org/patch/1084248/
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
patch 0002-meson-use-generated-files-if-already-present-in-the-.patch may not work at 100%.
---
...vert-order-for-wayland-scanner-check.patch | 51 --------
...ted-files-if-already-present-in-the-.patch | 81 +++++++++++++
...t-proper-value-for-LIBCLC_INCLUDEDIR.patch | 39 ++++++
.../mesa3d/0003-set-LIBCLC_INCLUDEDIR.patch | 37 ------
...d-scanner-provided-by-wayland-scanne.patch | 52 ++++++++
package/mesa3d/Config.in | 3 +-
package/mesa3d/mesa3d.mk | 113 ++++++++----------
7 files changed, 225 insertions(+), 151 deletions(-)
delete mode 100644 package/mesa3d/0002-configure.ac-invert-order-for-wayland-scanner-check.patch
create mode 100644 package/mesa3d/0002-meson-use-generated-files-if-already-present-in-the-.patch
create mode 100644 package/mesa3d/0003-meson-Set-proper-value-for-LIBCLC_INCLUDEDIR.patch
delete mode 100644 package/mesa3d/0003-set-LIBCLC_INCLUDEDIR.patch
create mode 100644 package/mesa3d/0004-meson-use-wayland-scanner-provided-by-wayland-scanne.patch
diff --git a/package/mesa3d/0002-configure.ac-invert-order-for-wayland-scanner-check.patch b/package/mesa3d/0002-configure.ac-invert-order-for-wayland-scanner-check.patch
deleted file mode 100644
index 5135528795..0000000000
--- a/package/mesa3d/0002-configure.ac-invert-order-for-wayland-scanner-check.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From ef96bac7cbbb11b98606864ead0f731dd5b71d5a Mon Sep 17 00:00:00 2001
-From: Gustavo Zacarias <gustavo@zacarias.com.ar>
-Date: Thu, 17 Nov 2016 15:36:54 -0300
-Subject: [PATCH] configure.ac: invert order for wayland-scanner check
-
-When cross-compiling the .pc file might point to the wrong
-wayland-scanner binary (target rather than host) resulting in a
-non-executable and wrong scanner.
-Try searching the PATH first, and if that fails fall back into
-pkg-config.
-
-[Vincent: tweak patch for 17.1.1 version]
-
-Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
-Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
-[Romain: rebase on 18.1]
-Signed-off-by: Romain Naour <romain.naour@gmail.com>
-[Bernd rebase on 18.3]
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
----
- configure.ac | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index f1fbdcc6c7..dcf87e7dd6 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1841,17 +1841,16 @@
- fi
- WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
-
-- PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
-+ AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
-+ if test "x$WAYLAND_SCANNER" = x; then
-+ PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
- WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
- WAYLAND_SCANNER='')
-+ fi
- 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
--
- if test "x$WAYLAND_SCANNER" = "x:"; then
- AC_MSG_ERROR([wayland-scanner is needed to compile the wayland platform])
- fi
---
-2.14.3
diff --git a/package/mesa3d/0002-meson-use-generated-files-if-already-present-in-the-.patch b/package/mesa3d/0002-meson-use-generated-files-if-already-present-in-the-.patch
new file mode 100644
index 0000000000..0350d07b08
--- /dev/null
+++ b/package/mesa3d/0002-meson-use-generated-files-if-already-present-in-the-.patch
@@ -0,0 +1,81 @@
+From 56a9b8964435e88ad869a149cc8f087eea7c4aa6 Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@smile.fr>
+Date: Sun, 14 Apr 2019 19:57:25 +0200
+Subject: [PATCH] meson: use generated files if already present in the release
+ archive
+
+meson buildsystem behaviour doesn't is not the same as for autotools
+buildsystem about generated files. With autotools if a generated file
+exist it is not regenerated but with meson it is unconditionnaly
+generated. These files are provided as part of a release archive.
+
+Modify the custom_target using ir_expression_operation.py in order to
+use generated files present in the release archive.
+
+The python script ir_expression_operation.py used to build the header
+file ir_expression_operation_constant.h is using python mako module.
+This module must be installed in order to be able to build mesa from
+the git repository.
+
+Signed-off-by: Romain Naour <romain.naour@smile.fr>
+---
+ meson.build | 8 +++++++-
+ src/compiler/glsl/meson.build | 2 ++
+ src/compiler/meson.build | 1 +
+ 3 files changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 53d02e31097..6c4f1508855 100644
+--- a/meson.build
++++ b/meson.build
+@@ -728,8 +728,14 @@ from distutils.version import StrictVersion
+ import mako
+ assert StrictVersion(mako.__version__) > StrictVersion("0.8.0")
+ ''')
++
++# Check if we build from a release archive that already contains pregenerated source files.
++has_pregenerated_files = run_command('[', '-f', join_paths(meson.source_root(), 'src/mesa/main/format_unpack.c'), ']')
++
+ if has_mako.returncode() != 0
+- error('Python (3.x) mako module >= 0.8.0 required to build mesa.')
++ if has_pregenerated_files.returncode() != 0
++ error('Python (3.x) mako module >= 0.8.0 required to build mesa.')
++ endif
+ endif
+
+ if cc.get_id() == 'gcc' and cc.version().version_compare('< 4.4.6')
+diff --git a/src/compiler/glsl/meson.build b/src/compiler/glsl/meson.build
+index 8096f2d048e..3b3ec274785 100644
+--- a/src/compiler/glsl/meson.build
++++ b/src/compiler/glsl/meson.build
+@@ -43,6 +43,7 @@ ir_expression_operation_constant_h = custom_target(
+ output : 'ir_expression_operation_constant.h',
+ command : [prog_python, '@INPUT@', 'constant'],
+ capture : true,
++ build_always_stale : false,
+ )
+
+ ir_expression_operation_strings_h = custom_target(
+@@ -51,6 +52,7 @@ ir_expression_operation_strings_h = custom_target(
+ output : 'ir_expression_operation_strings.h',
+ command : [prog_python, '@INPUT@', 'strings'],
+ capture : true,
++ build_always_stale : false,
+ )
+
+ float64_glsl_h = custom_target(
+diff --git a/src/compiler/meson.build b/src/compiler/meson.build
+index 0f8f3c12966..ff254b65051 100644
+--- a/src/compiler/meson.build
++++ b/src/compiler/meson.build
+@@ -42,6 +42,7 @@ ir_expression_operation_h = custom_target(
+ output : 'ir_expression_operation.h',
+ command : [prog_python, '@INPUT@', 'enum'],
+ capture : true,
++ build_always_stale : false,
+ )
+
+ libcompiler = static_library(
+--
+2.20.1
+
diff --git a/package/mesa3d/0003-meson-Set-proper-value-for-LIBCLC_INCLUDEDIR.patch b/package/mesa3d/0003-meson-Set-proper-value-for-LIBCLC_INCLUDEDIR.patch
new file mode 100644
index 0000000000..072d79a213
--- /dev/null
+++ b/package/mesa3d/0003-meson-Set-proper-value-for-LIBCLC_INCLUDEDIR.patch
@@ -0,0 +1,39 @@
+From 7b46756a99aca7f27a45c3b99460f088570f6f53 Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@smile.fr>
+Date: Wed, 17 Apr 2019 23:07:42 +0200
+Subject: [PATCH] meson: Set proper value for LIBCLC_INCLUDEDIR
+
+LIBCLC_INCLUDEDIR is the location where mesa3d OpenCL implementation
+will look for OpenCL "headers" on the target, when building the OpenCL
+kernels.
+
+The value returned by pkg-config for includedir is relevant when
+cross-compiling, on the build machine. But in this specific case, we
+really need a value that is valid on the target.
+
+Those headers are installed by the libclc package in /usr/share so
+that they are not removed by Buildroot target-finalize logic.
+
+Based on the patch for autotools provided by Valentin Korenblit.
+
+Signed-off-by: Romain Naour <romain.naour@smile.fr>
+---
+ src/gallium/state_trackers/clover/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gallium/state_trackers/clover/meson.build b/src/gallium/state_trackers/clover/meson.build
+index 62ac5f5278d..ecdeb39669c 100644
+--- a/src/gallium/state_trackers/clover/meson.build
++++ b/src/gallium/state_trackers/clover/meson.build
+@@ -49,7 +49,7 @@ libclllvm = static_library(
+ include_directories : clover_incs,
+ cpp_args : [
+ cpp_vis_args,
+- '-DLIBCLC_INCLUDEDIR="@0@/"'.format(dep_clc.get_pkgconfig_variable('includedir')),
++ '-DLIBCLC_INCLUDEDIR="/usr/share"',
+ '-DLIBCLC_LIBEXECDIR="@0@/"'.format(dep_clc.get_pkgconfig_variable('libexecdir')),
+ '-DCLANG_RESOURCE_DIR="@0@"'.format(join_paths(
+ dep_llvm.get_configtool_variable('libdir'), 'clang',
+--
+2.20.1
+
diff --git a/package/mesa3d/0003-set-LIBCLC_INCLUDEDIR.patch b/package/mesa3d/0003-set-LIBCLC_INCLUDEDIR.patch
deleted file mode 100644
index 42ae826a36..0000000000
--- a/package/mesa3d/0003-set-LIBCLC_INCLUDEDIR.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 94bceeb621e36f3188c6246a763def8695526578 Mon Sep 17 00:00:00 2001
-From: Valentin Korenblit <valentinkorenblit@gmail.com>
-Date: Sat, 20 Oct 2018 10:56:23 +0200
-Subject: [PATCH] Set proper value for LIBCLC_INCLUDEDIR
-
-LIBCLC_INCLUDEDIR is the location where mesa3d OpenCL implementation
-will look for OpenCL "headers" on the target, when building the OpenCL
-kernels.
-
-The value returned by pkg-config for includedir is relevant when
-cross-compiling, on the build machine. But in this specific case, we
-really need a value that is valid on the target.
-
-Those headers are installed by the libclc package in /usr/share so
-that they are not removed by Buildroot target-finalize logic.
-
-Signed-off-by: Valentin Korenblit <valentinkorenblit@gmail.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 864dcae..cc2390b 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -2429,7 +2429,7 @@ if test "x$enable_opencl" = xyes; then
- PKG_CONFIG_PATH environment variable.
- By default libclc.pc is installed to /usr/local/share/pkgconfig/])
- else
-- LIBCLC_INCLUDEDIR=`$PKG_CONFIG --variable=includedir libclc`
-+ LIBCLC_INCLUDEDIR="/usr/share"
- LIBCLC_LIBEXECDIR=`$PKG_CONFIG --variable=libexecdir libclc`
- AC_SUBST([LIBCLC_INCLUDEDIR])
- AC_SUBST([LIBCLC_LIBEXECDIR])
---
-2.7.4
-
diff --git a/package/mesa3d/0004-meson-use-wayland-scanner-provided-by-wayland-scanne.patch b/package/mesa3d/0004-meson-use-wayland-scanner-provided-by-wayland-scanne.patch
new file mode 100644
index 0000000000..784b27c4a2
--- /dev/null
+++ b/package/mesa3d/0004-meson-use-wayland-scanner-provided-by-wayland-scanne.patch
@@ -0,0 +1,52 @@
+From 0e107f7bac8d84d8fb2bb5b83bfb4474348a82c1 Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@smile.fr>
+Date: Wed, 17 Apr 2019 22:47:05 +0200
+Subject: [PATCH] meson: use wayland-scanner provided by wayland-scanner-path
+
+When cross-compiling the .pc file might point to the wrong
+wayland-scanner binary (target rather than host) resulting in a
+non-executable and wrong scanner.
+First try by using the path provided by wayland-scanner-path,
+and if that fails fall back into pkg-config.
+
+Based on the patch for autotools provided by Gustavo Zacarias.
+
+Signed-off-by: Romain Naour <romain.naour@smile.fr>
+---
+ meson.build | 5 ++++-
+ meson_options.txt | 6 ++++++
+ 2 files changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 6c4f1508855..ef0532b2cfb 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1319,7 +1319,10 @@ endif
+
+ if with_platform_wayland
+ dep_wl_scanner = dependency('wayland-scanner', native: true)
+- prog_wl_scanner = find_program(dep_wl_scanner.get_pkgconfig_variable('wayland_scanner'))
++ prog_wl_scanner = get_option('wayland-scanner-path')
++ if prog_wl_scanner == ''
++ prog_wl_scanner = find_program(dep_wl_scanner.get_pkgconfig_variable('wayland_scanner'))
++ endif
+ if dep_wl_scanner.version().version_compare('>= 1.15')
+ wl_scanner_arg = 'private-code'
+ else
+diff --git a/meson_options.txt b/meson_options.txt
+index ccf70659ff7..59ff8df8337 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -324,3 +324,9 @@ option(
+ value : true,
+ description : 'Enable direct rendering in GLX and EGL for DRI',
+ )
++option(
++ 'wayland-scanner-path',
++ type : 'string',
++ value : '',
++ description : 'Locations to wayland-scanner binary. Default: use path from pkg-config'
++)
+--
+2.20.1
+
diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index eba218efb2..df24acea21 100644
--- a/package/mesa3d/Config.in
+++ b/package/mesa3d/Config.in
@@ -87,8 +87,7 @@ config BR2_PACKAGE_MESA3D_NEEDS_XA
bool
# Quote from mesa3d meson.build: "kmsro driver requires one or more
-# renderonly drivers (vc4, etnaviv, freedreno)". But only vc4 support
-# is available by using the (deprecated) autotools build system.
+# renderonly drivers (vc4, etnaviv, freedreno)".
config BR2_PACKAGE_MESA3D_GALLIUM_KMSRO
bool
diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index c8ca9a0d0f..5244545584 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -25,27 +25,19 @@ MESA3D_DEPENDENCIES = \
libdrm \
zlib
-# Disable assembly usage.
-MESA3D_CONF_OPTS = --disable-asm
-
-# autotools are deprecated in favour of meson, for now force autotools
-MESA3D_CONF_OPTS += --enable-autotools
-
-# Disable static, otherwise configure will fail with: "Cannot enable both static
-# and shared."
-ifeq ($(BR2_SHARED_STATIC_LIBS),y)
-MESA3D_CONF_OPTS += --disable-static
-endif
+MESA3D_CONF_OPTS = \
+ -Dasm=false \
+ -Dgallium-omx=disabled \
+ -Dpower8=false \
+ -Dvalgrind=false
ifeq ($(BR2_PACKAGE_MESA3D_LLVM),y)
MESA3D_DEPENDENCIES += host-llvm llvm
-MESA3D_CONF_OPTS += \
- --with-llvm-prefix=$(STAGING_DIR)/usr \
- --enable-llvm-shared-libs \
- --enable-llvm
+MESA3D_CONF_ENV += LLVM_CONFIG=$(STAGING_DIR)/usr/bin/llvm-config
+MESA3D_CONF_OPTS += -Dllvm=true
else
# Avoid automatic search of llvm-config
-MESA3D_CONF_OPTS += --disable-llvm
+MESA3D_CONF_OPTS += -Dllvm=false
endif
# Disable opencl-icd: OpenCL lib will be named libOpenCL instead of
@@ -53,11 +45,9 @@ endif
ifeq ($(BR2_PACKAGE_MESA3D_OPENCL),y)
MESA3D_PROVIDES += libopencl
MESA3D_DEPENDENCIES += clang libclc
-MESA3D_CONF_OPTS += --enable-opencl \
- --disable-opencl-icd \
- --with-clang-libdir=$(STAGING_DIR)/usr/lib
+MESA3D_CONF_OPTS += -Dgallium-opencl=standalone
else
-MESA3D_CONF_OPTS += --disable-opencl
+MESA3D_CONF_OPTS += -Dgallium-opencl=disabled
endif
ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS),y)
@@ -82,16 +72,17 @@ MESA3D_DEPENDENCIES += \
xlib_libXxf86vm \
xorgproto \
libxcb
-MESA3D_CONF_OPTS += --enable-glx --disable-mangling
+# Disable-mangling not yet supported by meson build system.
+MESA3D_CONF_OPTS += -Dglx=auto
ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_XA),y)
-MESA3D_CONF_OPTS += --enable-xa
+MESA3D_CONF_OPTS += -Dgallium-xa=true
else
-MESA3D_CONF_OPTS += --disable-xa
+MESA3D_CONF_OPTS += -Dgallium-xa=false
endif
else
MESA3D_CONF_OPTS += \
- --disable-glx \
- --disable-xa
+ -Dglx=disabled \
+ -Dgallium-xa=false
endif
# Drivers
@@ -111,63 +102,62 @@ MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST) += swrast
MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_I915) += i915
MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_I965) += i965
MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_NOUVEAU) += nouveau
-MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON) += radeon
+MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON) += r100
# Vulkan Drivers
MESA3D_VULKAN_DRIVERS-$(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL) += intel
ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER),)
MESA3D_CONF_OPTS += \
- --without-gallium-drivers \
- --disable-gallium-extra-hud
+ -Dgallium-drivers= \
+ -Dgallium-extra-hud=false
else
MESA3D_CONF_OPTS += \
- --enable-shared-glapi \
- --with-gallium-drivers=$(subst $(space),$(comma),$(MESA3D_GALLIUM_DRIVERS-y)) \
- --enable-gallium-extra-hud
+ -Dshared-glapi=true \
+ -Dgallium-drivers=$(subst $(space),$(comma),$(MESA3D_GALLIUM_DRIVERS-y)) \
+ -Dgallium-extra-hud=true
endif
ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),)
MESA3D_CONF_OPTS += \
- --without-dri-drivers --disable-dri3
+ -Ddri-drivers= -Ddri3=false
else
ifeq ($(BR2_PACKAGE_XLIB_LIBXSHMFENCE),y)
MESA3D_DEPENDENCIES += xlib_libxshmfence
-MESA3D_CONF_OPTS += --enable-dri3
+MESA3D_CONF_OPTS += -Ddri3=true
else
-MESA3D_CONF_OPTS += --disable-dri3
+MESA3D_CONF_OPTS += -Ddri3=false
endif
MESA3D_CONF_OPTS += \
- --enable-shared-glapi \
- --enable-driglx-direct \
- --with-dri-driverdir=/usr/lib/dri \
- --with-dri-drivers=$(subst $(space),$(comma),$(MESA3D_DRI_DRIVERS-y))
+ -Dshared-glapi=true \
+ -Dglx-direct=true \
+ -Ddri-drivers=$(subst $(space),$(comma),$(MESA3D_DRI_DRIVERS-y))
endif
ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER),)
MESA3D_CONF_OPTS += \
- --without-vulkan-drivers
+ -Dvulkan-drivers=
else
MESA3D_DEPENDENCIES += xlib_libxshmfence
MESA3D_CONF_OPTS += \
- --enable-dri3 \
- --with-vulkan-drivers=$(subst $(space),$(comma),$(MESA3D_VULKAN_DRIVERS-y))
+ -Ddri3=true \
+ -Dvulkan-drivers=$(subst $(space),$(comma),$(MESA3D_VULKAN_DRIVERS-y))
endif
# APIs
ifeq ($(BR2_PACKAGE_MESA3D_OSMESA_CLASSIC),y)
-MESA3D_CONF_OPTS += --enable-osmesa
+MESA3D_CONF_OPTS += -Dosmesa=classic
else
-MESA3D_CONF_OPTS += --disable-osmesa
+MESA3D_CONF_OPTS += -Dosmesa=none
endif
# Always enable OpenGL:
-# - it is needed for GLES (mesa3d's ./configure is a bit weird)
-MESA3D_CONF_OPTS += --enable-opengl --enable-dri
+# - it is needed for GLES (mesa3d's meson.build is a bit weird)
+MESA3D_CONF_OPTS += -Dopengl=true -Dglx=dri
# libva and mesa3d have a circular dependency
# we do not need libva support in mesa3d, therefore disable this option
-MESA3D_CONF_OPTS += --disable-va
+MESA3D_CONF_OPTS += -Dgallium-va=false
# libGL is only provided for a full xorg stack
ifeq ($(BR2_PACKAGE_XORG7),y)
@@ -194,57 +184,58 @@ endif
ifeq ($(BR2_PACKAGE_WAYLAND),y)
MESA3D_DEPENDENCIES += wayland wayland-protocols
MESA3D_PLATFORMS += wayland
+MESA3D_CONF_OPTS += -Dwayland-scanner-path=$(HOST_DIR)/bin/wayland-scanner
endif
ifeq ($(BR2_PACKAGE_XORG7),y)
MESA3D_PLATFORMS += x11
endif
MESA3D_CONF_OPTS += \
- --with-platforms=$(subst $(space),$(comma),$(MESA3D_PLATFORMS))
+ -Dplatforms=$(subst $(space),$(comma),$(MESA3D_PLATFORMS))
ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y)
MESA3D_PROVIDES += libegl
MESA3D_CONF_OPTS += \
- --enable-gbm \
- --enable-egl
+ -Dgbm=true \
+ -Degl=true
else
MESA3D_CONF_OPTS += \
- --disable-egl
+ -Degl=true=false
endif
ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_ES),y)
MESA3D_PROVIDES += libgles
-MESA3D_CONF_OPTS += --enable-gles1 --enable-gles2
+MESA3D_CONF_OPTS += -Dgles1=true -Dgles2=true
else
-MESA3D_CONF_OPTS += --disable-gles1 --disable-gles2
+MESA3D_CONF_OPTS += -Dgles1=false -Dgles2=false
endif
ifeq ($(BR2_PACKAGE_MESA3D_XVMC),y)
MESA3D_DEPENDENCIES += xlib_libXvMC
-MESA3D_CONF_OPTS += --enable-xvmc
+MESA3D_CONF_OPTS += -Dgallium-xvmc=true
else
-MESA3D_CONF_OPTS += --disable-xvmc
+MESA3D_CONF_OPTS += -Dgallium-xvmc=false
endif
ifeq ($(BR2_PACKAGE_LIBUNWIND),y)
-MESA3D_CONF_OPTS += --enable-libunwind
+MESA3D_CONF_OPTS += -Dlibunwind=true
MESA3D_DEPENDENCIES += libunwind
else
-MESA3D_CONF_OPTS += --disable-libunwind
+MESA3D_CONF_OPTS += -Dlibunwind=false
endif
ifeq ($(BR2_PACKAGE_LIBVDPAU),y)
MESA3D_DEPENDENCIES += libvdpau
-MESA3D_CONF_OPTS += --enable-vdpau
+MESA3D_CONF_OPTS += -Dgallium-vdpau=true
else
-MESA3D_CONF_OPTS += --disable-vdpau
+MESA3D_CONF_OPTS += -Dgallium-vdpau=false
endif
ifeq ($(BR2_PACKAGE_LM_SENSORS),y)
-MESA3D_CONF_OPTS += --enable-lmsensors
+MESA3D_CONF_OPTS += -Dlmsensors=true
MESA3D_DEPENDENCIES += lm-sensors
else
-MESA3D_CONF_OPTS += --disable-lmsensors
+MESA3D_CONF_OPTS += -Dlmsensors=false
endif
-$(eval $(autotools-package))
+$(eval $(meson-package))
--
2.20.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [RFC v2 7/7] package/mesa3d: select kmsro for etnaviv
2019-04-17 21:43 [Buildroot] [RFC v2 1/7] package/mesa3d: rename OSMesa option Romain Naour
` (4 preceding siblings ...)
2019-04-17 21:43 ` [Buildroot] [RFC v2 6/7] package/mesa3d: switch build system to meson Romain Naour
@ 2019-04-17 21:43 ` Romain Naour
5 siblings, 0 replies; 12+ messages in thread
From: Romain Naour @ 2019-04-17 21:43 UTC (permalink / raw)
To: buildroot
Quote from mesa3d meson.build:
"kmsro driver requires one or more renderonly drivers
(vc4, etnaviv, freedreno)".
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
package/mesa3d/Config.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index df24acea21..9827621f0b 100644
--- a/package/mesa3d/Config.in
+++ b/package/mesa3d/Config.in
@@ -97,6 +97,7 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV
bool "Gallium Etnaviv driver"
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
select BR2_PACKAGE_LIBDRM_ETNAVIV
+ select BR2_PACKAGE_MESA3D_GALLIUM_KMSRO
select BR2_PACKAGE_MESA3D_OPENGL_EGL
help
Mesa driver for Vivante GPUs.
--
2.20.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [RFC v2 6/7] package/mesa3d: switch build system to meson
2019-04-17 21:43 ` [Buildroot] [RFC v2 6/7] package/mesa3d: switch build system to meson Romain Naour
@ 2019-04-25 20:56 ` Peter Seiderer
2019-04-30 11:14 ` Romain Naour
0 siblings, 1 reply; 12+ messages in thread
From: Peter Seiderer @ 2019-04-25 20:56 UTC (permalink / raw)
To: buildroot
Hello Bernd, Romain,
On Wed, 17 Apr 2019 23:43:47 +0200, Romain Naour <romain.naour@smile.fr> wrote:
> From: Bernd Kuhls <bernd.kuhls@t-online.de>
>
> Add a new patch to remove host-python-mako dependency [1].
>
> Update patches for meson:
> 0002-configure.ac-invert-order-for-wayland-scanner-check.patch
> 0003-set-LIBCLC_INCLUDEDIR.patch
>
> Disable unused options that are set to "auto" mode.
> (valgrind, gallium-omx, power8).
>
> Remove --disable-static option since there is no meson equivalent.
> Remove --disable-mangling since it's not yet supported by meson.
>
> Use r100 instead of radeon as DRI name for BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON.
>
> [1] http://patchwork.ozlabs.org/patch/1084248/
>
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> Signed-off-by: Romain Naour <romain.naour@smile.fr>
> ---
> patch 0002-meson-use-generated-files-if-already-present-in-the-.patch may not work at 100%.
> ---
> ...vert-order-for-wayland-scanner-check.patch | 51 --------
> ...ted-files-if-already-present-in-the-.patch | 81 +++++++++++++
> ...t-proper-value-for-LIBCLC_INCLUDEDIR.patch | 39 ++++++
> .../mesa3d/0003-set-LIBCLC_INCLUDEDIR.patch | 37 ------
> ...d-scanner-provided-by-wayland-scanne.patch | 52 ++++++++
> package/mesa3d/Config.in | 3 +-
> package/mesa3d/mesa3d.mk | 113 ++++++++----------
> 7 files changed, 225 insertions(+), 151 deletions(-)
> delete mode 100644 package/mesa3d/0002-configure.ac-invert-order-for-wayland-scanner-check.patch
> create mode 100644 package/mesa3d/0002-meson-use-generated-files-if-already-present-in-the-.patch
> create mode 100644 package/mesa3d/0003-meson-Set-proper-value-for-LIBCLC_INCLUDEDIR.patch
> delete mode 100644 package/mesa3d/0003-set-LIBCLC_INCLUDEDIR.patch
> create mode 100644 package/mesa3d/0004-meson-use-wayland-scanner-provided-by-wayland-scanne.patch
>
> diff --git a/package/mesa3d/0002-configure.ac-invert-order-for-wayland-scanner-check.patch b/package/mesa3d/0002-configure.ac-invert-order-for-wayland-scanner-check.patch
> deleted file mode 100644
> index 5135528795..0000000000
> --- a/package/mesa3d/0002-configure.ac-invert-order-for-wayland-scanner-check.patch
> +++ /dev/null
> @@ -1,51 +0,0 @@
> -From ef96bac7cbbb11b98606864ead0f731dd5b71d5a Mon Sep 17 00:00:00 2001
> -From: Gustavo Zacarias <gustavo@zacarias.com.ar>
> -Date: Thu, 17 Nov 2016 15:36:54 -0300
> -Subject: [PATCH] configure.ac: invert order for wayland-scanner check
> -
> -When cross-compiling the .pc file might point to the wrong
> -wayland-scanner binary (target rather than host) resulting in a
> -non-executable and wrong scanner.
> -Try searching the PATH first, and if that fails fall back into
> -pkg-config.
> -
> -[Vincent: tweak patch for 17.1.1 version]
> -
> -Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> -Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> -[Romain: rebase on 18.1]
> -Signed-off-by: Romain Naour <romain.naour@gmail.com>
> -[Bernd rebase on 18.3]
> -Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ----
> - configure.ac | 8 ++++----
> - 1 file changed, 4 insertions(+), 4 deletions(-)
> -
> -diff --git a/configure.ac b/configure.ac
> -index f1fbdcc6c7..dcf87e7dd6 100644
> ---- a/configure.ac
> -+++ b/configure.ac
> -@@ -1841,17 +1841,16 @@
> - fi
> - WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
> -
> -- PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
> -+ AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
> -+ if test "x$WAYLAND_SCANNER" = x; then
> -+ PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
> - WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
> - WAYLAND_SCANNER='')
> -+ fi
> - 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
> --
> - if test "x$WAYLAND_SCANNER" = "x:"; then
> - AC_MSG_ERROR([wayland-scanner is needed to compile the wayland platform])
> - fi
> ---
> -2.14.3
> diff --git a/package/mesa3d/0002-meson-use-generated-files-if-already-present-in-the-.patch b/package/mesa3d/0002-meson-use-generated-files-if-already-present-in-the-.patch
> new file mode 100644
> index 0000000000..0350d07b08
> --- /dev/null
> +++ b/package/mesa3d/0002-meson-use-generated-files-if-already-present-in-the-.patch
> @@ -0,0 +1,81 @@
> +From 56a9b8964435e88ad869a149cc8f087eea7c4aa6 Mon Sep 17 00:00:00 2001
> +From: Romain Naour <romain.naour@smile.fr>
> +Date: Sun, 14 Apr 2019 19:57:25 +0200
> +Subject: [PATCH] meson: use generated files if already present in the release
> + archive
> +
> +meson buildsystem behaviour doesn't is not the same as for autotools
> +buildsystem about generated files. With autotools if a generated file
> +exist it is not regenerated but with meson it is unconditionnaly
> +generated. These files are provided as part of a release archive.
> +
> +Modify the custom_target using ir_expression_operation.py in order to
> +use generated files present in the release archive.
> +
> +The python script ir_expression_operation.py used to build the header
> +file ir_expression_operation_constant.h is using python mako module.
> +This module must be installed in order to be able to build mesa from
> +the git repository.
> +
> +Signed-off-by: Romain Naour <romain.naour@smile.fr>
> +---
> + meson.build | 8 +++++++-
> + src/compiler/glsl/meson.build | 2 ++
> + src/compiler/meson.build | 1 +
> + 3 files changed, 10 insertions(+), 1 deletion(-)
> +
> +diff --git a/meson.build b/meson.build
> +index 53d02e31097..6c4f1508855 100644
> +--- a/meson.build
> ++++ b/meson.build
> +@@ -728,8 +728,14 @@ from distutils.version import StrictVersion
> + import mako
> + assert StrictVersion(mako.__version__) > StrictVersion("0.8.0")
> + ''')
> ++
> ++# Check if we build from a release archive that already contains pregenerated source files.
> ++has_pregenerated_files = run_command('[', '-f', join_paths(meson.source_root(), 'src/mesa/main/format_unpack.c'), ']')
> ++
> + if has_mako.returncode() != 0
> +- error('Python (3.x) mako module >= 0.8.0 required to build mesa.')
> ++ if has_pregenerated_files.returncode() != 0
> ++ error('Python (3.x) mako module >= 0.8.0 required to build mesa.')
> ++ endif
> + endif
> +
> + if cc.get_id() == 'gcc' and cc.version().version_compare('< 4.4.6')
> +diff --git a/src/compiler/glsl/meson.build b/src/compiler/glsl/meson.build
> +index 8096f2d048e..3b3ec274785 100644
> +--- a/src/compiler/glsl/meson.build
> ++++ b/src/compiler/glsl/meson.build
> +@@ -43,6 +43,7 @@ ir_expression_operation_constant_h = custom_target(
> + output : 'ir_expression_operation_constant.h',
> + command : [prog_python, '@INPUT@', 'constant'],
> + capture : true,
> ++ build_always_stale : false,
> + )
> +
> + ir_expression_operation_strings_h = custom_target(
> +@@ -51,6 +52,7 @@ ir_expression_operation_strings_h = custom_target(
> + output : 'ir_expression_operation_strings.h',
> + command : [prog_python, '@INPUT@', 'strings'],
> + capture : true,
> ++ build_always_stale : false,
> + )
> +
> + float64_glsl_h = custom_target(
> +diff --git a/src/compiler/meson.build b/src/compiler/meson.build
> +index 0f8f3c12966..ff254b65051 100644
> +--- a/src/compiler/meson.build
> ++++ b/src/compiler/meson.build
> +@@ -42,6 +42,7 @@ ir_expression_operation_h = custom_target(
> + output : 'ir_expression_operation.h',
> + command : [prog_python, '@INPUT@', 'enum'],
> + capture : true,
> ++ build_always_stale : false,
> + )
> +
> + libcompiler = static_library(
> +--
> +2.20.1
> +
> diff --git a/package/mesa3d/0003-meson-Set-proper-value-for-LIBCLC_INCLUDEDIR.patch b/package/mesa3d/0003-meson-Set-proper-value-for-LIBCLC_INCLUDEDIR.patch
> new file mode 100644
> index 0000000000..072d79a213
> --- /dev/null
> +++ b/package/mesa3d/0003-meson-Set-proper-value-for-LIBCLC_INCLUDEDIR.patch
> @@ -0,0 +1,39 @@
> +From 7b46756a99aca7f27a45c3b99460f088570f6f53 Mon Sep 17 00:00:00 2001
> +From: Romain Naour <romain.naour@smile.fr>
> +Date: Wed, 17 Apr 2019 23:07:42 +0200
> +Subject: [PATCH] meson: Set proper value for LIBCLC_INCLUDEDIR
> +
> +LIBCLC_INCLUDEDIR is the location where mesa3d OpenCL implementation
> +will look for OpenCL "headers" on the target, when building the OpenCL
> +kernels.
> +
> +The value returned by pkg-config for includedir is relevant when
> +cross-compiling, on the build machine. But in this specific case, we
> +really need a value that is valid on the target.
> +
> +Those headers are installed by the libclc package in /usr/share so
> +that they are not removed by Buildroot target-finalize logic.
> +
> +Based on the patch for autotools provided by Valentin Korenblit.
> +
> +Signed-off-by: Romain Naour <romain.naour@smile.fr>
> +---
> + src/gallium/state_trackers/clover/meson.build | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/src/gallium/state_trackers/clover/meson.build b/src/gallium/state_trackers/clover/meson.build
> +index 62ac5f5278d..ecdeb39669c 100644
> +--- a/src/gallium/state_trackers/clover/meson.build
> ++++ b/src/gallium/state_trackers/clover/meson.build
> +@@ -49,7 +49,7 @@ libclllvm = static_library(
> + include_directories : clover_incs,
> + cpp_args : [
> + cpp_vis_args,
> +- '-DLIBCLC_INCLUDEDIR="@0@/"'.format(dep_clc.get_pkgconfig_variable('includedir')),
> ++ '-DLIBCLC_INCLUDEDIR="/usr/share"',
> + '-DLIBCLC_LIBEXECDIR="@0@/"'.format(dep_clc.get_pkgconfig_variable('libexecdir')),
> + '-DCLANG_RESOURCE_DIR="@0@"'.format(join_paths(
> + dep_llvm.get_configtool_variable('libdir'), 'clang',
> +--
> +2.20.1
> +
> diff --git a/package/mesa3d/0003-set-LIBCLC_INCLUDEDIR.patch b/package/mesa3d/0003-set-LIBCLC_INCLUDEDIR.patch
> deleted file mode 100644
> index 42ae826a36..0000000000
> --- a/package/mesa3d/0003-set-LIBCLC_INCLUDEDIR.patch
> +++ /dev/null
> @@ -1,37 +0,0 @@
> -From 94bceeb621e36f3188c6246a763def8695526578 Mon Sep 17 00:00:00 2001
> -From: Valentin Korenblit <valentinkorenblit@gmail.com>
> -Date: Sat, 20 Oct 2018 10:56:23 +0200
> -Subject: [PATCH] Set proper value for LIBCLC_INCLUDEDIR
> -
> -LIBCLC_INCLUDEDIR is the location where mesa3d OpenCL implementation
> -will look for OpenCL "headers" on the target, when building the OpenCL
> -kernels.
> -
> -The value returned by pkg-config for includedir is relevant when
> -cross-compiling, on the build machine. But in this specific case, we
> -really need a value that is valid on the target.
> -
> -Those headers are installed by the libclc package in /usr/share so
> -that they are not removed by Buildroot target-finalize logic.
> -
> -Signed-off-by: Valentin Korenblit <valentinkorenblit@gmail.com>
> ----
> - configure.ac | 2 +-
> - 1 file changed, 1 insertion(+), 1 deletion(-)
> -
> -diff --git a/configure.ac b/configure.ac
> -index 864dcae..cc2390b 100644
> ---- a/configure.ac
> -+++ b/configure.ac
> -@@ -2429,7 +2429,7 @@ if test "x$enable_opencl" = xyes; then
> - PKG_CONFIG_PATH environment variable.
> - By default libclc.pc is installed to /usr/local/share/pkgconfig/])
> - else
> -- LIBCLC_INCLUDEDIR=`$PKG_CONFIG --variable=includedir libclc`
> -+ LIBCLC_INCLUDEDIR="/usr/share"
> - LIBCLC_LIBEXECDIR=`$PKG_CONFIG --variable=libexecdir libclc`
> - AC_SUBST([LIBCLC_INCLUDEDIR])
> - AC_SUBST([LIBCLC_LIBEXECDIR])
> ---
> -2.7.4
> -
> diff --git a/package/mesa3d/0004-meson-use-wayland-scanner-provided-by-wayland-scanne.patch b/package/mesa3d/0004-meson-use-wayland-scanner-provided-by-wayland-scanne.patch
> new file mode 100644
> index 0000000000..784b27c4a2
> --- /dev/null
> +++ b/package/mesa3d/0004-meson-use-wayland-scanner-provided-by-wayland-scanne.patch
> @@ -0,0 +1,52 @@
> +From 0e107f7bac8d84d8fb2bb5b83bfb4474348a82c1 Mon Sep 17 00:00:00 2001
> +From: Romain Naour <romain.naour@smile.fr>
> +Date: Wed, 17 Apr 2019 22:47:05 +0200
> +Subject: [PATCH] meson: use wayland-scanner provided by wayland-scanner-path
> +
> +When cross-compiling the .pc file might point to the wrong
> +wayland-scanner binary (target rather than host) resulting in a
> +non-executable and wrong scanner.
> +First try by using the path provided by wayland-scanner-path,
> +and if that fails fall back into pkg-config.
> +
> +Based on the patch for autotools provided by Gustavo Zacarias.
> +
> +Signed-off-by: Romain Naour <romain.naour@smile.fr>
> +---
> + meson.build | 5 ++++-
> + meson_options.txt | 6 ++++++
> + 2 files changed, 10 insertions(+), 1 deletion(-)
> +
> +diff --git a/meson.build b/meson.build
> +index 6c4f1508855..ef0532b2cfb 100644
> +--- a/meson.build
> ++++ b/meson.build
> +@@ -1319,7 +1319,10 @@ endif
> +
> + if with_platform_wayland
> + dep_wl_scanner = dependency('wayland-scanner', native: true)
> +- prog_wl_scanner = find_program(dep_wl_scanner.get_pkgconfig_variable('wayland_scanner'))
> ++ prog_wl_scanner = get_option('wayland-scanner-path')
> ++ if prog_wl_scanner == ''
> ++ prog_wl_scanner = find_program(dep_wl_scanner.get_pkgconfig_variable('wayland_scanner'))
> ++ endif
> + if dep_wl_scanner.version().version_compare('>= 1.15')
> + wl_scanner_arg = 'private-code'
> + else
> +diff --git a/meson_options.txt b/meson_options.txt
> +index ccf70659ff7..59ff8df8337 100644
> +--- a/meson_options.txt
> ++++ b/meson_options.txt
> +@@ -324,3 +324,9 @@ option(
> + value : true,
> + description : 'Enable direct rendering in GLX and EGL for DRI',
> + )
> ++option(
> ++ 'wayland-scanner-path',
> ++ type : 'string',
> ++ value : '',
> ++ description : 'Locations to wayland-scanner binary. Default: use path from pkg-config'
> ++)
> +--
> +2.20.1
> +
> diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
> index eba218efb2..df24acea21 100644
> --- a/package/mesa3d/Config.in
> +++ b/package/mesa3d/Config.in
> @@ -87,8 +87,7 @@ config BR2_PACKAGE_MESA3D_NEEDS_XA
> bool
>
> # Quote from mesa3d meson.build: "kmsro driver requires one or more
> -# renderonly drivers (vc4, etnaviv, freedreno)". But only vc4 support
> -# is available by using the (deprecated) autotools build system.
> +# renderonly drivers (vc4, etnaviv, freedreno)".
> config BR2_PACKAGE_MESA3D_GALLIUM_KMSRO
> bool
>
> diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
> index c8ca9a0d0f..5244545584 100644
> --- a/package/mesa3d/mesa3d.mk
> +++ b/package/mesa3d/mesa3d.mk
> @@ -25,27 +25,19 @@ MESA3D_DEPENDENCIES = \
> libdrm \
> zlib
>
> -# Disable assembly usage.
> -MESA3D_CONF_OPTS = --disable-asm
> -
> -# autotools are deprecated in favour of meson, for now force autotools
> -MESA3D_CONF_OPTS += --enable-autotools
> -
> -# Disable static, otherwise configure will fail with: "Cannot enable both static
> -# and shared."
> -ifeq ($(BR2_SHARED_STATIC_LIBS),y)
> -MESA3D_CONF_OPTS += --disable-static
> -endif
> +MESA3D_CONF_OPTS = \
> + -Dasm=false \
> + -Dgallium-omx=disabled \
> + -Dpower8=false \
> + -Dvalgrind=false
>
> ifeq ($(BR2_PACKAGE_MESA3D_LLVM),y)
> MESA3D_DEPENDENCIES += host-llvm llvm
> -MESA3D_CONF_OPTS += \
> - --with-llvm-prefix=$(STAGING_DIR)/usr \
> - --enable-llvm-shared-libs \
> - --enable-llvm
> +MESA3D_CONF_ENV += LLVM_CONFIG=$(STAGING_DIR)/usr/bin/llvm-config
> +MESA3D_CONF_OPTS += -Dllvm=true
> else
> # Avoid automatic search of llvm-config
> -MESA3D_CONF_OPTS += --disable-llvm
> +MESA3D_CONF_OPTS += -Dllvm=false
> endif
>
> # Disable opencl-icd: OpenCL lib will be named libOpenCL instead of
> @@ -53,11 +45,9 @@ endif
> ifeq ($(BR2_PACKAGE_MESA3D_OPENCL),y)
> MESA3D_PROVIDES += libopencl
> MESA3D_DEPENDENCIES += clang libclc
> -MESA3D_CONF_OPTS += --enable-opencl \
> - --disable-opencl-icd \
> - --with-clang-libdir=$(STAGING_DIR)/usr/lib
> +MESA3D_CONF_OPTS += -Dgallium-opencl=standalone
> else
> -MESA3D_CONF_OPTS += --disable-opencl
> +MESA3D_CONF_OPTS += -Dgallium-opencl=disabled
> endif
>
> ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS),y)
> @@ -82,16 +72,17 @@ MESA3D_DEPENDENCIES += \
> xlib_libXxf86vm \
> xorgproto \
> libxcb
> -MESA3D_CONF_OPTS += --enable-glx --disable-mangling
> +# Disable-mangling not yet supported by meson build system.
> +MESA3D_CONF_OPTS += -Dglx=auto
> ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_XA),y)
> -MESA3D_CONF_OPTS += --enable-xa
> +MESA3D_CONF_OPTS += -Dgallium-xa=true
> else
> -MESA3D_CONF_OPTS += --disable-xa
> +MESA3D_CONF_OPTS += -Dgallium-xa=false
> endif
> else
> MESA3D_CONF_OPTS += \
> - --disable-glx \
> - --disable-xa
> + -Dglx=disabled \
> + -Dgallium-xa=false
> endif
>
> # Drivers
> @@ -111,63 +102,62 @@ MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST) += swrast
> MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_I915) += i915
> MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_I965) += i965
> MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_NOUVEAU) += nouveau
> -MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON) += radeon
> +MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON) += r100
> # Vulkan Drivers
> MESA3D_VULKAN_DRIVERS-$(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL) += intel
>
> ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER),)
> MESA3D_CONF_OPTS += \
> - --without-gallium-drivers \
> - --disable-gallium-extra-hud
> + -Dgallium-drivers= \
> + -Dgallium-extra-hud=false
> else
> MESA3D_CONF_OPTS += \
> - --enable-shared-glapi \
> - --with-gallium-drivers=$(subst $(space),$(comma),$(MESA3D_GALLIUM_DRIVERS-y)) \
> - --enable-gallium-extra-hud
> + -Dshared-glapi=true \
> + -Dgallium-drivers=$(subst $(space),$(comma),$(MESA3D_GALLIUM_DRIVERS-y)) \
> + -Dgallium-extra-hud=true
> endif
>
> ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),)
> MESA3D_CONF_OPTS += \
> - --without-dri-drivers --disable-dri3
> + -Ddri-drivers= -Ddri3=false
> else
> ifeq ($(BR2_PACKAGE_XLIB_LIBXSHMFENCE),y)
> MESA3D_DEPENDENCIES += xlib_libxshmfence
> -MESA3D_CONF_OPTS += --enable-dri3
> +MESA3D_CONF_OPTS += -Ddri3=true
> else
> -MESA3D_CONF_OPTS += --disable-dri3
> +MESA3D_CONF_OPTS += -Ddri3=false
> endif
> MESA3D_CONF_OPTS += \
> - --enable-shared-glapi \
> - --enable-driglx-direct \
> - --with-dri-driverdir=/usr/lib/dri \
> - --with-dri-drivers=$(subst $(space),$(comma),$(MESA3D_DRI_DRIVERS-y))
> + -Dshared-glapi=true \
> + -Dglx-direct=true \
> + -Ddri-drivers=$(subst $(space),$(comma),$(MESA3D_DRI_DRIVERS-y))
> endif
>
> ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER),)
> MESA3D_CONF_OPTS += \
> - --without-vulkan-drivers
> + -Dvulkan-drivers=
> else
> MESA3D_DEPENDENCIES += xlib_libxshmfence
> MESA3D_CONF_OPTS += \
> - --enable-dri3 \
> - --with-vulkan-drivers=$(subst $(space),$(comma),$(MESA3D_VULKAN_DRIVERS-y))
> + -Ddri3=true \
> + -Dvulkan-drivers=$(subst $(space),$(comma),$(MESA3D_VULKAN_DRIVERS-y))
> endif
>
> # APIs
>
> ifeq ($(BR2_PACKAGE_MESA3D_OSMESA_CLASSIC),y)
> -MESA3D_CONF_OPTS += --enable-osmesa
> +MESA3D_CONF_OPTS += -Dosmesa=classic
> else
> -MESA3D_CONF_OPTS += --disable-osmesa
> +MESA3D_CONF_OPTS += -Dosmesa=none
> endif
>
> # Always enable OpenGL:
> -# - it is needed for GLES (mesa3d's ./configure is a bit weird)
> -MESA3D_CONF_OPTS += --enable-opengl --enable-dri
> +# - it is needed for GLES (mesa3d's meson.build is a bit weird)
> +MESA3D_CONF_OPTS += -Dopengl=true -Dglx=dri
>
> # libva and mesa3d have a circular dependency
> # we do not need libva support in mesa3d, therefore disable this option
> -MESA3D_CONF_OPTS += --disable-va
> +MESA3D_CONF_OPTS += -Dgallium-va=false
>
> # libGL is only provided for a full xorg stack
> ifeq ($(BR2_PACKAGE_XORG7),y)
> @@ -194,57 +184,58 @@ endif
> ifeq ($(BR2_PACKAGE_WAYLAND),y)
> MESA3D_DEPENDENCIES += wayland wayland-protocols
> MESA3D_PLATFORMS += wayland
> +MESA3D_CONF_OPTS += -Dwayland-scanner-path=$(HOST_DIR)/bin/wayland-scanner
> endif
> ifeq ($(BR2_PACKAGE_XORG7),y)
> MESA3D_PLATFORMS += x11
> endif
>
> MESA3D_CONF_OPTS += \
> - --with-platforms=$(subst $(space),$(comma),$(MESA3D_PLATFORMS))
> + -Dplatforms=$(subst $(space),$(comma),$(MESA3D_PLATFORMS))
>
> ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y)
> MESA3D_PROVIDES += libegl
> MESA3D_CONF_OPTS += \
> - --enable-gbm \
> - --enable-egl
> + -Dgbm=true \
> + -Degl=true
> else
> MESA3D_CONF_OPTS += \
> - --disable-egl
> + -Degl=true=false
> endif
>
> ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_ES),y)
> MESA3D_PROVIDES += libgles
> -MESA3D_CONF_OPTS += --enable-gles1 --enable-gles2
> +MESA3D_CONF_OPTS += -Dgles1=true -Dgles2=true
> else
> -MESA3D_CONF_OPTS += --disable-gles1 --disable-gles2
> +MESA3D_CONF_OPTS += -Dgles1=false -Dgles2=false
> endif
>
> ifeq ($(BR2_PACKAGE_MESA3D_XVMC),y)
> MESA3D_DEPENDENCIES += xlib_libXvMC
> -MESA3D_CONF_OPTS += --enable-xvmc
> +MESA3D_CONF_OPTS += -Dgallium-xvmc=true
> else
> -MESA3D_CONF_OPTS += --disable-xvmc
> +MESA3D_CONF_OPTS += -Dgallium-xvmc=false
> endif
>
> ifeq ($(BR2_PACKAGE_LIBUNWIND),y)
> -MESA3D_CONF_OPTS += --enable-libunwind
> +MESA3D_CONF_OPTS += -Dlibunwind=true
> MESA3D_DEPENDENCIES += libunwind
> else
> -MESA3D_CONF_OPTS += --disable-libunwind
> +MESA3D_CONF_OPTS += -Dlibunwind=false
> endif
>
> ifeq ($(BR2_PACKAGE_LIBVDPAU),y)
> MESA3D_DEPENDENCIES += libvdpau
> -MESA3D_CONF_OPTS += --enable-vdpau
> +MESA3D_CONF_OPTS += -Dgallium-vdpau=true
> else
> -MESA3D_CONF_OPTS += --disable-vdpau
> +MESA3D_CONF_OPTS += -Dgallium-vdpau=false
> endif
>
> ifeq ($(BR2_PACKAGE_LM_SENSORS),y)
> -MESA3D_CONF_OPTS += --enable-lmsensors
> +MESA3D_CONF_OPTS += -Dlmsensors=true
> MESA3D_DEPENDENCIES += lm-sensors
> else
> -MESA3D_CONF_OPTS += --disable-lmsensors
> +MESA3D_CONF_OPTS += -Dlmsensors=false
> endif
>
> -$(eval $(autotools-package))
> +$(eval $(meson-package))
Tested your patch series for i.mx6 (nitrogen6x_defconfig based), got the following
configure failure (see defconfig below):
[...]
Host machine cpu family: arm
Host machine cpu: cortex-a9
Target machine cpu family: arm
Target machine cpu: cortex-a9
Build machine cpu family: x86_64
Build machine cpu: x86_64
meson.build:342:4: ERROR: Problem encountered: Cannot build GLX support without X11 platform support and at least one OpenGL API
A full log can be found at .../build/mesa3d-19.0.2/build/meson-logs/meson-log.txt
make[1]: *** [package/pkg-generic.mk:231: .../build/mesa3d-19.0.2/.stamp_configured]
The configure failure could be 'fixed' by the following quick patch:
diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index 5244545584..773defbfa1 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -153,7 +153,7 @@ endif
# Always enable OpenGL:
# - it is needed for GLES (mesa3d's meson.build is a bit weird)
-MESA3D_CONF_OPTS += -Dopengl=true -Dglx=dri
+MESA3D_CONF_OPTS += -Dopengl=true
# libva and mesa3d have a circular dependency
# we do not need libva support in mesa3d, therefore disable this option
With this patch applied the configure step succeeds, but the compile step
fails with:
[29/843] Generating vtn_gather_types.c with a custom command.
FAILED: src/compiler/spirv/vtn_gather_types.c
.../host/bin/python3 ../src/compiler/spirv/vtn_gather_types_c.py ../src/compiler/spirv/spirv.core.grammar.json src/compiler/spirv/vtn_gather_types.c
Traceback (most recent call last):
File "../src/compiler/spirv/vtn_gather_types_c.py", line 29, in <module>
from mako.template import Template
ModuleNotFoundError: No module named 'mako'
[30/843] Generating spirv_info.c with a custom command.
FAILED: src/compiler/spirv/spirv_info.c
.../host/bin/python3 ../src/compiler/spirv/spirv_info_c.py ../src/compiler/spirv/spirv.core.grammar.json src/compiler/spirv/spirv_info.c
Traceback (most recent call last):
File "../src/compiler/spirv/spirv_info_c.py", line 29, in <module>
from mako.template import Template
ModuleNotFoundError: No module named 'mako'
[35/843] Generating ir_expression_oper....h with a meson_exe.py custom command.
FAILED: src/compiler/ir_expression_operation.h
.../host/bin/meson --internal exe .../build/mesa3d-19.0.2/build/meson-private/meson_exe_python3_f99bf283dabcb83e5389be4bfb906240d67be6d7.dat
Traceback (most recent call last):
File "../src/compiler/glsl/ir_expression_operation.py", line 23, in <module>
import mako.template
ModuleNotFoundError: No module named 'mako'
[36/843] Generating nir_constant_expre....c with a meson_exe.py custom command.
FAILED: src/compiler/nir/nir_constant_expressions.c
.../host/bin/meson --internal exe .../build/mesa3d-19.0.2/build/meson-private/meson_exe_python3_16aba73c258f517db1423ca1fcbcc47a6f58541b.dat
Traceback (most recent call last):
File "../src/compiler/nir/nir_constant_expressions.py", line 424, in <module>
from mako.template import Template
ModuleNotFoundError: No module named 'mako'
[37/843] Generating nir_builder_opcodes.h with a meson_exe.py custom command.
FAILED: src/compiler/nir/nir_builder_opcodes.h
.../host/bin/meson --internal exe .../build/mesa3d-19.0.2/build/meson-private/meson_exe_python3_9519d8170e7bc8796b8caf294704c1ae9b9beb60.dat
Traceback (most recent call last):
File "../src/compiler/nir/nir_builder_opcodes_h.py", line 98, in <module>
from mako.template import Template
ModuleNotFoundError: No module named 'mako'
[38/843] Generating nir_opcodes.h with a meson_exe.py custom command.
FAILED: src/compiler/nir/nir_opcodes.h
.../host/bin/meson --internal exe .../build/mesa3d-19.0.2/build/meson-private/meson_exe_python3_7d8bc70fe02c4d6671c051c06b6c456b05bca90c.dat
Traceback (most recent call last):
File "../src/compiler/nir/nir_opcodes_h.py", line 45, in <module>
from mako.template import Template
ModuleNotFoundError: No module named 'mako'
[45/843] Generating format_srgb with a meson_exe.py custom command.
ninja: build stopped: subcommand failed.
make[1]: *** [package/pkg-generic.mk:241: .../build/mesa3d-19.0.2/.stamp_built] Error 1
Seems the patch 0002-meson-use-generated-files-if-already-present-in-the-.patch is
not enough to prevent all python-mako based file generation calls...
Regards,
Peter
BR2_arm=y
BR2_cortex_a9=y
BR2_ARM_ENABLE_NEON=y
BR2_ARM_ENABLE_VFP=y
BR2_ARM_FPU_VFPV3=y
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y
BR2_BINUTILS_VERSION_2_32_X=y
BR2_GCC_VERSION_8_X=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1"
BR2_ROOTFS_POST_BUILD_SCRIPT="board/boundarydevices/common/post-build.sh"
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/boundarydevices/common/post-image.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/linux-imx6/archive/2aef1ef6.tar.gz"
BR2_LINUX_KERNEL_DEFCONFIG="boundary"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6dl-nit6xlite imx6dl-nitrogen6_vm imx6dl-nitrogen6x imx6q-nitrogen6x imx6dl-nitrogen6_som2 imx6q-nitrogen6_som2 imx6qp-nitrogen6_som2 imx6q-nitrogen6_max imx6qp-nitrogen6_max imx6q-sabrelite"
BR2_LINUX_KERNEL_INSTALL_TARGET=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/u-boot-imx6/archive/1530219d.tar.gz"
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nitrogen6q"
BR2_TARGET_UBOOT_FORMAT_IMX=y
BR2_TARGET_UBOOT_BOOT_SCRIPT=y
BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/boundarydevices/common/boot.cmd"
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [RFC v2 6/7] package/mesa3d: switch build system to meson
2019-04-25 20:56 ` Peter Seiderer
@ 2019-04-30 11:14 ` Romain Naour
2019-04-30 21:14 ` Peter Seiderer
0 siblings, 1 reply; 12+ messages in thread
From: Romain Naour @ 2019-04-30 11:14 UTC (permalink / raw)
To: buildroot
Hi Peter, All
Le 25/04/2019 ? 22:56, Peter Seiderer a ?crit?:
> Hello Bernd, Romain,
>
[...]
>
> Tested your patch series for i.mx6 (nitrogen6x_defconfig based), got the following
> configure failure (see defconfig below):
>
> [...]
> Host machine cpu family: arm
> Host machine cpu: cortex-a9
> Target machine cpu family: arm
> Target machine cpu: cortex-a9
> Build machine cpu family: x86_64
> Build machine cpu: x86_64
>
> meson.build:342:4: ERROR: Problem encountered: Cannot build GLX support without X11 platform support and at least one OpenGL API
>
> A full log can be found at .../build/mesa3d-19.0.2/build/meson-logs/meson-log.txt
> make[1]: *** [package/pkg-generic.mk:231: .../build/mesa3d-19.0.2/.stamp_configured]
>
> The configure failure could be 'fixed' by the following quick patch:
>
> diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
> index 5244545584..773defbfa1 100644
> --- a/package/mesa3d/mesa3d.mk
> +++ b/package/mesa3d/mesa3d.mk
> @@ -153,7 +153,7 @@ endif
>
> # Always enable OpenGL:
> # - it is needed for GLES (mesa3d's meson.build is a bit weird)
> -MESA3D_CONF_OPTS += -Dopengl=true -Dglx=dri
> +MESA3D_CONF_OPTS += -Dopengl=true
Ack.
Also, I'll replace -Dglx=auto by -Dglx=dri which is the only option that can be
supported currently by the Buildroot package.
All other options (xlib and xlib-gallium) are not supported by the current
packaging.
>
> # libva and mesa3d have a circular dependency
> # we do not need libva support in mesa3d, therefore disable this option
>
>
> With this patch applied the configure step succeeds, but the compile step
> fails with:
>
> [29/843] Generating vtn_gather_types.c with a custom command.
> FAILED: src/compiler/spirv/vtn_gather_types.c
> .../host/bin/python3 ../src/compiler/spirv/vtn_gather_types_c.py ../src/compiler/spirv/spirv.core.grammar.json src/compiler/spirv/vtn_gather_types.c
> Traceback (most recent call last):
> File "../src/compiler/spirv/vtn_gather_types_c.py", line 29, in <module>
> from mako.template import Template
> ModuleNotFoundError: No module named 'mako'
> [30/843] Generating spirv_info.c with a custom command.
> FAILED: src/compiler/spirv/spirv_info.c
> .../host/bin/python3 ../src/compiler/spirv/spirv_info_c.py ../src/compiler/spirv/spirv.core.grammar.json src/compiler/spirv/spirv_info.c
> Traceback (most recent call last):
> File "../src/compiler/spirv/spirv_info_c.py", line 29, in <module>
> from mako.template import Template
> ModuleNotFoundError: No module named 'mako'
> [35/843] Generating ir_expression_oper....h with a meson_exe.py custom command.
> FAILED: src/compiler/ir_expression_operation.h
> .../host/bin/meson --internal exe .../build/mesa3d-19.0.2/build/meson-private/meson_exe_python3_f99bf283dabcb83e5389be4bfb906240d67be6d7.dat
> Traceback (most recent call last):
> File "../src/compiler/glsl/ir_expression_operation.py", line 23, in <module>
> import mako.template
> ModuleNotFoundError: No module named 'mako'
> [36/843] Generating nir_constant_expre....c with a meson_exe.py custom command.
> FAILED: src/compiler/nir/nir_constant_expressions.c
> .../host/bin/meson --internal exe .../build/mesa3d-19.0.2/build/meson-private/meson_exe_python3_16aba73c258f517db1423ca1fcbcc47a6f58541b.dat
> Traceback (most recent call last):
> File "../src/compiler/nir/nir_constant_expressions.py", line 424, in <module>
> from mako.template import Template
> ModuleNotFoundError: No module named 'mako'
> [37/843] Generating nir_builder_opcodes.h with a meson_exe.py custom command.
> FAILED: src/compiler/nir/nir_builder_opcodes.h
> .../host/bin/meson --internal exe .../build/mesa3d-19.0.2/build/meson-private/meson_exe_python3_9519d8170e7bc8796b8caf294704c1ae9b9beb60.dat
> Traceback (most recent call last):
> File "../src/compiler/nir/nir_builder_opcodes_h.py", line 98, in <module>
> from mako.template import Template
> ModuleNotFoundError: No module named 'mako'
> [38/843] Generating nir_opcodes.h with a meson_exe.py custom command.
> FAILED: src/compiler/nir/nir_opcodes.h
> .../host/bin/meson --internal exe .../build/mesa3d-19.0.2/build/meson-private/meson_exe_python3_7d8bc70fe02c4d6671c051c06b6c456b05bca90c.dat
> Traceback (most recent call last):
> File "../src/compiler/nir/nir_opcodes_h.py", line 45, in <module>
> from mako.template import Template
> ModuleNotFoundError: No module named 'mako'
> [45/843] Generating format_srgb with a meson_exe.py custom command.
> ninja: build stopped: subcommand failed.
> make[1]: *** [package/pkg-generic.mk:241: .../build/mesa3d-19.0.2/.stamp_built] Error 1
>
>
> Seems the patch 0002-meson-use-generated-files-if-already-present-in-the-.patch is
> not enough to prevent all python-mako based file generation calls...
Indeed, this doesn't work when some drivers (like etnaviv) are enabled.
I don't see other solution than adding a new package python3-mako like it was
done for python3-setuptools.
See: http://lists.busybox.net/pipermail/buildroot/2019-April/247707.html
It's pity that the meson build system can't use existing generated files present
in the release archive.
Best regards,
Romain
>
> Regards,
> Peter
>
> BR2_arm=y
> BR2_cortex_a9=y
> BR2_ARM_ENABLE_NEON=y
> BR2_ARM_ENABLE_VFP=y
> BR2_ARM_FPU_VFPV3=y
> BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
> BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y
> BR2_BINUTILS_VERSION_2_32_X=y
> BR2_GCC_VERSION_8_X=y
> BR2_TOOLCHAIN_BUILDROOT_CXX=y
> BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
> BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1"
> BR2_ROOTFS_POST_BUILD_SCRIPT="board/boundarydevices/common/post-build.sh"
> BR2_ROOTFS_POST_IMAGE_SCRIPT="board/boundarydevices/common/post-image.sh"
> BR2_LINUX_KERNEL=y
> BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
> BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/linux-imx6/archive/2aef1ef6.tar.gz"
> BR2_LINUX_KERNEL_DEFCONFIG="boundary"
> BR2_LINUX_KERNEL_DTS_SUPPORT=y
> BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6dl-nit6xlite imx6dl-nitrogen6_vm imx6dl-nitrogen6x imx6q-nitrogen6x imx6dl-nitrogen6_som2 imx6q-nitrogen6_som2 imx6qp-nitrogen6_som2 imx6q-nitrogen6_max imx6qp-nitrogen6_max imx6q-sabrelite"
> BR2_LINUX_KERNEL_INSTALL_TARGET=y
> BR2_PACKAGE_MESA3D=y
> BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV=y
> BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO=y
> BR2_PACKAGE_MESA3D_OPENGL_ES=y
> BR2_TARGET_ROOTFS_EXT2=y
> BR2_TARGET_ROOTFS_EXT2_4=y
> BR2_TARGET_UBOOT=y
> BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
> BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
> BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/u-boot-imx6/archive/1530219d.tar.gz"
> BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nitrogen6q"
> BR2_TARGET_UBOOT_FORMAT_IMX=y
> BR2_TARGET_UBOOT_BOOT_SCRIPT=y
> BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/boundarydevices/common/boot.cmd"
> BR2_PACKAGE_HOST_GENIMAGE=y
> BR2_PACKAGE_HOST_UBOOT_TOOLS=y
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [RFC v2 6/7] package/mesa3d: switch build system to meson
2019-04-30 11:14 ` Romain Naour
@ 2019-04-30 21:14 ` Peter Seiderer
2019-04-30 21:40 ` Bernd Kuhls
2019-05-06 9:57 ` Romain Naour
0 siblings, 2 replies; 12+ messages in thread
From: Peter Seiderer @ 2019-04-30 21:14 UTC (permalink / raw)
To: buildroot
Hello Romain,
On Tue, 30 Apr 2019 13:14:55 +0200, Romain Naour <romain.naour@smile.fr> wrote:
> Hi Peter, All
>
> Le 25/04/2019 ? 22:56, Peter Seiderer a ?crit?:
> > Hello Bernd, Romain,
> >
>
> [...]
>
> >
> > Tested your patch series for i.mx6 (nitrogen6x_defconfig based), got the following
> > configure failure (see defconfig below):
> >
> > [...]
> > Host machine cpu family: arm
> > Host machine cpu: cortex-a9
> > Target machine cpu family: arm
> > Target machine cpu: cortex-a9
> > Build machine cpu family: x86_64
> > Build machine cpu: x86_64
> >
> > meson.build:342:4: ERROR: Problem encountered: Cannot build GLX support without X11 platform support and at least one OpenGL API
> >
> > A full log can be found at .../build/mesa3d-19.0.2/build/meson-logs/meson-log.txt
> > make[1]: *** [package/pkg-generic.mk:231: .../build/mesa3d-19.0.2/.stamp_configured]
> >
> > The configure failure could be 'fixed' by the following quick patch:
> >
> > diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
> > index 5244545584..773defbfa1 100644
> > --- a/package/mesa3d/mesa3d.mk
> > +++ b/package/mesa3d/mesa3d.mk
> > @@ -153,7 +153,7 @@ endif
> >
> > # Always enable OpenGL:
> > # - it is needed for GLES (mesa3d's meson.build is a bit weird)
> > -MESA3D_CONF_OPTS += -Dopengl=true -Dglx=dri
> > +MESA3D_CONF_OPTS += -Dopengl=true
>
> Ack.
> Also, I'll replace -Dglx=auto by -Dglx=dri which is the only option that can be
> supported currently by the Buildroot package.
> All other options (xlib and xlib-gallium) are not supported by the current
> packaging.
So use the glx option only in case platform x11 is selected?
>
> >
> > # libva and mesa3d have a circular dependency
> > # we do not need libva support in mesa3d, therefore disable this option
> >
> >
> > With this patch applied the configure step succeeds, but the compile step
> > fails with:
> >
> > [29/843] Generating vtn_gather_types.c with a custom command.
> > FAILED: src/compiler/spirv/vtn_gather_types.c
> > .../host/bin/python3 ../src/compiler/spirv/vtn_gather_types_c.py ../src/compiler/spirv/spirv.core.grammar.json src/compiler/spirv/vtn_gather_types.c
> > Traceback (most recent call last):
> > File "../src/compiler/spirv/vtn_gather_types_c.py", line 29, in <module>
> > from mako.template import Template
> > ModuleNotFoundError: No module named 'mako'
> > [30/843] Generating spirv_info.c with a custom command.
> > FAILED: src/compiler/spirv/spirv_info.c
> > .../host/bin/python3 ../src/compiler/spirv/spirv_info_c.py ../src/compiler/spirv/spirv.core.grammar.json src/compiler/spirv/spirv_info.c
> > Traceback (most recent call last):
> > File "../src/compiler/spirv/spirv_info_c.py", line 29, in <module>
> > from mako.template import Template
> > ModuleNotFoundError: No module named 'mako'
> > [35/843] Generating ir_expression_oper....h with a meson_exe.py custom command.
> > FAILED: src/compiler/ir_expression_operation.h
> > .../host/bin/meson --internal exe .../build/mesa3d-19.0.2/build/meson-private/meson_exe_python3_f99bf283dabcb83e5389be4bfb906240d67be6d7.dat
> > Traceback (most recent call last):
> > File "../src/compiler/glsl/ir_expression_operation.py", line 23, in <module>
> > import mako.template
> > ModuleNotFoundError: No module named 'mako'
> > [36/843] Generating nir_constant_expre....c with a meson_exe.py custom command.
> > FAILED: src/compiler/nir/nir_constant_expressions.c
> > .../host/bin/meson --internal exe .../build/mesa3d-19.0.2/build/meson-private/meson_exe_python3_16aba73c258f517db1423ca1fcbcc47a6f58541b.dat
> > Traceback (most recent call last):
> > File "../src/compiler/nir/nir_constant_expressions.py", line 424, in <module>
> > from mako.template import Template
> > ModuleNotFoundError: No module named 'mako'
> > [37/843] Generating nir_builder_opcodes.h with a meson_exe.py custom command.
> > FAILED: src/compiler/nir/nir_builder_opcodes.h
> > .../host/bin/meson --internal exe .../build/mesa3d-19.0.2/build/meson-private/meson_exe_python3_9519d8170e7bc8796b8caf294704c1ae9b9beb60.dat
> > Traceback (most recent call last):
> > File "../src/compiler/nir/nir_builder_opcodes_h.py", line 98, in <module>
> > from mako.template import Template
> > ModuleNotFoundError: No module named 'mako'
> > [38/843] Generating nir_opcodes.h with a meson_exe.py custom command.
> > FAILED: src/compiler/nir/nir_opcodes.h
> > .../host/bin/meson --internal exe .../build/mesa3d-19.0.2/build/meson-private/meson_exe_python3_7d8bc70fe02c4d6671c051c06b6c456b05bca90c.dat
> > Traceback (most recent call last):
> > File "../src/compiler/nir/nir_opcodes_h.py", line 45, in <module>
> > from mako.template import Template
> > ModuleNotFoundError: No module named 'mako'
> > [45/843] Generating format_srgb with a meson_exe.py custom command.
> > ninja: build stopped: subcommand failed.
> > make[1]: *** [package/pkg-generic.mk:241: .../build/mesa3d-19.0.2/.stamp_built] Error 1
> >
> >
> > Seems the patch 0002-meson-use-generated-files-if-already-present-in-the-.patch is
> > not enough to prevent all python-mako based file generation calls...
>
> Indeed, this doesn't work when some drivers (like etnaviv) are enabled.
>
> I don't see other solution than adding a new package python3-mako like it was
> done for python3-setuptools.
> See: http://lists.busybox.net/pipermail/buildroot/2019-April/247707.html
>
> It's pity that the meson build system can't use existing generated files present
> in the release archive.
Did a 'hack' patch to avoid file generation (not upstreamable, but for a first try):
diff --git a/package/mesa3d/0005-Fix-no-generated-files.patch b/package/mesa3d/0005-Fix-no-generated-files.patch
new file mode 100644
index 00000000..f28dfde8
--- /dev/null
+++ b/package/mesa3d/0005-Fix-no-generated-files.patch
@@ -0,0 +1,393 @@
+diff --git a/src/compiler/glsl/meson.build b/src/compiler/glsl/meson.build
+index 3b3ec27..33e8703 100644
+--- a/src/compiler/glsl/meson.build
++++ b/src/compiler/glsl/meson.build
+@@ -20,6 +20,8 @@
+
+ subdir('glcpp')
+
++prog_echo = find_program('echo')
++
+ glsl_parser = custom_target(
+ 'glsl_parser',
+ input : 'glsl_parser.yy',
+@@ -38,19 +40,25 @@ glsl_lexer_cpp = custom_target(
+ )
+
+ ir_expression_operation_constant_h = custom_target(
+- 'ir_expression_operation_constant.h',
+- input : 'ir_expression_operation.py',
+- output : 'ir_expression_operation_constant.h',
+- command : [prog_python, '@INPUT@', 'constant'],
++ 'ir_expression_operation_constant.h_bla',
++# input : 'ir_expression_operation.py',
++# output : 'ir_expression_operation_constant.h',
++# command : [prog_python, '@INPUT@', 'constant'],
++ input : files(),
++ output : 'ir_expression_operation_constant.h_bla',
++ command : [prog_echo],
+ capture : true,
+ build_always_stale : false,
+ )
+
+ ir_expression_operation_strings_h = custom_target(
+- 'ir_expression_operation_strings.h',
+- input : 'ir_expression_operation.py',
++ 'ir_expression_operation_strings.h_bla',
++# input : 'ir_expression_operation.py',
++# output : 'ir_expression_operation_strings.h',
++# command : [prog_python, '@INPUT@', 'strings'],
++ input : files(),
+ output : 'ir_expression_operation_strings.h',
+- command : [prog_python, '@INPUT@', 'strings'],
++ command : [prog_echo],
+ capture : true,
+ build_always_stale : false,
+ )
+diff --git a/src/compiler/meson.build b/src/compiler/meson.build
+index ff254b6..6debfb9 100644
+--- a/src/compiler/meson.build
++++ b/src/compiler/meson.build
+@@ -18,6 +18,8 @@
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ # SOFTWARE.
+
++prog_echo = find_program('echo')
++
+ inc_compiler = include_directories('.')
+ inc_nir = include_directories('nir')
+ inc_glsl = include_directories('glsl')
+@@ -38,11 +40,14 @@ files_libcompiler = files(
+
+ ir_expression_operation_h = custom_target(
+ 'ir_expression_operation.h',
+- input : 'glsl/ir_expression_operation.py',
+- output : 'ir_expression_operation.h',
+- command : [prog_python, '@INPUT@', 'enum'],
++# input : 'glsl/ir_expression_operation.py',
++# output : 'ir_expression_operation.h',
++# command : [prog_python, '@INPUT@', 'enum'],
+ capture : true,
+ build_always_stale : false,
++ input : files(),
++ output : 'ir_expression_operation.h',
++ command : [prog_echo],
+ )
+
+ libcompiler = static_library(
+diff --git a/src/compiler/nir/meson.build b/src/compiler/nir/meson.build
+index e6784fc..a6aedfb 100644
+--- a/src/compiler/nir/meson.build
++++ b/src/compiler/nir/meson.build
+@@ -18,70 +18,93 @@
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ # SOFTWARE.
+
++prog_echo = find_program('echo')
++
+ nir_depends = files('nir_opcodes.py', 'nir_intrinsics.py')
+
+ nir_builder_opcodes_h = custom_target(
+ 'nir_builder_opcodes.h',
+- input : 'nir_builder_opcodes_h.py',
++# input : 'nir_builder_opcodes_h.py',
++# output : 'nir_builder_opcodes.h',
++# command : [prog_python, '@INPUT@'],
++ input : files(),
+ output : 'nir_builder_opcodes.h',
+- command : [prog_python, '@INPUT@'],
++ command : [prog_echo],
+ capture : true,
+- depend_files : nir_depends,
++# depend_files : nir_depends,
+ )
+
+-nir_constant_expressions_c = custom_target(
+- 'nir_constant_expressions.c',
+- input : 'nir_constant_expressions.py',
+- output : 'nir_constant_expressions.c',
+- command : [prog_python, '@INPUT@'],
+- capture : true,
+- depend_files : nir_depends,
+-)
++#nir_constant_expressions_c = custom_target(
++# 'nir_constant_expressions.c',
++# input : 'nir_constant_expressions.py',
++# output : 'nir_constant_expressions.c',
++# command : [prog_python, '@INPUT@'],
++# input : files(),
++# output : 'nir_constant_expressions.c',
++# command : [prog_echo],
++# capture : true,
++# depend_files : nir_depends,
++#)
+
+ nir_opcodes_h = custom_target(
+ 'nir_opcodes.h',
+- input : 'nir_opcodes_h.py',
++# input : 'nir_opcodes_h.py',
++# output : 'nir_opcodes.h',
++# command : [prog_python, '@INPUT@'],
++ input : files(),
+ output : 'nir_opcodes.h',
+- command : [prog_python, '@INPUT@'],
++ command : [prog_echo],
+ capture : true,
+- depend_files : nir_depends,
++# depend_files : nir_depends,
+ )
+
+-nir_opcodes_c = custom_target(
+- 'nir_opcodes.c',
+- input : 'nir_opcodes_c.py',
+- output : 'nir_opcodes.c',
+- command : [prog_python, '@INPUT@'],
+- capture : true,
+- depend_files : nir_depends,
+-)
++#nir_opcodes_c = custom_target(
++# 'nir_opcodes.c',
++# input : 'nir_opcodes_c.py',
++# output : 'nir_opcodes.c',
++# command : [prog_python, '@INPUT@'],
++# input : files(),
++# output : 'nir_opcodes.c',
++# command : [prog_echo],
++# capture : true,
++# depend_files : nir_depends,
++#)
+
+-nir_opt_algebraic_c = custom_target(
+- 'nir_opt_algebraic.c',
+- input : 'nir_opt_algebraic.py',
+- output : 'nir_opt_algebraic.c',
+- command : [prog_python, '@INPUT@'],
+- capture : true,
+- depend_files : files('nir_algebraic.py'),
+-)
++#nir_opt_algebraic_c = custom_target(
++# 'nir_opt_algebraic.c',
++# input : 'nir_opt_algebraic.py',
++# output : 'nir_opt_algebraic.c',
++# command : [prog_python, '@INPUT@'],
++# input : files(),
++# output : 'nir_opt_algebraic.c',
++# command : [prog_echo],
++# capture : true,
++# depend_files : files('nir_algebraic.py'),
++#)
+
+ nir_intrinsics_h = custom_target(
+ 'nir_intrinsics.h',
+- input : 'nir_intrinsics_h.py',
++# input : 'nir_intrinsics_h.py',
++# output : 'nir_intrinsics.h',
++# command : [prog_python, '@INPUT@', '--outdir', meson.current_build_dir()],
++ input : files(),
+ output : 'nir_intrinsics.h',
+- command : [prog_python, '@INPUT@', '--outdir', meson.current_build_dir()],
++ command : [prog_echo],
+ capture : false,
+- depend_files : files('nir_intrinsics.py'),
++# depend_files : files('nir_intrinsics.py'),
+ )
+
+-nir_intrinsics_c = custom_target(
+- 'nir_intrinsic.c',
+- input : 'nir_intrinsics_c.py',
+- output : 'nir_intrinsics.c',
+- command : [prog_python, '@INPUT@', '--outdir', meson.current_build_dir()],
+- capture: false,
+- depend_files : files('nir_intrinsics.py'),
+-)
++#nir_intrinsics_c = custom_target(
++# 'nir_intrinsics.c',
++# input : 'nir_intrinsics_c.py',
++# output : 'nir_intrinsics.c',
++# command : [prog_python, '@INPUT@', '--outdir', meson.current_build_dir()],
++# input : files(),
++# output : 'nir_intrinsics.c',
++# command : [prog_echo],
++# capture: false,
++# depend_files : files('nir_intrinsics.py'),
++#)
+
+ files_libnir = files(
+ 'nir.c',
+@@ -91,6 +114,7 @@ files_libnir = files(
+ 'nir_builtin_builder.h',
+ 'nir_clone.c',
+ 'nir_constant_expressions.h',
++ 'nir_constant_expressions.c',
+ 'nir_control_flow.c',
+ 'nir_control_flow.h',
+ 'nir_control_flow_private.h',
+@@ -105,6 +129,7 @@ files_libnir = files(
+ 'nir_inline_functions.c',
+ 'nir_instr_set.c',
+ 'nir_instr_set.h',
++ 'nir_intrinsics.c',
+ 'nir_linking_helpers.c',
+ 'nir_liveness.c',
+ 'nir_loop_analyze.c',
+@@ -156,6 +181,8 @@ files_libnir = files(
+ 'nir_move_load_const.c',
+ 'nir_move_vec_src_uses_to_dest.c',
+ 'nir_normalize_cubemap_coords.c',
++ 'nir_opcodes.c',
++ 'nir_opt_algebraic.c',
+ 'nir_opt_conditional_discard.c',
+ 'nir_opt_constant_folding.c',
+ 'nir_opt_copy_prop_vars.c',
+@@ -206,11 +233,13 @@ files_libnir = files(
+ '../spirv/nir_spirv.h',
+ '../spirv/spirv.h',
+ '../spirv/spirv_info.h',
++ '../spirv/spirv_info.c',
+ '../spirv/spirv_to_nir.c',
+ '../spirv/vtn_alu.c',
+ '../spirv/vtn_amd.c',
+ '../spirv/vtn_cfg.c',
+ '../spirv/vtn_glsl450.c',
++ '../spirv/vtn_gather_types.c',
+ '../spirv/vtn_private.h',
+ '../spirv/vtn_subgroup.c',
+ '../spirv/vtn_variables.c',
+@@ -218,9 +247,12 @@ files_libnir = files(
+
+ libnir = static_library(
+ 'nir',
+- [files_libnir, spirv_info_c, nir_opt_algebraic_c, nir_opcodes_c,
+- nir_opcodes_h, nir_constant_expressions_c, nir_builder_opcodes_h,
+- vtn_gather_types_c, nir_intrinsics_c, nir_intrinsics_h],
++# [files_libnir, spirv_info_c, nir_opt_algebraic_c, nir_opcodes_c,
++# nir_opcodes_h, nir_constant_expressions_c, nir_builder_opcodes_h,
++# vtn_gather_types_c, nir_intrinsics_c, nir_intrinsics_h],
++ [files_libnir,
++ nir_opcodes_h, nir_builder_opcodes_h,
++ nir_intrinsics_h],
+ include_directories : [inc_common, inc_compiler, include_directories('../spirv')],
+ c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
+ link_with : libcompiler,
+diff --git a/src/compiler/spirv/meson.build b/src/compiler/spirv/meson.build
+index c91d12a..b0e6f1e 100644
+--- a/src/compiler/spirv/meson.build
++++ b/src/compiler/spirv/meson.build
+@@ -18,16 +18,24 @@
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ # SOFTWARE.
+
+-vtn_gather_types_c = custom_target(
+- 'vtn_gather_types.c',
+- input : files('vtn_gather_types_c.py', 'spirv.core.grammar.json'),
+- output : 'vtn_gather_types.c',
+- command : [prog_python, '@INPUT0@', '@INPUT1@', '@OUTPUT@'],
+-)
++prog_echo = find_program('echo')
+
+-spirv_info_c = custom_target(
+- 'spirv_info.c',
+- input : files('spirv_info_c.py', 'spirv.core.grammar.json'),
+- output : 'spirv_info.c',
+- command : [prog_python, '@INPUT0@', '@INPUT1@', '@OUTPUT@'],
+-)
++#vtn_gather_types_c = custom_target(
++# 'vtn_gather_types.c_bla',
++# input : files('vtn_gather_types_c.py', 'spirv.core.grammar.json'),
++# output : 'vtn_gather_types.c',
++# command : [prog_python, '@INPUT0@', '@INPUT1@', '@OUTPUT@'],
++# input : files(),
++# output : 'vtn_gather_types.c_bla',
++# command : [prog_echo],
++#)
++
++#spirv_info_c = custom_target(
++# 'spirv_info.c',
++# input : files('spirv_info_c.py', 'spirv.core.grammar.json'),
++# output : 'spirv_info.c',
++# command : [prog_python, '@INPUT0@', '@INPUT1@', '@OUTPUT@'],
++# input : files(),
++# output : 'spirv_info.c',
++# command : [prog_echo],
++#)
+diff --git a/src/mesa/meson.build b/src/mesa/meson.build
+index 27c8c40..617f729 100644
+--- a/src/mesa/meson.build
++++ b/src/mesa/meson.build
+@@ -21,6 +21,8 @@
+ subdir('program')
+ subdir('main')
+
++prog_echo = find_program('echo')
++
+ # files shared between classic mesa and gallium mesa
+ files_libmesa_common = files(
+ 'program/arbprogparse.c',
+@@ -663,13 +665,16 @@ elif with_asm_arch == 'sparc'
+ inc_libmesa_asm = include_directories('sparc')
+ endif
+
+-format_fallback_c = custom_target(
+- 'format_fallback.c',
+- input : ['main/format_fallback.py', 'main/formats.csv'],
+- output : 'format_fallback.c',
+- command : [prog_python, '@INPUT0@', '@INPUT1@', '@OUTPUT@'],
+- depend_files : files('main/format_parser.py'),
+-)
++#format_fallback_c = custom_target(
++# 'format_fallback.c',
++# input : ['main/format_fallback.py', 'main/formats.csv'],
++# output : 'format_fallback.c',
++# command : [prog_python, '@INPUT0@', '@INPUT1@', '@OUTPUT@'],
++# input : files(),
++# output : 'format_fallback.c',
++# command : [prog_echo],
++# depend_files : files('main/format_parser.py'),
++#)
+
+ get_hash_h = custom_target(
+ 'get_hash.h',
+@@ -680,25 +685,30 @@ get_hash_h = custom_target(
+ capture : true,
+ )
+
+-foreach x : [['format_info.h', 'format_info.py'],
+- ['format_pack.c', 'format_pack.py'],
+- ['format_unpack.c', 'format_unpack.py']]
+- files_libmesa_common += custom_target(
+- x[0],
+- input : ['main/@0@'.format(x[1]), 'main/formats.csv'],
+- output : x[0],
+- command : [prog_python, '@INPUT0@', '@INPUT1@'],
+- depend_files : files('main/format_parser.py'),
+- capture : true,
+- )
+-endforeach
++#foreach x : [['format_info.h', 'format_info.py'],
++# ['format_pack.c', 'format_pack.py'],
++# ['format_unpack.c', 'format_unpack.py']]
++# files_libmesa_common += custom_target(
++# x[0],
++# input : ['main/@0@'.format(x[1]), 'main/formats.csv'],
++# output : x[0],
++# command : [prog_python, '@INPUT0@', '@INPUT1@'],
++# depend_files : files('main/format_parser.py'),
++# input : files(),
++# output : x[0],
++# command : [prog_echo],
++# capture : true,
++# )
++#endforeach
+
+ files_libmesa_common += [
+ mesa_lex,
+ program_parse_tab,
+ main_api_exec_c,
+ main_enums_c,
+- format_fallback_c,
++ 'main/format_fallback.c',
++ 'main/format_pack.c',
++ 'main/format_unpack.c',
+ get_hash_h,
+ main_marshal_generated_c,
+ main_marshal_generated_h,
Regards,
Peter
>
> Best regards,
> Romain
>
> >
> > Regards,
> > Peter
> >
> > BR2_arm=y
> > BR2_cortex_a9=y
> > BR2_ARM_ENABLE_NEON=y
> > BR2_ARM_ENABLE_VFP=y
> > BR2_ARM_FPU_VFPV3=y
> > BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
> > BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y
> > BR2_BINUTILS_VERSION_2_32_X=y
> > BR2_GCC_VERSION_8_X=y
> > BR2_TOOLCHAIN_BUILDROOT_CXX=y
> > BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
> > BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1"
> > BR2_ROOTFS_POST_BUILD_SCRIPT="board/boundarydevices/common/post-build.sh"
> > BR2_ROOTFS_POST_IMAGE_SCRIPT="board/boundarydevices/common/post-image.sh"
> > BR2_LINUX_KERNEL=y
> > BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
> > BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/linux-imx6/archive/2aef1ef6.tar.gz"
> > BR2_LINUX_KERNEL_DEFCONFIG="boundary"
> > BR2_LINUX_KERNEL_DTS_SUPPORT=y
> > BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6dl-nit6xlite imx6dl-nitrogen6_vm imx6dl-nitrogen6x imx6q-nitrogen6x imx6dl-nitrogen6_som2 imx6q-nitrogen6_som2 imx6qp-nitrogen6_som2 imx6q-nitrogen6_max imx6qp-nitrogen6_max imx6q-sabrelite"
> > BR2_LINUX_KERNEL_INSTALL_TARGET=y
> > BR2_PACKAGE_MESA3D=y
> > BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV=y
> > BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO=y
> > BR2_PACKAGE_MESA3D_OPENGL_ES=y
> > BR2_TARGET_ROOTFS_EXT2=y
> > BR2_TARGET_ROOTFS_EXT2_4=y
> > BR2_TARGET_UBOOT=y
> > BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
> > BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
> > BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/u-boot-imx6/archive/1530219d.tar.gz"
> > BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nitrogen6q"
> > BR2_TARGET_UBOOT_FORMAT_IMX=y
> > BR2_TARGET_UBOOT_BOOT_SCRIPT=y
> > BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/boundarydevices/common/boot.cmd"
> > BR2_PACKAGE_HOST_GENIMAGE=y
> > BR2_PACKAGE_HOST_UBOOT_TOOLS=y
> >
>
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [RFC v2 6/7] package/mesa3d: switch build system to meson
2019-04-30 21:14 ` Peter Seiderer
@ 2019-04-30 21:40 ` Bernd Kuhls
2019-05-06 9:57 ` Romain Naour
1 sibling, 0 replies; 12+ messages in thread
From: Bernd Kuhls @ 2019-04-30 21:40 UTC (permalink / raw)
To: buildroot
[posted and mailed]
Peter Seiderer <ps.report@gmx.net> wrote in
news:20190430231428.231ee566 at gmx.net:
> So use the glx option only in case platform x11 is selected?
Hi Peter,
even autoconf-based mesa3d enables glx only when x11 is used:
https://git.buildroot.net/buildroot/tree/package/mesa3d/mesa3d.mk#n85
Regards, Bernd
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [RFC v2 6/7] package/mesa3d: switch build system to meson
2019-04-30 21:14 ` Peter Seiderer
2019-04-30 21:40 ` Bernd Kuhls
@ 2019-05-06 9:57 ` Romain Naour
1 sibling, 0 replies; 12+ messages in thread
From: Romain Naour @ 2019-05-06 9:57 UTC (permalink / raw)
To: buildroot
Hi Peter,
Le 30/04/2019 ? 23:14, Peter Seiderer a ?crit?:
> Hello Romain,
>
> On Tue, 30 Apr 2019 13:14:55 +0200, Romain Naour <romain.naour@smile.fr> wrote:
>
>> Hi Peter, All
>>
>> Le 25/04/2019 ? 22:56, Peter Seiderer a ?crit?:
>>> Hello Bernd, Romain,
>>>
>>
>> [...]
>>
>>>
>>> Tested your patch series for i.mx6 (nitrogen6x_defconfig based), got the following
>>> configure failure (see defconfig below):
>>>
>>> [...]
>>> Host machine cpu family: arm
>>> Host machine cpu: cortex-a9
>>> Target machine cpu family: arm
>>> Target machine cpu: cortex-a9
>>> Build machine cpu family: x86_64
>>> Build machine cpu: x86_64
>>>
>>> meson.build:342:4: ERROR: Problem encountered: Cannot build GLX support without X11 platform support and at least one OpenGL API
>>>
>>> A full log can be found at .../build/mesa3d-19.0.2/build/meson-logs/meson-log.txt
>>> make[1]: *** [package/pkg-generic.mk:231: .../build/mesa3d-19.0.2/.stamp_configured]
>>>
>>> The configure failure could be 'fixed' by the following quick patch:
>>>
>>> diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
>>> index 5244545584..773defbfa1 100644
>>> --- a/package/mesa3d/mesa3d.mk
>>> +++ b/package/mesa3d/mesa3d.mk
>>> @@ -153,7 +153,7 @@ endif
>>>
>>> # Always enable OpenGL:
>>> # - it is needed for GLES (mesa3d's meson.build is a bit weird)
>>> -MESA3D_CONF_OPTS += -Dopengl=true -Dglx=dri
>>> +MESA3D_CONF_OPTS += -Dopengl=true
>>
>> Ack.
>> Also, I'll replace -Dglx=auto by -Dglx=dri which is the only option that can be
>> supported currently by the Buildroot package.
>> All other options (xlib and xlib-gallium) are not supported by the current
>> packaging.
>
> So use the glx option only in case platform x11 is selected?
>
>>
>>>
>>> # libva and mesa3d have a circular dependency
>>> # we do not need libva support in mesa3d, therefore disable this option
>>>
>>>
>>> With this patch applied the configure step succeeds, but the compile step
>>> fails with:
>>>
>>> [29/843] Generating vtn_gather_types.c with a custom command.
>>> FAILED: src/compiler/spirv/vtn_gather_types.c
>>> .../host/bin/python3 ../src/compiler/spirv/vtn_gather_types_c.py ../src/compiler/spirv/spirv.core.grammar.json src/compiler/spirv/vtn_gather_types.c
>>> Traceback (most recent call last):
>>> File "../src/compiler/spirv/vtn_gather_types_c.py", line 29, in <module>
>>> from mako.template import Template
>>> ModuleNotFoundError: No module named 'mako'
>>> [30/843] Generating spirv_info.c with a custom command.
>>> FAILED: src/compiler/spirv/spirv_info.c
>>> .../host/bin/python3 ../src/compiler/spirv/spirv_info_c.py ../src/compiler/spirv/spirv.core.grammar.json src/compiler/spirv/spirv_info.c
>>> Traceback (most recent call last):
>>> File "../src/compiler/spirv/spirv_info_c.py", line 29, in <module>
>>> from mako.template import Template
>>> ModuleNotFoundError: No module named 'mako'
>>> [35/843] Generating ir_expression_oper....h with a meson_exe.py custom command.
>>> FAILED: src/compiler/ir_expression_operation.h
>>> .../host/bin/meson --internal exe .../build/mesa3d-19.0.2/build/meson-private/meson_exe_python3_f99bf283dabcb83e5389be4bfb906240d67be6d7.dat
>>> Traceback (most recent call last):
>>> File "../src/compiler/glsl/ir_expression_operation.py", line 23, in <module>
>>> import mako.template
>>> ModuleNotFoundError: No module named 'mako'
>>> [36/843] Generating nir_constant_expre....c with a meson_exe.py custom command.
>>> FAILED: src/compiler/nir/nir_constant_expressions.c
>>> .../host/bin/meson --internal exe .../build/mesa3d-19.0.2/build/meson-private/meson_exe_python3_16aba73c258f517db1423ca1fcbcc47a6f58541b.dat
>>> Traceback (most recent call last):
>>> File "../src/compiler/nir/nir_constant_expressions.py", line 424, in <module>
>>> from mako.template import Template
>>> ModuleNotFoundError: No module named 'mako'
>>> [37/843] Generating nir_builder_opcodes.h with a meson_exe.py custom command.
>>> FAILED: src/compiler/nir/nir_builder_opcodes.h
>>> .../host/bin/meson --internal exe .../build/mesa3d-19.0.2/build/meson-private/meson_exe_python3_9519d8170e7bc8796b8caf294704c1ae9b9beb60.dat
>>> Traceback (most recent call last):
>>> File "../src/compiler/nir/nir_builder_opcodes_h.py", line 98, in <module>
>>> from mako.template import Template
>>> ModuleNotFoundError: No module named 'mako'
>>> [38/843] Generating nir_opcodes.h with a meson_exe.py custom command.
>>> FAILED: src/compiler/nir/nir_opcodes.h
>>> .../host/bin/meson --internal exe .../build/mesa3d-19.0.2/build/meson-private/meson_exe_python3_7d8bc70fe02c4d6671c051c06b6c456b05bca90c.dat
>>> Traceback (most recent call last):
>>> File "../src/compiler/nir/nir_opcodes_h.py", line 45, in <module>
>>> from mako.template import Template
>>> ModuleNotFoundError: No module named 'mako'
>>> [45/843] Generating format_srgb with a meson_exe.py custom command.
>>> ninja: build stopped: subcommand failed.
>>> make[1]: *** [package/pkg-generic.mk:241: .../build/mesa3d-19.0.2/.stamp_built] Error 1
>>>
>>>
>>> Seems the patch 0002-meson-use-generated-files-if-already-present-in-the-.patch is
>>> not enough to prevent all python-mako based file generation calls...
>>
>> Indeed, this doesn't work when some drivers (like etnaviv) are enabled.
>>
>> I don't see other solution than adding a new package python3-mako like it was
>> done for python3-setuptools.
>> See: http://lists.busybox.net/pipermail/buildroot/2019-April/247707.html
>>
>> It's pity that the meson build system can't use existing generated files present
>> in the release archive.
>
> Did a 'hack' patch to avoid file generation (not upstreamable, but for a first try):
>
I tried but it doesn't work for all cases.
Instead, I added a host-python3-mako package.
See http://patchwork.ozlabs.org/project/buildroot/list/?series=106301
Best regards,
Romain
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2019-05-06 9:57 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-17 21:43 [Buildroot] [RFC v2 1/7] package/mesa3d: rename OSMesa option Romain Naour
2019-04-17 21:43 ` [Buildroot] [RFC v2 2/7] package/mesa3d: add OSMesa classic needs dri swrast Romain Naour
2019-04-17 21:43 ` [Buildroot] [RFC v2 3/7] package/mesa3d: Only one swrast provider can be built Romain Naour
2019-04-17 21:43 ` [Buildroot] [RFC v2 4/7] package/mesa3d: add xvmc option Romain Naour
2019-04-17 21:43 ` [Buildroot] [RFC v2 5/7] package/mesa3d: Gallium xa state tracker is only available for nouveau and svga Gallium drivers Romain Naour
2019-04-17 21:43 ` [Buildroot] [RFC v2 6/7] package/mesa3d: switch build system to meson Romain Naour
2019-04-25 20:56 ` Peter Seiderer
2019-04-30 11:14 ` Romain Naour
2019-04-30 21:14 ` Peter Seiderer
2019-04-30 21:40 ` Bernd Kuhls
2019-05-06 9:57 ` Romain Naour
2019-04-17 21:43 ` [Buildroot] [RFC v2 7/7] package/mesa3d: select kmsro for etnaviv Romain Naour
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox