mesa: clean up PACKAGECONFIG
PATCH 1/1 mesa: clean up PACKAGECONFIG
Use machine overrides instead of machine features.
--- meta/recipes-graphics/mesa/mesa-common.inc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
meta/recipes-graphics/mesa/mesa-common.inc +3 -4
@@ -12,7 +12,7 @@ SECTION = "x11" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://docs/license.html;md5=03ccdc4c379c4289aecfb8892c546f67" -INC_PR = "r2" +INC_PR = "r3" PE = "2" DEPENDS = "libxml2-native makedepend-native flex-native bison-native"
@@ -29,9 +29,8 @@ EXTRA_OECONF = "--enable-glu \ --disable-glut \ --enable-shared-glapi" -PACKAGECONFIG ??= "${@base_contains('MACHINE_FEATURES', 'x86', 'gles', '', d)} \ - ${@base_contains('MACHINE_FEATURES', 'x86', 'egl', '', d)} \ - ${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" +PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" +PACKAGECONFIG_append_x86 = " gles egl" X11_DEPS = "xf86driproto glproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes" PACKAGECONFIG[x11] = "--enable-glx-tls,--disable-glx,${X11_DEPS}"
Signature · 1 line
1.7.10
Saul Wold
AppliedQuoted 23 lines · Ross Burton
Use machine overrides instead of machine features.
Signed-off-by Ross Burton <[email protected]>--- meta/recipes-graphics/mesa/mesa-common.inc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)meta/recipes-graphics/mesa/mesa-common.inc +1
-1@@ -12,7 +12,7 @@ SECTION = "x11" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://docs/license.html;md5=03ccdc4c379c4289aecfb8892c546f67" -INC_PR = "r2" +INC_PR = "r3" PE = "2" DEPENDS = "libxml2-native makedepend-native flex-native bison-native"@@ -29,9 +29,8 @@ EXTRA_OECONF = "--enable-glu \ --disable-glut \
meta/recipes-graphics/mesa/mesa-common.inc EXTRA_OECONF = "--enable-glu \ · line 36
Quoted 10 lines
meta/recipes-graphics/mesa/mesa-common.inc +2
-3--enable-shared-glapi" -PACKAGECONFIG ??= "${@base_contains('MACHINE_FEATURES', 'x86', 'gles', '', d)} \ - ${@base_contains('MACHINE_FEATURES', 'x86', 'egl', '', d)} \ - ${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" +PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" +PACKAGECONFIG_append_x86 = " gles egl" X11_DEPS = "xf86driproto glproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes" PACKAGECONFIG[x11] = "--enable-glx-tls,--disable-glx,${X11_DEPS}"
Merged into OE-Core
Thanks
Sau!
I'm new to oe, and I've seen there was quite a big discussion about the gles support in mesa.
Now libgles-omap3 has the mentioned conflict with the mesa-dri as both provides virtual/egl. I think a patch like this would solve the issue:
(mesa-dri is required by xserver, and libgles-omap3 is the accelerated gles driver from ti, which also provides egl by nature)
meta/recipes-graphics/mesa/mesa-common.inc +15 -4
@@ -17,7 +17,12 @@ PE = "2" DEPENDS = "libxml2-native makedepend-native flex-native bison-native" -PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl" +PROV_EGL = "${@base_contains('DISTRO_FEATURES', 'egl', 'virtual/libegl', '', d)}" +PROV_GLES = "${@base_contains('DISTRO_FEATURES', 'gles', 'virtual/libgles1 virtual/libgles2', '', d)}" +PROV_GLES1 = "${@base_contains('DISTRO_FEATURES', 'gles1', 'virtual/libgles1', '', d)}" +PROV_GLES2 = "${@base_contains('DISTRO_FEATURES', 'gles2', 'virtual/libgles2', '', d)}" + +PROVIDES = "virtual/libgl ${PROV_EGL} ${PROV_GLES1} ${PROV_GLES2}" # for mesa-dri and mesa-xlib FILESEXTRAPATHS_append := "${THISDIR}/mesa:"
@@ -41,14 +46,20 @@ EXCLUDE_FROM_WORLD = "1" # ie mesa-dri could be empty and mesa-dri-dev RDEPENDS on it ALLOW_EMPTY_${PN} = "1" -PACKAGES =+ "libegl libegl-dev libegl-dbg \ +PACK_EGL = "${@base_contains('DISTRO_FEATURES', 'egl', 'libegl libegl-dev libegl-dbg', '', d)}" +PACK_GLES = "${@base_contains('DISTRO_FEATURES', 'gles', 'libgles1 libgles1-dev libgles2 libgles2-dev', '', d)}" +PACK_GLES1 = "${@base_contains('DISTRO_FEATURES', 'gles1', 'libgles1 libgles1-dev', '', d)}" +PACK_GLES2 = "${@base_contains('DISTRO_FEATURES', 'gles2', 'libgles2 libgles2-dev', '', d)}" + +PACKAGES =+ "${PACK_EGL} \ libglu libglu-dev \ libosmesa libosmesa-dev \ libgl libgl-dev \ libglapi libglapi-dev \ libgbm libgbm-dev \ - libgles1 libgles1-dev \ - libgles2 libgles2-dev \ + ${PACK_GLES} \ + ${PACK_GLES1} \ + ${PACK_GLES2} \ " FILES_libegl = "${libdir}/libEGL.so.* ${libdir}/egl/*.so"
Quoted 4 lines · Zoltan Gaal
I'm new to oe, and I've seen there was quite a big discussion about the gles support in mesa.
Now libgles-omap3 has the mentioned conflict with the mesa-dri as both provides virtual/egl. I think a patch like this would solve the issue:
Can't you just set PREFERRED_PROVIDER? meta-intel has the same problem with the EMGD and psb drivers also conflicting with mesa-dri.
Ross
I've tried it, but mesa-dri is required for xserver and it won't compile without it. libgles-omap3 cannot replace the mesa dependency, though I'm not sure if it is a simple config issue or some interface is missing (libgl). And as libgles-omap3 also provides virtual/egl, the bitbake process detects, there exists multiple projects with the same provided feature:
NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
ERROR: Multiple .bb files are due to be built which each provide virtual/egl (/home/gzp/work/gumstix/oe/oe-meta/meta-ti/recipes-graphics/libgles/libgles-omap3_4.05.00.03.bb /home/gzp/work/gumstix/oe/oe-core/meta/recipes-graphics/mesa/mesa-dri_8.0.4.bb).
This usually means one provides something the other doesn't and should.
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
(in local.conf: PREFERRED_PROVIDER_virtual/egl="libgles-omap3")
Gzp
Quoted 5 lines · Zoltan Gaal
I've tried it, but mesa-dri is required for xserver and it won't compile without it. libgles-omap3 cannot replace the mesa dependency, though I'm not sure if it is a simple config issue or some interface is missing (libgl). And as libgles-omap3 also provides virtual/egl, the bitbake process detects, there exists multiple projects with the same provided feature:
So you end up with a system which has hardware accelerated EGL and GLES (though libgles-omap3) and software-only GL (through the software
renderer in mesa)? Doesn't sound optimal.
It's probably worth looking at making the GL dependency in X optional, so you can build X with just GLES support.
Ross
Quoted 17 lines · Zoltan Gaal
I've tried it, but mesa-dri is required for xserver and it won't compile without it. libgles-omap3 cannot replace the mesa dependency, though I'm not sure if it is a simple config issue or some interface is missing (libgl). And as libgles-omap3 also provides virtual/egl, the bitbake process detects, there exists multiple projects with the same provided feature:
NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
ERROR: Multiple .bb files are due to be built which each provide
virtual/egl (/home/gzp/work/gumstix/oe/oe-meta/meta-ti/recipes-graphics/libgles/libgles-omap3_4.05.00.03.bb/home/gzp/work/gumstix/oe/oe-core/meta/recipes-graphics/mesa/mesa-dri_8.0.4.bb).
This usually means one provides something the other doesn't and should.
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
Quoted 1 line
(in local.conf: PREFERRED_PROVIDER_virtual/egl="libgles-omap3")
Try also adding it to MULTI_PROVIDER_WHITELIST (see bitbake.conf).
This error message did use to just be a note but was turned into an error at various user's requests. Sometimes it means there are serious configuration issues, in a case like this, its ok though...
Cheers,
Richard
Thanks, that eliminated the error (warning), though I don't really like the idea. A recipe states something that's not so: mesa does not provides egl without the packageconfig, but who cares, while it is working and not too much confusing. In the pre-yocto ages there were much worse dependecies :)
Thx,
Gzp
A message that is not in the archive (sent off-list or not yet received): CALbNGRS=MCh2R4MK=BJyX2SDC_3Mr_-ETHCS7sX_tVhB9bG_5w@mail.gmail.com
Quoted 24 lines · Andreas Müller
Quoted 22 lines · Richard Purdie
Quoted 17 lines · Zoltan Gaal
I've tried it, but mesa-dri is required for xserver and it won't compile without it. libgles-omap3 cannot replace the mesa dependency, though I'm not sure if it is a simple config issue or some interface is missing (libgl). And as libgles-omap3 also provides virtual/egl, the bitbake process detects, there exists multiple projects with the same provided feature:
NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
ERROR: Multiple .bb files are due to be built which each provide
virtual/egl (/home/gzp/work/gumstix/oe/oe-meta/meta-ti/recipes-graphics/libgles/libgles-omap3_4.05.00.03.bb/home/gzp/work/gumstix/oe/oe-core/meta/recipes-graphics/mesa/mesa-dri_8.0.4.bb).
This usually means one provides something the other doesn't and should.
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue TasksQuoted 1 line
(in local.conf: PREFERRED_PROVIDER_virtual/egl="libgles-omap3")
Try also adding it to
MULTI_PROVIDER_WHITELIST(see bitbake.conf).
Quoted 7 lines
Quoted 4 lines
This error message did use to just be a note but was turned into an error at various user's requests. Sometimes it means there are serious configuration issues, in a case like this, its ok though...
The problem is not the error message in first place but the wrong libs (egl/gles/glesv2) in rootfs. As soon as mesa is in, libgles-omap libs are out.
This sounds like a configuration issue.
Firstly, the machine config needs to make sure the libgles-omap package is included in the image, probably through something like the XSERVER variable although I appreciate we don't have anything for egl at this point.
Secondly, the libglex-omap module should CONFLICT/REPLACE/PROVIDE the bits of mesa it replaces.
Cheers,
Richard