Trying to build mesa-gl without X11 enabled, results in numerous errors about being incorrectly configured, such as:
ERROR: Problem encountered: building dri drivers require at least one windowing system or classic osmesa A rendering engine must be available, so per the error we enable osmesa if X11 is not available. Once 'osmesa' is enabled we also need to make sure that swrast for DRI is also available. Signed-off-by: Mark Hatle <[email protected]> --- meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb b/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb index d4b1c1c454..c7897cdaf3 100644 --- a/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb +++ b/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb @@ -6,5 +6,10 @@ PROVIDES = "virtual/libgl virtual/mesa" S = "${WORKDIR}/mesa-${PV}" -PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" -PACKAGECONFIG_class-target = "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" +# At least one DRI rendering engine is required to build mesa. +# When no X11 is available, use osmesa for the rendering engine. +PACKAGECONFIG ??= "opengl dri ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa', d)}" +PACKAGECONFIG_class-target = "opengl dri ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa', d)}" + +# When NOT using X11, we need to make sure we have swrast available. +DRIDRIVERS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', ',swrast', d)}" -- 2.17.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#136711): https://lists.openembedded.org/g/openembedded-core/message/136711 Mute This Topic: https://lists.openembedded.org/mt/72556698/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
