<div dir="ltr"><div>I think the native dsitro features should still be in lockstep with target distro features, for simplicity&#39;s sake. For example here, we enable native opengl support only if the target also will have it. If the host system can&#39;t handle opengl, then there&#39;ll be a runtime error from qemu.<br></div><div><br></div><div>Trying to manage native distro features according to what the host system can do sounds like a lot of complexity, I&#39;d rather just install missing packages on the host, or print runtime/test time errors.<br></div><div><br></div><div>Alex<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 6 Sep 2019 at 16:26, Khem Raj &lt;<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div dir="auto"><br></div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 6, 2019 at 4:18 AM Alexander Kanavin &lt;<a href="mailto:alex.kanavin@gmail.com" target="_blank">alex.kanavin@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This will allow better control over native virgl/qemu configurations.<br>
<br>
Adjust gtk+3/cairo native configurations to actually ignore opengl<br>
when building for -native: we do not need it, and it would cause build<br>
failures as only a limited subset of mesa-native is currently built.<br>
<br>
Drop native/nativesdk overrides from virglrenderer/libepoxy recipes<br>
as opengl feature is now correctly set for those variants.<br>
<br>
Signed-off-by: Alexander Kanavin &lt;<a href="mailto:alex.kanavin@gmail.com" target="_blank">alex.kanavin@gmail.com</a>&gt;<br>
---<br>
 meta/conf/bitbake.conf                                     | 4 ++--<br>
 meta/recipes-gnome/gtk+/gtk+3.inc                          | 2 ++<br>
 meta/recipes-graphics/cairo/<a href="http://cairo_1.16.0.bb" rel="noreferrer" target="_blank">cairo_1.16.0.bb</a>                | 2 ++<br>
 meta/recipes-graphics/libepoxy/<a href="http://libepoxy_1.5.3.bb" rel="noreferrer" target="_blank">libepoxy_1.5.3.bb</a>           | 2 --<br>
 meta/recipes-graphics/virglrenderer/<a href="http://virglrenderer_0.8.0.bb" rel="noreferrer" target="_blank">virglrenderer_0.8.0.bb</a> | 2 --<br>
 5 files changed, 6 insertions(+), 6 deletions(-)<br>
<br>
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf<br>
index a0a7f4911e0..d36f4c6ccef 100644<br>
--- a/meta/conf/bitbake.conf<br>
+++ b/meta/conf/bitbake.conf<br>
@@ -824,8 +824,8 @@ DISTRO_FEATURES_NATIVESDK ?= &quot;x11&quot;<br>
<br>
 # Normally target distro features will not be applied to native builds:<br>
 # Native distro features on this list will use the target feature value<br>
-DISTRO_FEATURES_FILTER_NATIVE ?= &quot;api-documentation&quot;<br>
-DISTRO_FEATURES_FILTER_NATIVESDK ?= &quot;api-documentation&quot;<br>
+DISTRO_FEATURES_FILTER_NATIVE ?= &quot;api-documentation opengl&quot;<br>
+DISTRO_FEATURES_FILTER_NATIVESDK ?= &quot;api-documentation opengl&quot;<br>
<br>
 DISTRO_FEATURES_BACKFILL = &quot;pulseaudio sysvinit gobject-introspection-data ldconfig&quot;<br>
 MACHINE_FEATURES_BACKFILL = &quot;rtc qemu-usermode&quot;<br>
diff --git a/meta/recipes-gnome/gtk+/gtk+3.inc b/meta/recipes-gnome/gtk+/gtk+3.inc<br>
index 77b6c31536b..2f9e05b1cd4 100644<br>
--- a/meta/recipes-gnome/gtk+/gtk+3.inc<br>
+++ b/meta/recipes-gnome/gtk+/gtk+3.inc<br>
@@ -47,6 +47,8 @@ do_compile_prepend() {<br>
<br>
 PACKAGECONFIG ??= &quot;${@bb.utils.filter(&#39;DISTRO_FEATURES&#39;, &#39;opengl wayland x11&#39;, d)} \<br>
                    ${@bb.utils.contains(&#39;DISTRO_FEATURES&#39;, &#39;opengl x11&#39;, &#39;glx&#39;, &#39;&#39;, d)}&quot;<br>
+PACKAGECONFIG_class-native = &quot;${@bb.utils.filter(&#39;DISTRO_FEATURES&#39;, &#39;x11&#39;, d)}&quot;<br>
+PACKAGECONFIG_class-nativesdk = &quot;${@bb.utils.filter(&#39;DISTRO_FEATURES&#39;, &#39;x11&#39;, d)}&quot;<br>
</blockquote><div dir="auto"><br></div><div dir="auto">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</div><div dir="auto">So is distro feature in someway related in these</div><div dir="auto">Different classes of recipes ?</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
 PACKAGECONFIG[x11] = &quot;--enable-x11-backend,--disable-x11-backend,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes&quot;<br>
 # this is provided by oe-core patch that removes epoxy/gl dependency from a X11 build<br>
diff --git a/meta/recipes-graphics/cairo/<a href="http://cairo_1.16.0.bb" rel="noreferrer" target="_blank">cairo_1.16.0.bb</a> b/meta/recipes-graphics/cairo/<a href="http://cairo_1.16.0.bb" rel="noreferrer" target="_blank">cairo_1.16.0.bb</a><br>
index f32e9ba1bcd..84c7b0adde9 100644<br>
--- a/meta/recipes-graphics/cairo/<a href="http://cairo_1.16.0.bb" rel="noreferrer" target="_blank">cairo_1.16.0.bb</a><br>
+++ b/meta/recipes-graphics/cairo/<a href="http://cairo_1.16.0.bb" rel="noreferrer" target="_blank">cairo_1.16.0.bb</a><br>
@@ -41,6 +41,8 @@ X11DEPENDS = &quot;virtual/libx11 libsm libxrender libxext&quot;<br>
 PACKAGECONFIG ??= &quot;${@bb.utils.filter(&#39;DISTRO_FEATURES&#39;, &#39;directfb&#39;, d)} \<br>
                    ${@bb.utils.contains(&#39;DISTRO_FEATURES&#39;, &#39;x11&#39;, &#39;x11 xcb&#39;, &#39;&#39;, d)} \<br>
                    ${@bb.utils.contains(&#39;DISTRO_FEATURES&#39;, &#39;x11 opengl&#39;, &#39;opengl&#39;, &#39;&#39;, d)}&quot;<br>
+PACKAGECONFIG_class-native = &quot;${@bb.utils.contains(&#39;DISTRO_FEATURES&#39;, &#39;x11&#39;, &#39;x11 xcb&#39;, &#39;&#39;, d)}&quot;<br>
+PACKAGECONFIG_class-nativesdk = &quot;${@bb.utils.contains(&#39;DISTRO_FEATURES&#39;, &#39;x11&#39;, &#39;x11 xcb&#39;, &#39;&#39;, d)}&quot;<br>
<br>
 PACKAGECONFIG[x11] = &quot;--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}&quot;<br>
 PACKAGECONFIG[xcb] = &quot;--enable-xcb,--disable-xcb,libxcb&quot;<br>
diff --git a/meta/recipes-graphics/libepoxy/<a href="http://libepoxy_1.5.3.bb" rel="noreferrer" target="_blank">libepoxy_1.5.3.bb</a> b/meta/recipes-graphics/libepoxy/<a href="http://libepoxy_1.5.3.bb" rel="noreferrer" target="_blank">libepoxy_1.5.3.bb</a><br>
index c8d1650c637..5d7639a929e 100644<br>
--- a/meta/recipes-graphics/libepoxy/<a href="http://libepoxy_1.5.3.bb" rel="noreferrer" target="_blank">libepoxy_1.5.3.bb</a><br>
+++ b/meta/recipes-graphics/libepoxy/<a href="http://libepoxy_1.5.3.bb" rel="noreferrer" target="_blank">libepoxy_1.5.3.bb</a><br>
@@ -14,8 +14,6 @@ UPSTREAM_CHECK_URI = &quot;<a href="https://github.com/anholt/libepoxy/releases" rel="noreferrer" target="_blank">https://github.com/anholt/libepoxy/releases</a>&quot;<br>
 inherit meson pkgconfig distro_features_check<br>
<br>
 REQUIRED_DISTRO_FEATURES = &quot;opengl&quot;<br>
-REQUIRED_DISTRO_FEATURES_class-native = &quot;&quot;<br>
-REQUIRED_DISTRO_FEATURES_class-nativesdk = &quot;&quot;<br>
<br>
 PACKAGECONFIG[egl] = &quot;-Degl=yes, -Degl=no, virtual/egl&quot;<br>
 PACKAGECONFIG[x11] = &quot;-Dglx=yes, -Dglx=no, virtual/libx11 virtual/libgl&quot;<br>
diff --git a/meta/recipes-graphics/virglrenderer/<a href="http://virglrenderer_0.8.0.bb" rel="noreferrer" target="_blank">virglrenderer_0.8.0.bb</a> b/meta/recipes-graphics/virglrenderer/<a href="http://virglrenderer_0.8.0.bb" rel="noreferrer" target="_blank">virglrenderer_0.8.0.bb</a><br>
index d2b11c103a3..65365eb900a 100644<br>
--- a/meta/recipes-graphics/virglrenderer/<a href="http://virglrenderer_0.8.0.bb" rel="noreferrer" target="_blank">virglrenderer_0.8.0.bb</a><br>
+++ b/meta/recipes-graphics/virglrenderer/<a href="http://virglrenderer_0.8.0.bb" rel="noreferrer" target="_blank">virglrenderer_0.8.0.bb</a><br>
@@ -17,5 +17,3 @@ inherit autotools pkgconfig distro_features_check<br>
 BBCLASSEXTEND = &quot;native nativesdk&quot;<br>
<br>
 REQUIRED_DISTRO_FEATURES = &quot;opengl&quot;<br>
-REQUIRED_DISTRO_FEATURES_class-native = &quot;&quot;<br>
-REQUIRED_DISTRO_FEATURES_class-nativesdk = &quot;&quot;<br>
-- <br>
2.17.1<br>
<br>
-- <br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div></div>
</blockquote></div>