[OE-core] [PATCH 1/5] bitbake.conf: propagate 'opengl' DISTRO_FEATURE to native/nativesdk from target

Alexander Kanavin alex.kanavin at gmail.com
Fri Sep 6 14:57:51 UTC 2019


I think the native dsitro features should still be in lockstep with target
distro features, for simplicity's sake. For example here, we enable native
opengl support only if the target also will have it. If the host system
can't handle opengl, then there'll be a runtime error from qemu.

Trying to manage native distro features according to what the host system
can do sounds like a lot of complexity, I'd rather just install missing
packages on the host, or print runtime/test time errors.

Alex

On Fri, 6 Sep 2019 at 16:26, Khem Raj <raj.khem at gmail.com> wrote:

>
>
> On Fri, Sep 6, 2019 at 4:18 AM Alexander Kanavin <alex.kanavin at gmail.com>
> wrote:
>
>> This will allow better control over native virgl/qemu configurations.
>>
>> Adjust gtk+3/cairo native configurations to actually ignore opengl
>> when building for -native: we do not need it, and it would cause build
>> failures as only a limited subset of mesa-native is currently built.
>>
>> Drop native/nativesdk overrides from virglrenderer/libepoxy recipes
>> as opengl feature is now correctly set for those variants.
>>
>> Signed-off-by: Alexander Kanavin <alex.kanavin at gmail.com>
>> ---
>>  meta/conf/bitbake.conf                                     | 4 ++--
>>  meta/recipes-gnome/gtk+/gtk+3.inc                          | 2 ++
>>  meta/recipes-graphics/cairo/cairo_1.16.0.bb                | 2 ++
>>  meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb           | 2 --
>>  meta/recipes-graphics/virglrenderer/virglrenderer_0.8.0.bb | 2 --
>>  5 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
>> index a0a7f4911e0..d36f4c6ccef 100644
>> --- a/meta/conf/bitbake.conf
>> +++ b/meta/conf/bitbake.conf
>> @@ -824,8 +824,8 @@ DISTRO_FEATURES_NATIVESDK ?= "x11"
>>
>>  # Normally target distro features will not be applied to native builds:
>>  # Native distro features on this list will use the target feature value
>> -DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation"
>> -DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation"
>> +DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation opengl"
>> +DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation opengl"
>>
>>  DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit
>> gobject-introspection-data ldconfig"
>>  MACHINE_FEATURES_BACKFILL = "rtc qemu-usermode"
>> diff --git a/meta/recipes-gnome/gtk+/gtk+3.inc
>> b/meta/recipes-gnome/gtk+/gtk+3.inc
>> index 77b6c31536b..2f9e05b1cd4 100644
>> --- a/meta/recipes-gnome/gtk+/gtk+3.inc
>> +++ b/meta/recipes-gnome/gtk+/gtk+3.inc
>> @@ -47,6 +47,8 @@ do_compile_prepend() {
>>
>>  PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl wayland
>> x11', d)} \
>>                     ${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11',
>> 'glx', '', d)}"
>> +PACKAGECONFIG_class-native = "${@bb.utils.filter('DISTRO_FEATURES',
>> 'x11', d)}"
>> +PACKAGECONFIG_class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES',
>> 'x11', d)}"
>>
>
> Should we extend distro features to non target recipes as well I wonder
> since I might have a development system which has full x11 and capable of
> running GTK with X11 but target maybe not will
> So is distro feature in someway related in these
> Different classes of recipes ?
>
>>
>>  PACKAGECONFIG[x11] =
>> "--enable-x11-backend,--disable-x11-backend,at-spi2-atk fontconfig libx11
>> libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite
>> libxfixes"
>>  # this is provided by oe-core patch that removes epoxy/gl dependency
>> from a X11 build
>> diff --git a/meta/recipes-graphics/cairo/cairo_1.16.0.bb
>> b/meta/recipes-graphics/cairo/cairo_1.16.0.bb
>> index f32e9ba1bcd..84c7b0adde9 100644
>> --- a/meta/recipes-graphics/cairo/cairo_1.16.0.bb
>> +++ b/meta/recipes-graphics/cairo/cairo_1.16.0.bb
>> @@ -41,6 +41,8 @@ X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
>>  PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)}
>> \
>>                     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11
>> xcb', '', d)} \
>>                     ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl',
>> 'opengl', '', d)}"
>> +PACKAGECONFIG_class-native = "${@bb.utils.contains('DISTRO_FEATURES',
>> 'x11', 'x11 xcb', '', d)}"
>> +PACKAGECONFIG_class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES',
>> 'x11', 'x11 xcb', '', d)}"
>>
>>  PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no
>> --disable-xlib,${X11DEPENDS}"
>>  PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
>> diff --git a/meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb
>> b/meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb
>> index c8d1650c637..5d7639a929e 100644
>> --- a/meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb
>> +++ b/meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb
>> @@ -14,8 +14,6 @@ UPSTREAM_CHECK_URI = "
>> https://github.com/anholt/libepoxy/releases"
>>  inherit meson pkgconfig distro_features_check
>>
>>  REQUIRED_DISTRO_FEATURES = "opengl"
>> -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"
>> diff --git a/meta/recipes-graphics/virglrenderer/virglrenderer_0.8.0.bb
>> b/meta/recipes-graphics/virglrenderer/virglrenderer_0.8.0.bb
>> index d2b11c103a3..65365eb900a 100644
>> --- a/meta/recipes-graphics/virglrenderer/virglrenderer_0.8.0.bb
>> +++ b/meta/recipes-graphics/virglrenderer/virglrenderer_0.8.0.bb
>> @@ -17,5 +17,3 @@ inherit autotools pkgconfig distro_features_check
>>  BBCLASSEXTEND = "native nativesdk"
>>
>>  REQUIRED_DISTRO_FEATURES = "opengl"
>> -REQUIRED_DISTRO_FEATURES_class-native = ""
>> -REQUIRED_DISTRO_FEATURES_class-nativesdk = ""
>> --
>> 2.17.1
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core at lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20190906/18d6aeb1/attachment.html>


More information about the Openembedded-core mailing list