Skip to contentSkip to conversation

libepoxy: Disable x11 when not building for x11

PATCH Superseded Andrew F. Davis 3 participants 7 messages Sep 13, 2019 – Sep 17, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 libepoxy: Disable x11 when not building for x11

Although glx support is turned off, the build still tries to pull in some x11 components, disable x11 explicitly.

---
 meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb +1 -1
index c8d1650c63..825453ab28 100644
@@ -18,7 +18,7 @@ REQUIRED_DISTRO_FEATURES_class-native = ""
 REQUIRED_DISTRO_FEATURES_class-nativesdk = ""
 
 PACKAGECONFIG[egl] = "-Degl=yes, -Degl=no, virtual/egl"
-PACKAGECONFIG[x11] = "-Dglx=yes, -Dglx=no, virtual/libx11 virtual/libgl"
+PACKAGECONFIG[x11] = "-Dglx=yes, -Dglx=no -Dx11=false, virtual/libx11 virtual/libgl"
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} egl"
 
 EXTRA_OEMESON += "-Dtests=false"
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/4 cogl: Set depends to the virtual needed not explicitly on Mesa

The dependency is for EGL and GLES2 libraries. On some systems these are not provided by Mesa, list what is actually needed so the system can choose the correct provider.

---
 meta/recipes-graphics/cogl/cogl-1.0.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/cogl/cogl-1.0.inc +1 -1
index 3e392fa5ec..b8c64c029a 100644
@@ -18,7 +18,7 @@ EDEPENDS_GLES2 = "virtual/libgles2"
 EDEPENDS_KMS = "libdrm virtual/egl"
 EDEPENDS_EGL = "virtual/egl"
 EDEPENDS_X11 = "virtual/libx11 libxcomposite libxfixes libxi libxrandr"
-EDEPENDS_WAYLAND = "virtual/mesa wayland"
+EDEPENDS_WAYLAND = "virtual/egl virtual/libgles2 wayland"
 
 # Extra RDEPENDS for PACKAGECONFIG
 # This has to be explictly listed, because cogl dlopens the backends
Signature · 1 line
2.17.1
#2 lore raw

PATCH 3/4 gtk+3: Set depends to the virtual needed not explicitly on Mesa

In reply to Andrew F. Davis

The dependency is for EGL and GLES2 libraries. On some systems these are not provided by Mesa, list what is actually needed so the system can choose the correct provider.

---
 meta/recipes-gnome/gtk+/gtk+3.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-gnome/gtk+/gtk+3.inc +1 -1
index 77b6c31536..7ec40dcbf5 100644
@@ -52,7 +52,7 @@ PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,at-spi2-atk fon
 # this is provided by oe-core patch that removes epoxy/gl dependency from a X11 build
 PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,libepoxy"
 PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,,libgl"
-PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland wayland-protocols libxkbcommon virtual/mesa wayland-native"
+PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland wayland-protocols libxkbcommon virtual/egl virtual/gles2 wayland-native"
 PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,cups"
 
 prepare_gtk_scripts() {
Signature · 1 line
2.17.1
#3 lore raw

Re: [PATCH 3/4] gtk+3: Set depends to the virtual needed not explicitly on Mesa

Quoted 14 lines · Andrew F. Davis via Openembedded-core

The dependency is for EGL and GLES2 libraries. On some systems these are not provided by Mesa, list what is actually needed so the system can choose the correct provider.

---
 meta/recipes-gnome/gtk+/gtk+3.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-gnome/gtk+/gtk+3.inc +0 -0
index 77b6c31536..7ec40dcbf5 100644

meta/recipes-gnome/gtk+/gtk+3.inc PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,at-spi2-atk fon · line 58

Quoted 8 lines
meta/recipes-gnome/gtk+/gtk+3.inc +1 -1
@@ -52,7 +52,7 @@ PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,at-spi2-atk fon
 # this is provided by oe-core patch that removes epoxy/gl dependency from a X11 build
 PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,libepoxy"
 PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,,libgl"
-PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland wayland-protocols libxkbcommon virtual/mesa wayland-native"
+PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland wayland-protocols libxkbcommon virtual/egl virtual/gles2 wayland-native"
 PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,cups"
 
 prepare_gtk_scripts() {

This breaks things:

https://autobuilder.yoctoproject.org/typhoon/#/builders/57/builds/1037

step1b: ERROR: Nothing PROVIDES 'virtual/gles2' (but /home/pokybuild/yocto-worker/qemux86-64-x32/build/meta/recipes-gnome/gtk+/gtk+3_3.24.8.bb DEPENDS on or otherwise requires it). Close matches:

Cheers,

Richard

#4 lore raw

Re: [PATCH 3/4] gtk+3: Set depends to the virtual needed not explicitly on Mesa

Quoted 22 lines · Richard Purdie
Quoted 21 lines · Andrew F. Davis via Openembedded-core

The dependency is for EGL and GLES2 libraries. On some systems these are not provided by Mesa, list what is actually needed so the system can choose the correct provider.

---
 meta/recipes-gnome/gtk+/gtk+3.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-gnome/gtk+/gtk+3.inc +1 -1
index 77b6c31536..7ec40dcbf5 100644
@@ -52,7 +52,7 @@ PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,at-spi2-atk fon
 # this is provided by oe-core patch that removes epoxy/gl dependency from a X11 build
 PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,libepoxy"
 PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,,libgl"
-PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland wayland-protocols libxkbcommon virtual/mesa wayland-native"
+PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland wayland-protocols libxkbcommon virtual/egl virtual/gles2 wayland-native"
 PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,cups"
 
Quoted 8 lines

meta/recipes-gnome/gtk+/gtk+3.inc PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,at-spi2-atk fon · line 58

Quoted 1 line
meta/recipes-gnome/gtk+/gtk+3.inc +0 -0
 prepare_gtk_scripts() {

This breaks things:

https://autobuilder.yoctoproject.org/typhoon/#/builders/57/builds/1037

step1b: ERROR: Nothing PROVIDES 'virtual/gles2' (but /home/pokybuild/yocto-worker/qemux86-64-x32/build/meta/recipes-gnome/gtk+/gtk+3_3.24.8.bb DEPENDS on or otherwise requires it). Close matches:

Thanks for the heads up. Copy/merge error on my part, the correct target is "virtual/libgles2", same typo on patch 4/4, will re-send updated v2.

Thanks,
Andrew

Quoted 6 lines

Cheers,

Richard

#5 lore raw

PATCH 4/4 weston: Set depends to the virtual needed not explicitly on Mesa

In reply to Andrew F. Davis

The dependency is for EGL and GLES2 libraries. On some systems these are not provided by Mesa, list what is actually needed so the system can choose the correct provider.

---
 meta/recipes-graphics/wayland/weston_7.0.0.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-graphics/wayland/weston_7.0.0.bb +2 -2
index 5d2a9336f3..d17b8391a4 100644
@@ -36,9 +36,9 @@ PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev
 # Compositor choices
 #
 # Weston on KMS
-PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/mesa virtual/libgbm mtdev"
+PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/gles2 virtual/libgbm mtdev"
 # Weston on Wayland (nested Weston)
-PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/mesa"
+PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/gles2"
 # Weston on X11
 PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo"
 # Headless Weston
Signature · 1 line
2.17.1
Acked-by on v1 4/4
#6 lore raw

Re: [PATCH 4/4] weston: Set depends to the virtual needed not explicitly on Mesa

Quoted 5 lines · Andrew F. Davis via Openembedded-core

The dependency is for EGL and GLES2 libraries. On some systems these are not provided by Mesa, list what is actually needed so the system can choose the correct provider.

Thanks, we've been carrying a similar change locally for years.

Quoted 28 lines
---
 meta/recipes-graphics/wayland/weston_7.0.0.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-graphics/wayland/weston_7.0.0.bb +2 -2
index 5d2a9336f3..d17b8391a4 100644
@@ -36,9 +36,9 @@ PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev
 # Compositor choices
 #
 # Weston on KMS
-PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/mesa virtual/libgbm mtdev"
+PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/gles2 virtual/libgbm mtdev"
 # Weston on Wayland (nested Weston)
-PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/mesa"
+PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/gles2"
 # Weston on X11
 PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo"
 # Headless Weston
Signature · 7 lines
2.17.1

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core