Skip to contentSkip to conversation

package/python-numpy: add host variant for piglit

PATCH Superseded Romain Naour 4 participants 12 messages Feb 11, 2018 – Sep 18, 2018

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/3 package/python-numpy: add host variant for piglit

host-python-numpy is required by piglit buildsystem for crosscompiling.

---
 package/python-numpy/python-numpy.mk | 1 +
 1 file changed, 1 insertion(+)
package/python-numpy/python-numpy.mk +1 -0
index d0d38371a3..35878ac129 100644
@@ -31,3 +31,4 @@ endef
 PYTHON_NUMPY_INSTALL_STAGING = YES
 
 $(eval $(python-package))
+$(eval $(host-python-package))
Signature · 1 line
2.14.3
#1 lore raw

PATCH v2 2/3 package/waffle: new package

Backport an upstream patch fixing a build issue with musl toolchains. Add a new patch fixing build with Wayand without X11.

---
v2: select xlib_libX11 if X11 (ThomasP)
add OpenGL ES runtime dependency (ThomasP)

---
 DEVELOPERS                                         |  1 +
 package/Config.in                                  |  1 +
 ...-threads-Use-PTHREAD_MUTEX_RECURSIVE-by-d.patch | 54 ++++++++++++++++++++++
 ...rd-cflags-from-.pc-files-to-waffle-cflags.patch | 40 ++++++++++++++++
 package/waffle/Config.in                           | 35 ++++++++++++++
 package/waffle/waffle.hash                         |  3 ++
 package/waffle/waffle.mk                           | 48 +++++++++++++++++++
 7 files changed, 182 insertions(+)
 create mode 100644 package/waffle/0001-third_party-threads-Use-PTHREAD_MUTEX_RECURSIVE-by-d.patch
 create mode 100644 package/waffle/0002-cmake-forward-cflags-from-.pc-files-to-waffle-cflags.patch
 create mode 100644 package/waffle/Config.in
 create mode 100644 package/waffle/waffle.hash
 create mode 100644 package/waffle/waffle.mk
DEVELOPERS +1 -0
index 293bd73797..0e19f6a94e 100644
@@ -1519,6 +1519,7 @@ F:	package/supertux/
 F:	package/supertuxkart/
 F:	package/terminology/
 F:	package/upower/
+F:	package/waffle/
 F:	package/xenomai/
 
 N:	Romain Perier <[email protected]>
package/Config.in +1 -0
index 19dda8aad9..0622ec49b4 100644
@@ -1167,6 +1167,7 @@ menu "Graphics"
 	source "package/poppler/Config.in"
 	source "package/powervr/Config.in"
 	source "package/tiff/Config.in"
+	source "package/waffle/Config.in"
 	source "package/wayland/Config.in"
 	source "package/wayland-protocols/Config.in"
 	source "package/waylandpp/Config.in"
package/waffle/0001-third_party-threads-Use-PTHREAD_MUTEX_RECURSIVE-by-d.patch new file +54 -0

54 lines not on this page · raw message

package/waffle/0002-cmake-forward-cflags-from-.pc-files-to-waffle-cflags.patch new file +40 -0
new file mode 100644
index 0000000000..ffc1b5b8b1
@@ -0,0 +1,40 @@
+From 8b0ae49c8bea78df73c3ecae0059d54a95c561fa Mon Sep 17 00:00:00 2001
+From: Romain Naour <[email protected]>
+Date: Sun, 24 Dec 2017 00:11:45 +0100
+Subject: [PATCH] cmake: forward cflags from *.pc files to waffle cflags
+
+When building mesa egl without x11 and gles2 the headers need a
+MESA_EGL_NO_X11_HEADERS define to avoid including X11 headers.
+
+This define MESA_EGL_NO_X11_HEADERS  is lost while building waffle
+since CGLAGS defined by pc files are not used.
+
+MESA_EGL_NO_X11_HEADERS is defined in CFLAGS from egl.pc.
+
+Signed-off-by: Romain Naour <[email protected]>
+---
+ src/waffle/CMakeLists.txt | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/src/waffle/CMakeLists.txt b/src/waffle/CMakeLists.txt
+index d76e029..2ff72c8 100644
+--- a/src/waffle/CMakeLists.txt
++++ b/src/waffle/CMakeLists.txt
+@@ -5,6 +5,14 @@
+ add_definitions(
+     -DWAFFLE_API_VERSION=${waffle_api_version}
+     -DWAFFLE_API_EXPERIMENTAL
++    ${egl_CFLAGS}
++    ${gbm_CFLAGS}
++    ${gl_CFLAGS}
++    ${GLEXT_CFLAGS}
++    ${libudev_CFLAGS}
++    ${wayland-client_CFLAGS}
++    ${wayland-egl_CFLAGS}
++    ${x11-xcb_CFLAGS}
+     )
+ 
+ include_directories(
+-- 
+2.14.3
+
package/waffle/Config.in new file +35 -0
new file mode 100644
index 0000000000..ed30724214
@@ -0,0 +1,35 @@
+comment "waffle needs an OpenGL GL or EGL provider w/ an OpenGL ES provider"
+	depends on BR2_PACKAGE_XORG7 || BR2_PACKAGE_WAYLAND
+	depends on !BR2_PACKAGE_HAS_LIBGLES
+	depends on !BR2_PACKAGE_HAS_LIBGL && !BR2_PACKAGE_HAS_LIBEGL
+
+config BR2_PACKAGE_WAFFLE
+	bool "waffle"
+	depends on BR2_PACKAGE_XORG7 || BR2_PACKAGE_WAYLAND
+	depends on BR2_PACKAGE_HAS_LIBGL || BR2_PACKAGE_HAS_LIBEGL
+	# OpenGL ES (1,2,3) libraries are loaded at runtime when needed
+	# in addition to LIBGL or LIBEGL.
+	depends on BR2_PACKAGE_HAS_LIBGLES
+	select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_XORG7
+	help
+	  Waffle is a cross-platform library that allows one to defer
+	  selection of an OpenGL API and of window system until
+	  runtime. For example, on Linux, Waffle enables an application
+	  to select X11/EGL with an OpenGL 3.3 core profile, Wayland
+	  with OpenGL ES2, and other window system / API combinations.
+
+	  Waffle's immediate goal is to enable Piglit [1] to test
+	  multiple OpenGL flavors in a cross-platform way, and to allow
+	  each Piglit test to choose its OpenGL API and window system
+	  at runtime. A future goal is to enable the ability to record
+	  (with another tool such APITrace [2]) an application's OpenGL
+	  calls on one operating system or window system, and then
+	  replay that trace on a different system.
+
+	  For more information, visit to Waffle's website.
+
+	  [1] http://piglit.freedesktop.org
+	  [2] http://github.com/apitrace/apitrace#readme
+
+	  http://www.waffle-gl.org
package/waffle/waffle.hash new file +3 -0
new file mode 100644
index 0000000000..5dfb976f2f
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 d662f6743f688dc5ea4b7d29f558eb54bd8f57350080f04a006693d22e5d1d5b  waffle-v1.5.2.tar.gz
+sha256 630844d1911c8a1b7b888a1de9097c4860b7e381362fd5aa64141d58ab7ecc9b  LICENSE.txt
package/waffle/waffle.mk new file +48 -0

48 lines not on this page · raw message

Signature · 1 line
2.14.3
#3 lore raw

PATCH v2 2/3 package/waffle: new package

In reply to Romain Naour

Hello Romain,

Quoted 4 lines · Romain Naour

Backport an upstream patch fixing a build issue with musl toolchains. Add a new patch fixing build with Wayand without X11.

I finally took some time to look at this package again, and I think the dependencies are not correctly handled.

package/waffle/Config.in line 8

Quoted 3 lines
package/waffle/Config.in new file +3 -0
+config BR2_PACKAGE_WAFFLE
+	bool "waffle"
+	depends on BR2_PACKAGE_XORG7 || BR2_PACKAGE_WAYLAND

Due to this dependency, you cannot do a build which has just mesa3d as a gbm/egl provider + udev, which is a valid configuration supported by waffle.

I.e, the following defconfig builds waffle properly:

BR2_arm=y
BR2_cortex_a8=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_INIT_NONE=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST=y
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
BR2_PACKAGE_WAFFLE=y
# BR2_TARGET_ROOTFS_TAR is not set

package/waffle/Config.in line 12

Quoted 4 lines
package/waffle/Config.in new file +4 -0
+	depends on BR2_PACKAGE_HAS_LIBGL || BR2_PACKAGE_HAS_LIBEGL
+	# OpenGL ES (1,2,3) libraries are loaded at runtime when needed
+	# in addition to LIBGL or LIBEGL.
+	depends on BR2_PACKAGE_HAS_LIBGLES

This dependency means that you cannot build waffle at all if there's no GLES support. Therefore a desktop configuration that provides GL will not allow building waffle. That's not good.

Looking more closely into the Waffle build system, it has four "backends", each having their own dependencies. At least one "backend" must be enabled, otherwise Waffle will refuse to build. The "backends" are:

- glx, which needs full OpenGL + x11-xcb
- wayland, which needs wayland-client, wayland-egl and EGL
- x11-egl, which needs x11-xcb and EGL
- gbm, which needs gbm, libudev and EGL

So the easiest is perhaps to map this to hidden Config.in options, maybe something like:

config BR2_PACKAGE_WAFFLE_SUPPORTS_GLX

	bool
	default y if BR2_PACKAGE_HAS_LIBGL && BR2_PACKAGE_XORG7

config BR2_PACKAGE_WAFFLE_SUPPORTS_WAYLAND

	bool
	default y if BR2_PACKAGE_WAYLAND && BR2_PACKAGE_HAS_LIBEGL_WAYLAND

config BR2_PACKAGE_WAFFLE_SUPPORTS_X11_EGL

	bool
	default y if BR2_PACKAGE_HAS_LIBEGL && BR2_PACKAGE_XORG7

config BR2_PACKAGE_WAFFLE_SUPPORTS_GBM
bool
# mesa3d is for now the only GBM provider, and it is enabled
# together with its EGL support
default y if BR2_PACKAGE_HAS_LIBEGL && BR2_PACKAGE_MESA3D_OPENGL_EGL && BR2_PACKAGE_HAS_UDEV

config BR2_PACKAGE_WAFFLE

	bool "waffle"
	depends on BR2_PACKAGE_WAFFLE_SUPPORTS_GLX || \
		BR2_PACKAGE_WAFFLE_SUPPORTS_WAYLAND || \
		BR2_PACKAGE_WAFFLE_SUPPORTS_X11_EGL || \
		BR2_PACKAGE_WAFFLE_SUPPORTS_GBM
	select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_WAFFLE_SUPPORTS_GLX || BR2_PACKAGE_WAFFLE_SUPPORTS_X11_EGL
	select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_WAFFLE_SUPPORTS_GLX || BR2_PACKAGE_WAFFLE_SUPPORTS_X11_EGL

I don't think we need a Config.in comment to document those dependencies. They are anyway waaaay too complicated to be summarized in a Config.in comment.

Quoted 25 lines
package/waffle/waffle.hash new file +3 -0
new file mode 100644
index 0000000000..5dfb976f2f
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 d662f6743f688dc5ea4b7d29f558eb54bd8f57350080f04a006693d22e5d1d5b  waffle-v1.5.2.tar.gz
+sha256 630844d1911c8a1b7b888a1de9097c4860b7e381362fd5aa64141d58ab7ecc9b  LICENSE.txt
package/waffle/waffle.mk new file +10 -0
new file mode 100644
index 0000000000..741bc8e349
@@ -0,0 +1,48 @@
+################################################################################
+#
+# waffle
+#
+################################################################################
+
+WAFFLE_VERSION = v1.5.2
+WAFFLE_SITE = $(call github,waffle-gl,waffle,$(WAFFLE_VERSION))
+WAFFLE_INSTALL_STAGING = YES
+WAFFLE_LICENSE = BSD-2-Clause

package/waffle/waffle.mk line 20

Quoted 10 lines
package/waffle/waffle.mk new file +10 -0
+WAFFLE_LICENSE_FILES = LICENSE.txt
+
+WAFFLE_DEPENDENCIES = host-pkgconf
+
+WAFFLE_CONF_OPTS = -Dwaffle_build_tests=OFF \
+	-Dwaffle_build_examples=OFF \
+	-Dwaffle_build_manpages=OFF \
+	-Dwaffle_build_htmldocs=OFF
+
+ifeq ($(BR2_PACKAGE_WAYLAND)$(BR2_PACKAGE_HAS_LIBEGL_WAYLAND),yy)

You can replace this condition with BR2_PACKAGE_WAFFLE_SUPPORTS_WAYLAND.

package/waffle/waffle.mk line 27

Quoted 7 lines
package/waffle/waffle.mk new file +7 -0
+WAFFLE_DEPENDENCIES += libegl wayland
+WAFFLE_CONF_OPTS += -Dwaffle_has_wayland=ON
+else
+WAFFLE_CONF_OPTS += -Dwaffle_has_wayland=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_XLIB_LIBX11)$(BR2_PACKAGE_LIBXCB)$(BR2_PACKAGE_HAS_LIBEGL),yyy)

This one by BR2_PACKAGE_WAFFLE_SUPPORTS_X11_EGL

package/waffle/waffle.mk line 34

Quoted 7 lines
package/waffle/waffle.mk new file +7 -0
+WAFFLE_DEPENDENCIES += libegl libxcb xlib_libX11
+WAFFLE_CONF_OPTS += -Dwaffle_has_x11_egl=ON
+else
+WAFFLE_CONF_OPTS += -Dwaffle_has_x11_egl=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_XLIB_LIBX11)$(BR2_PACKAGE_LIBXCB)$(BR2_PACKAGE_HAS_LIBGL),yyy)

This one by BR2_PACKAGE_WAFFLE_SUPPORTS_GLX

package/waffle/waffle.mk line 41

Quoted 7 lines
package/waffle/waffle.mk new file +7 -0
+WAFFLE_DEPENDENCIES += libgl libxcb xlib_libX11
+WAFFLE_CONF_OPTS += -Dwaffle_has_glx=ON
+else
+WAFFLE_CONF_OPTS += -Dwaffle_has_glx=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL)$(BR2_PACKAGE_HAS_UDEV),yy)

And this one by BR2_PACKAGE_WAFFLE_SUPPORTS_GBM

package/waffle/waffle.mk line 42

Quoted 1 line
package/waffle/waffle.mk new file +1 -0
+WAFFLE_DEPENDENCIES += libegl mesa3d udev

I would say adding mesa3d here in the dependencies is a bit useless, because libegl is provided by mesa3d anyway when BR2_PACKAGE_MESA3D_OPENGL_EGL.

You had a "depends on BR2_PACKAGE_HAS_LIBGLES" because waffle can use OpenGLES. But it seems like a runtime dependency, not a build time dependency. Could you check this ?

Best regards,

Thomas

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

PATCH v2 2/3 package/waffle: new package

Hi Thomas,

Le 16/09/2018 ? 23:30, Thomas Petazzoni a ?crit?:

Quoted 10 lines

Hello Romain,

Quoted 4 lines · Romain Naour

Backport an upstream patch fixing a build issue with musl toolchains. Add a new patch fixing build with Wayand without X11.

I finally took some time to look at this package again, and I think the dependencies are not correctly handled.

Thank you :)

Quoted 55 lines

package/waffle/Config.in line 8

Quoted 4 lines
package/waffle/Config.in new file +3 -0
+config BR2_PACKAGE_WAFFLE
+	bool "waffle"
+	depends on BR2_PACKAGE_XORG7 || BR2_PACKAGE_WAYLAND

Due to this dependency, you cannot do a build which has just mesa3d as a gbm/egl provider + udev, which is a valid configuration supported by waffle.

I.e, the following defconfig builds waffle properly:

BR2_arm=y
BR2_cortex_a8=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_INIT_NONE=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST=y
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
BR2_PACKAGE_WAFFLE=y
# BR2_TARGET_ROOTFS_TAR is not set

package/waffle/Config.in line 12

Quoted 4 lines
package/waffle/Config.in new file +4 -0
+	depends on BR2_PACKAGE_HAS_LIBGL || BR2_PACKAGE_HAS_LIBEGL
+	# OpenGL ES (1,2,3) libraries are loaded at runtime when needed
+	# in addition to LIBGL or LIBEGL.
+	depends on BR2_PACKAGE_HAS_LIBGLES

This dependency means that you cannot build waffle at all if there's no GLES support. Therefore a desktop configuration that provides GL will not allow building waffle. That's not good.

Looking more closely into the Waffle build system, it has four "backends", each having their own dependencies. At least one "backend" must be enabled, otherwise Waffle will refuse to build. The "backends" are:

- glx, which needs full OpenGL + x11-xcb
- wayland, which needs wayland-client, wayland-egl and EGL
- x11-egl, which needs x11-xcb and EGL
- gbm, which needs gbm, libudev and EGL

So the easiest is perhaps to map this to hidden Config.in options, maybe something like:

config BR2_PACKAGE_WAFFLE_SUPPORTS_GLX

	bool
	default y if BR2_PACKAGE_HAS_LIBGL && BR2_PACKAGE_XORG7

config BR2_PACKAGE_WAFFLE_SUPPORTS_WAYLAND

	bool
	default y if BR2_PACKAGE_WAYLAND && BR2_PACKAGE_HAS_LIBEGL_WAYLAND

config BR2_PACKAGE_WAFFLE_SUPPORTS_X11_EGL

Quoted 8 lines
	bool
	default y if BR2_PACKAGE_HAS_LIBEGL && BR2_PACKAGE_XORG7

config BR2_PACKAGE_WAFFLE_SUPPORTS_GBM
bool
# mesa3d is for now the only GBM provider, and it is enabled
# together with its EGL support
default y if BR2_PACKAGE_HAS_LIBEGL && BR2_PACKAGE_MESA3D_OPENGL_EGL && BR2_PACKAGE_HAS_UDEV

I believe this comment will be not correct as soon as the libgbm virtual package will be merged.

Quoted 10 lines

config BR2_PACKAGE_WAFFLE

	bool "waffle"
	depends on BR2_PACKAGE_WAFFLE_SUPPORTS_GLX || \
		BR2_PACKAGE_WAFFLE_SUPPORTS_WAYLAND || \
		BR2_PACKAGE_WAFFLE_SUPPORTS_X11_EGL || \
		BR2_PACKAGE_WAFFLE_SUPPORTS_GBM
	select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_WAFFLE_SUPPORTS_GLX || BR2_PACKAGE_WAFFLE_SUPPORTS_X11_EGL
	select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_WAFFLE_SUPPORTS_GLX || BR2_PACKAGE_WAFFLE_SUPPORTS_X11_EGL
Quoted 3 lines

I don't think we need a Config.in comment to document those dependencies. They are anyway waaaay too complicated to be summarized in a Config.in comment.

agree

Quoted 71 lines
Quoted 26 lines
package/waffle/waffle.hash new file +3 -0
new file mode 100644
index 0000000000..5dfb976f2f
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 d662f6743f688dc5ea4b7d29f558eb54bd8f57350080f04a006693d22e5d1d5b  waffle-v1.5.2.tar.gz
+sha256 630844d1911c8a1b7b888a1de9097c4860b7e381362fd5aa64141d58ab7ecc9b  LICENSE.txt
package/waffle/waffle.mk new file +10 -0
new file mode 100644
index 0000000000..741bc8e349
@@ -0,0 +1,48 @@
+################################################################################
+#
+# waffle
+#
+################################################################################
+
+WAFFLE_VERSION = v1.5.2
+WAFFLE_SITE = $(call github,waffle-gl,waffle,$(WAFFLE_VERSION))
+WAFFLE_INSTALL_STAGING = YES
+WAFFLE_LICENSE = BSD-2-Clause

package/waffle/waffle.mk line 20

Quoted 10 lines
package/waffle/waffle.mk new file +10 -0
+WAFFLE_LICENSE_FILES = LICENSE.txt
+
+WAFFLE_DEPENDENCIES = host-pkgconf
+
+WAFFLE_CONF_OPTS = -Dwaffle_build_tests=OFF \
+	-Dwaffle_build_examples=OFF \
+	-Dwaffle_build_manpages=OFF \
+	-Dwaffle_build_htmldocs=OFF
+
+ifeq ($(BR2_PACKAGE_WAYLAND)$(BR2_PACKAGE_HAS_LIBEGL_WAYLAND),yy)

You can replace this condition with BR2_PACKAGE_WAFFLE_SUPPORTS_WAYLAND.

package/waffle/waffle.mk line 27

Quoted 7 lines
package/waffle/waffle.mk new file +7 -0
+WAFFLE_DEPENDENCIES += libegl wayland
+WAFFLE_CONF_OPTS += -Dwaffle_has_wayland=ON
+else
+WAFFLE_CONF_OPTS += -Dwaffle_has_wayland=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_XLIB_LIBX11)$(BR2_PACKAGE_LIBXCB)$(BR2_PACKAGE_HAS_LIBEGL),yyy)

This one by BR2_PACKAGE_WAFFLE_SUPPORTS_X11_EGL

package/waffle/waffle.mk line 34

Quoted 7 lines
package/waffle/waffle.mk new file +7 -0
+WAFFLE_DEPENDENCIES += libegl libxcb xlib_libX11
+WAFFLE_CONF_OPTS += -Dwaffle_has_x11_egl=ON
+else
+WAFFLE_CONF_OPTS += -Dwaffle_has_x11_egl=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_XLIB_LIBX11)$(BR2_PACKAGE_LIBXCB)$(BR2_PACKAGE_HAS_LIBGL),yyy)

This one by BR2_PACKAGE_WAFFLE_SUPPORTS_GLX

package/waffle/waffle.mk line 41

Quoted 7 lines
package/waffle/waffle.mk new file +7 -0
+WAFFLE_DEPENDENCIES += libgl libxcb xlib_libX11
+WAFFLE_CONF_OPTS += -Dwaffle_has_glx=ON
+else
+WAFFLE_CONF_OPTS += -Dwaffle_has_glx=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL)$(BR2_PACKAGE_HAS_UDEV),yy)

And this one by BR2_PACKAGE_WAFFLE_SUPPORTS_GBM

package/waffle/waffle.mk line 42

Quoted 1 line
package/waffle/waffle.mk new file +1 -0
+WAFFLE_DEPENDENCIES += libegl mesa3d udev
Quoted 7 lines

I would say adding mesa3d here in the dependencies is a bit useless, because libegl is provided by mesa3d anyway when BR2_PACKAGE_MESA3D_OPENGL_EGL.

You had a "depends on BR2_PACKAGE_HAS_LIBGLES" because waffle can use OpenGLES. But it seems like a runtime dependency, not a build time dependency. Could you check this ?

Sure, I'll respin these patches asap.

Best regards,
Romain

Quoted 5 lines

Best regards,

Thomas

#5 lore raw

PATCH v2 2/3 package/waffle: new package

Hello,

Quoted 8 lines · Romain Naour
Quoted 5 lines

config BR2_PACKAGE_WAFFLE_SUPPORTS_GBM
bool
# mesa3d is for now the only GBM provider, and it is enabled
# together with its EGL support
default y if BR2_PACKAGE_HAS_LIBEGL && BR2_PACKAGE_MESA3D_OPENGL_EGL && BR2_PACKAGE_HAS_UDEV

I believe this comment will be not correct as soon as the libgbm virtual package will be merged.

Indeed, but I wrote this example code for the current master, i.e without the libgbm virtual package merged. Once it is merged, it is not only the comment that will be wrong, but also the BR2_PACKAGE_MESA3D_OPENGL_EGL dependency that will have to be replaced by BR2_PACKAGE_HAS_LIBGBM.

Thanks,

Thomas

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

PATCH v2 3/3 package/piglit: new package

In reply to Romain Naour

Piglit is an open-source test suite for OpenGL implementations. It's an python3 script based around several tools like glxinfo, wflinfo, dmesg.

Even though waffle support can be replaced by freeglut, using pliglit with waffle is recommended since freeglut will be replaced by waffle.

---
Bernd, I'm Cc you since you're probably interested by piglit to test new mesa3d version.

v2: bump version

---
 DEVELOPERS                 |  1 +
 package/Config.in          |  1 +
 package/piglit/Config.in   | 35 +++++++++++++++++++++++
 package/piglit/piglit.hash |  6 ++++
 package/piglit/piglit.mk   | 69 ++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 112 insertions(+)
 create mode 100644 package/piglit/Config.in
 create mode 100644 package/piglit/piglit.hash
 create mode 100644 package/piglit/piglit.mk
DEVELOPERS +1 -0
index 0e19f6a94e..31831ef9ed 100644
@@ -1513,6 +1513,7 @@ F:	package/minetest/
 F:	package/minetest-game/
 F:	package/openpowerlink/
 F:	package/physfs/
+F:	package/piglit/
 F:	package/solarus/
 F:	package/stress-ng/
 F:	package/supertux/
package/Config.in +1 -0
index 0622ec49b4..7e653301d6 100644
@@ -113,6 +113,7 @@ menu "Debugging, profiling and benchmark"
 	source "package/nmon/Config.in"
 	source "package/oprofile/Config.in"
 	source "package/pax-utils/Config.in"
+	source "package/piglit/Config.in"
 	source "package/pv/Config.in"
 	source "package/racehound/Config.in"
 	source "package/ramsmp/Config.in"
package/piglit/Config.in new file +35 -0
new file mode 100644
index 0000000000..eaa19c17ba
@@ -0,0 +1,35 @@
+config BR2_PACKAGE_PIGLIT
+	bool "piglit"
+	depends on BR2_PACKAGE_XORG7 || BR2_PACKAGE_WAYLAND
+	depends on BR2_PACKAGE_HAS_LIBGL || BR2_PACKAGE_HAS_LIBEGL
+	depends on BR2_PACKAGE_PYTHON3 # python3 only script
+	depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
+	select BR2_PACKAGE_MESA3D_DEMOS # glxinfo
+	select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_XPROTO_GLPROTO if BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_ZLIB
+	select BR2_PACKAGE_LIBDRM if BR2_PACKAGE_HAS_LIBGL
+	select BR2_PACKAGE_LIBPNG
+	select BR2_PACKAGE_LIBXKBCOMMON if BR2_PACKAGE_WAYLAND
+	select BR2_PACKAGE_PYTHON_MAKO
+	select BR2_PACKAGE_PYTHON_NUMPY
+	select BR2_PACKAGE_PYTHON_SIX
+	select BR2_PACKAGE_PYTHON3_BZIP2
+	select BR2_PACKAGE_PYTHON3_PYEXPAT
+	select BR2_PACKAGE_PYTHON3_XZ
+	select BR2_PACKAGE_PYTHON3_ZLIB
+	select BR2_PACKAGE_UTIL_LINUX # runtime dependency
+	select BR2_PACKAGE_UTIL_LINUX_BINARIES # require real dmesg tool
+	select BR2_PACKAGE_WAFFLE # wflinfo
+	help
+	  Piglit is an open-source test suite for OpenGL
+	  implementations.
+
+	  https://piglit.freedesktop.org
+
+comment "piglit needs an OpenGL GL or EGL provider"
+	depends on BR2_PACKAGE_XORG7 || BR2_PACKAGE_WAYLAND
+	depends on BR2_PACKAGE_PYTHON3
+	depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
+	depends on !BR2_PACKAGE_HAS_LIBGL && !BR2_PACKAGE_HAS_LIBEGL
package/piglit/piglit.hash new file +6 -0
new file mode 100644
index 0000000000..cf5b46afae
@@ -0,0 +1,6 @@
+# Locally calculated
+sha256 7e9ba2d1282eab81bc9ac5dd6158190bc7015f063708926aa6bf6723f14f23d9  piglit-5153c0bd89ca78e4dd56cc0917930909fa085eb0.tar.gz
+sha256 dcc398730859aee7cc1d6aa57f526f8d181b47bb3a49830e85b5723d5bc2c3bc  COPYING
+sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  licences/GPL-2
+sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  licences/GPL-3
+sha256 b7993225104d90ddd8024fd838faf300bea5e83d91203eab98e29512acebd69c  licences/LGPL-2
package/piglit/piglit.mk new file +69 -0

69 lines not on this page · raw message

Signature · 1 line
2.14.3
#7 lore raw

PATCH v2 3/3 package/piglit: new package

Quoted 8 lines · Romain Naour

Piglit is an open-source test suite for OpenGL implementations. It's an python3 script based around several tools like glxinfo, wflinfo, dmesg.

Even though waffle support can be replaced by freeglut, using pliglit with waffle is recommended since freeglut will be replaced by waffle.

Quoted 8 lines

---
Bernd, I'm Cc you since you're probably interested by piglit to test new mesa3d version.

v2: bump version
---

Tested on AMD SUMO with Gallium r600 driver.

#8 lore raw

PATCH v2 3/3 package/piglit: new package

In reply to Romain Naour

Hi All,

Le 11/02/2018 ? 17:21, Romain Naour a ?crit?:

Quoted 16 lines

Piglit is an open-source test suite for OpenGL implementations. It's an python3 script based around several tools like glxinfo, wflinfo, dmesg.

Even though waffle support can be replaced by freeglut, using pliglit with waffle is recommended since freeglut will be replaced by waffle.

---
Bernd, I'm Cc you since you're probably interested by piglit to test new mesa3d version.

v2: bump version
---

[...]

package/piglit/Config.in line 6

Quoted 12 lines
package/piglit/Config.in new file +6 -0
new file mode 100644
index 0000000000..eaa19c17ba
@@ -0,0 +1,35 @@
+config BR2_PACKAGE_PIGLIT
+	bool "piglit"
+	depends on BR2_PACKAGE_XORG7 || BR2_PACKAGE_WAYLAND
+	depends on BR2_PACKAGE_HAS_LIBGL || BR2_PACKAGE_HAS_LIBEGL
+	depends on BR2_PACKAGE_PYTHON3 # python3 only script
+	depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS

Missing "depends on BR2_PACKAGE_HAS_LIBGLES" introduced in waffle package with the last respin.

Quoted 19 lines
package/piglit/Config.in new file +19 -0
+	select BR2_PACKAGE_MESA3D_DEMOS # glxinfo
+	select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_XPROTO_GLPROTO if BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_ZLIB
+	select BR2_PACKAGE_LIBDRM if BR2_PACKAGE_HAS_LIBGL
+	select BR2_PACKAGE_LIBPNG
+	select BR2_PACKAGE_LIBXKBCOMMON if BR2_PACKAGE_WAYLAND
+	select BR2_PACKAGE_PYTHON_MAKO
+	select BR2_PACKAGE_PYTHON_NUMPY
+	select BR2_PACKAGE_PYTHON_SIX
+	select BR2_PACKAGE_PYTHON3_BZIP2
+	select BR2_PACKAGE_PYTHON3_PYEXPAT
+	select BR2_PACKAGE_PYTHON3_XZ
+	select BR2_PACKAGE_PYTHON3_ZLIB
+	select BR2_PACKAGE_UTIL_LINUX # runtime dependency
+	select BR2_PACKAGE_UTIL_LINUX_BINARIES # require real dmesg tool
+	select BR2_PACKAGE_WAFFLE # wflinfo
+	help

package/piglit/Config.in line 35

Quoted 10 lines
package/piglit/Config.in new file +10 -0
+	  Piglit is an open-source test suite for OpenGL
+	  implementations.
+
+	  https://piglit.freedesktop.org
+
+comment "piglit needs an OpenGL GL or EGL provider"
+	depends on BR2_PACKAGE_XORG7 || BR2_PACKAGE_WAYLAND
+	depends on BR2_PACKAGE_PYTHON3
+	depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
+	depends on !BR2_PACKAGE_HAS_LIBGL && !BR2_PACKAGE_HAS_LIBEGL

The dependency comment should be updated accordingly.

Any reviewer ?

Best regards,
Romain

#9 lore raw

PATCH v2 3/3 package/piglit: new package

In reply to Romain Naour

Hello,

package/piglit/Config.in line 4

Quoted 10 lines · Romain Naour
package/piglit/Config.in new file +4 -0
new file mode 100644
index 0000000000..eaa19c17ba
@@ -0,0 +1,35 @@
+config BR2_PACKAGE_PIGLIT
+	bool "piglit"
+	depends on BR2_PACKAGE_XORG7 || BR2_PACKAGE_WAYLAND
+	depends on BR2_PACKAGE_HAS_LIBGL || BR2_PACKAGE_HAS_LIBEGL

So we would have to rework this to use the dependencies I have suggested for waffle. Maybe we need to simply "depends on BR2_PACKAGE_WAFFLE", because it is such a mess to express waffle dependencies in a correct way ?

If we don't do a "depends on BR2_PACKAGE_WAFFLE", we would have to replicate waffle dependencies, which is possible. But since for waffle I suggested to not add a Config.in comment about those dependencies because they are too complicated, we would also not have a Config.in comment about those dependencies in piglit. So having the "depends on BR2_PACKAGE_WAFFLE" is maybe good enough.

package/piglit/Config.in line 10

Quoted 3 lines
package/piglit/Config.in new file +3 -0
+	select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_XPROTO_GLPROTO if BR2_PACKAGE_XORG7

The xproto-glproto package no longer exists, this needs to be rebased.

Quoted 4 lines
package/piglit/Config.in new file +4 -0
+	select BR2_PACKAGE_ZLIB
+	select BR2_PACKAGE_LIBDRM if BR2_PACKAGE_HAS_LIBGL
+	select BR2_PACKAGE_LIBPNG
+	select BR2_PACKAGE_LIBXKBCOMMON if BR2_PACKAGE_WAYLAND

package/piglit/Config.in line 24

Quoted 10 lines
package/piglit/Config.in new file +10 -0
+	select BR2_PACKAGE_PYTHON_MAKO
+	select BR2_PACKAGE_PYTHON_NUMPY
+	select BR2_PACKAGE_PYTHON_SIX
+	select BR2_PACKAGE_PYTHON3_BZIP2
+	select BR2_PACKAGE_PYTHON3_PYEXPAT
+	select BR2_PACKAGE_PYTHON3_XZ
+	select BR2_PACKAGE_PYTHON3_ZLIB
+	select BR2_PACKAGE_UTIL_LINUX # runtime dependency
+	select BR2_PACKAGE_UTIL_LINUX_BINARIES # require real dmesg tool
+	select BR2_PACKAGE_WAFFLE # wflinfo

Well, I guess it needs waffle for more than wflinfo, no?

Quoted 16 lines
package/piglit/piglit.mk new file +10 -0
new file mode 100644
index 0000000000..c33a8f9022
@@ -0,0 +1,69 @@
+################################################################################
+#
+# piglit
+#
+################################################################################
+
+PIGLIT_VERSION = 5153c0bd89ca78e4dd56cc0917930909fa085eb0
+PIGLIT_SITE = https://anongit.freedesktop.org/git/piglit.git
+PIGLIT_SITE_METHOD = git
+PIGLIT_LICENSE = MIT (code), \

package/piglit/piglit.mk line 20

Quoted 10 lines
package/piglit/piglit.mk new file +10 -0
+	LGPL-2.0+ (libpiglit*.so), \
+	GPL-3.0 (tests/glslparsertest/glsl2/norsetto-*), \
+	GPL-2.0+ (tests/glslparsertest/glsl2/gst-gl-*), \
+	BSD-3-Clause (tests/glslparsertest/shaders/*)
+PIGLIT_LICENSE_FILES = COPYING licences/GPL-2 licences/GPL-3 licences/LGPL-2
+
+PIGLIT_DEPENDENCIES = host-pkgconf \
+	host-python-mako \
+	host-python-numpy \
+	host-python-six \

This is surprising, what does it do on the host during the build process that requires those tools ? Or is it that piglit generates a report on the target, and then provides a bunch of host tool to process such reports ?

Quoted 8 lines
package/piglit/piglit.mk new file +8 -0
+	libpng \
+	python-mako \
+	python-numpy \
+	python-six \
+	waffle \
+	zlib
+
+PIGLIT_CONF_OPTS += \

package/piglit/piglit.mk line 38

Quoted 10 lines
package/piglit/piglit.mk new file +10 -0
+	-DPIGLIT_USE_WAFFLE=ON \
+	-DPIGLIT_BUILD_CL_TESTS=OFF \
+	-DPIGLIT_BUILD_WGL_TESTS=OFF
+
+ifeq ($(BR2_PACKAGE_XORG7),y)
+# libxcb for xcb-dri2
+PIGLIT_DEPENDENCIES += \
+	xlib_libX11 \
+	xlib_libXext \
+	xproto_glproto \

Also needs adjustment now that xproto_glproto has been removed.

Other than those comments, looks pretty good to me.

Could you address those comments and send an updated version?

Thanks!

Thomas

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

PATCH v2 3/3 package/piglit: new package

Hi Thomas,

Le 16/09/2018 ? 23:38, Thomas Petazzoni a ?crit?:

Quoted 20 lines

Hello,

package/piglit/Config.in line 4

Quoted 10 lines · Romain Naour
package/piglit/Config.in new file +4 -0
new file mode 100644
index 0000000000..eaa19c17ba
@@ -0,0 +1,35 @@
+config BR2_PACKAGE_PIGLIT
+	bool "piglit"
+	depends on BR2_PACKAGE_XORG7 || BR2_PACKAGE_WAYLAND
+	depends on BR2_PACKAGE_HAS_LIBGL || BR2_PACKAGE_HAS_LIBEGL

So we would have to rework this to use the dependencies I have suggested for waffle. Maybe we need to simply "depends on BR2_PACKAGE_WAFFLE", because it is such a mess to express waffle dependencies in a correct way ?

Quoted 6 lines

If we don't do a "depends on BR2_PACKAGE_WAFFLE", we would have to replicate waffle dependencies, which is possible. But since for waffle I suggested to not add a Config.in comment about those dependencies because they are too complicated, we would also not have a Config.in comment about those dependencies in piglit. So having the "depends on BR2_PACKAGE_WAFFLE" is maybe good enough.

Ok

Quoted 6 lines

package/piglit/Config.in line 10

Quoted 4 lines
package/piglit/Config.in new file +3 -0
+	select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_XPROTO_GLPROTO if BR2_PACKAGE_XORG7

The xproto-glproto package no longer exists, this needs to be rebased.

Indeed, I noticed It while rebasing my development branch on master.

Quoted 17 lines
Quoted 5 lines
package/piglit/Config.in new file +4 -0
+	select BR2_PACKAGE_ZLIB
+	select BR2_PACKAGE_LIBDRM if BR2_PACKAGE_HAS_LIBGL
+	select BR2_PACKAGE_LIBPNG
+	select BR2_PACKAGE_LIBXKBCOMMON if BR2_PACKAGE_WAYLAND

package/piglit/Config.in line 24

Quoted 10 lines
package/piglit/Config.in new file +10 -0
+	select BR2_PACKAGE_PYTHON_MAKO
+	select BR2_PACKAGE_PYTHON_NUMPY
+	select BR2_PACKAGE_PYTHON_SIX
+	select BR2_PACKAGE_PYTHON3_BZIP2
+	select BR2_PACKAGE_PYTHON3_PYEXPAT
+	select BR2_PACKAGE_PYTHON3_XZ
+	select BR2_PACKAGE_PYTHON3_ZLIB
+	select BR2_PACKAGE_UTIL_LINUX # runtime dependency
+	select BR2_PACKAGE_UTIL_LINUX_BINARIES # require real dmesg tool
+	select BR2_PACKAGE_WAFFLE # wflinfo

Well, I guess it needs waffle for more than wflinfo, no?

It's correct, piglit link with libwaffle-1.

Quoted 24 lines
Quoted 24 lines
package/piglit/piglit.mk new file +17 -0
new file mode 100644
index 0000000000..c33a8f9022
@@ -0,0 +1,69 @@
+################################################################################
+#
+# piglit
+#
+################################################################################
+
+PIGLIT_VERSION = 5153c0bd89ca78e4dd56cc0917930909fa085eb0
+PIGLIT_SITE = https://anongit.freedesktop.org/git/piglit.git
+PIGLIT_SITE_METHOD = git
+PIGLIT_LICENSE = MIT (code), \
+	LGPL-2.0+ (libpiglit*.so), \
+	GPL-3.0 (tests/glslparsertest/glsl2/norsetto-*), \
+	GPL-2.0+ (tests/glslparsertest/glsl2/gst-gl-*), \
+	BSD-3-Clause (tests/glslparsertest/shaders/*)
+PIGLIT_LICENSE_FILES = COPYING licences/GPL-2 licences/GPL-3 licences/LGPL-2
+
+PIGLIT_DEPENDENCIES = host-pkgconf \
Quoted 8 lines

package/piglit/piglit.mk line 20

Quoted 3 lines
package/piglit/piglit.mk new file +3 -0
+	host-python-mako \
+	host-python-numpy \
+	host-python-six \

This is surprising, what does it do on the host during the build process that requires those tools ? Or is it that piglit generates a report on the target, and then provides a bunch of host tool to process such reports ?

Reports can be processed on the target directly.
I believe it's for the same reason that we need host-numpy.
I think the build system is checking the host-python instead of python for the target.

I'm not sure how to fix this...

Quoted 22 lines
Quoted 9 lines
package/piglit/piglit.mk new file +8 -0
+	libpng \
+	python-mako \
+	python-numpy \
+	python-six \
+	waffle \
+	zlib
+
+PIGLIT_CONF_OPTS += \

package/piglit/piglit.mk line 38

Quoted 10 lines
package/piglit/piglit.mk new file +10 -0
+	-DPIGLIT_USE_WAFFLE=ON \
+	-DPIGLIT_BUILD_CL_TESTS=OFF \
+	-DPIGLIT_BUILD_WGL_TESTS=OFF
+
+ifeq ($(BR2_PACKAGE_XORG7),y)
+# libxcb for xcb-dri2
+PIGLIT_DEPENDENCIES += \
+	xlib_libX11 \
+	xlib_libXext \
+	xproto_glproto \

Also needs adjustment now that xproto_glproto has been removed.

Quoted 3 lines

Other than those comments, looks pretty good to me.

Could you address those comments and send an updated version?

Ok, Thanks for the review.

Best regards,
Romain

Quoted 5 lines

Thanks!

Thomas

#11 lore raw

PATCH v2 3/3 package/piglit: new package

Hello,

Quoted 7 lines · Romain Naour
Quoted 4 lines

This is surprising, what does it do on the host during the build process that requires those tools ? Or is it that piglit generates a report on the target, and then provides a bunch of host tool to process such reports ?

Reports can be processed on the target directly.
I believe it's for the same reason that we need host-numpy.

What "same reason" ?

Quoted 4 lines

I think the build system is checking the host-python instead of python for the target.

I'm not sure how to fix this...

So you mean that all those Python packages are not needed on the host, but because the build system is bogus and checks their presence on the host, we have to have them as dependencies ?

So indeed, there's a macro in cmake/Modules/PythonModule.cmake that is used to check for Mako, Numpy and Six, and it works by running the host Python. I imagine they are in fact not needed on the host, and this macro needs to be adjusted. However, I'm not sure what's the right way to test if a *target* Python module is available.

Maybe Yegor can help on this ? :-)

Thomas

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