diff mbox series

[2/2] mesa-gl: Set PACKAGECONFIG for target

Message ID 20190225231742.13855-2-raj.khem@gmail.com
State Accepted
Commit e6e6254eb8bee12f830b3848b8e96aafcf1ca918
Headers show
Series [V2,1/2] default-distrovars: Drop DISTRO_FEATURES_LIBC | expand

Commit Message

Khem Raj Feb. 25, 2019, 11:17 p.m. UTC
mesa.inc uses PACKAGECONFIG_class-target override to setup default
packageconfigs, which means that when we build mesa-gl for target then
it does no honor the ??= setting we have in mesa-gl recipe, and ends up
compiling egl, gles2 as well, which is not intended.

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 meta/recipes-graphics/mesa/mesa-gl_18.3.4.bb | 1 +
 1 file changed, 1 insertion(+)

-- 
2.20.1

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Comments

Martin Jansa Feb. 27, 2019, 1:16 a.m. UTC | #1
Fixes e.g.:
ERROR: weston-5.0.0-r0 do_prepare_recipe_sysroot: The file
/usr/lib/libEGL.so.1.0.0 is installed by both mesa-gl and libhybris,
aborting

but there is still:
ERROR: weston-5.0.0-r0 do_prepare_recipe_sysroot: The file
/usr/include/KHR/khrplatform.h is installed by both mesa-gl and libhybris,
aborting

I believe this header wasn't included in mesa-gl before recent changes,
maybe something else needs to be filtered out?

On Tue, Feb 26, 2019 at 12:18 AM Khem Raj <raj.khem@gmail.com> wrote:

> mesa.inc uses PACKAGECONFIG_class-target override to setup default

> packageconfigs, which means that when we build mesa-gl for target then

> it does no honor the ??= setting we have in mesa-gl recipe, and ends up

> compiling egl, gles2 as well, which is not intended.

>

> Signed-off-by: Khem Raj <raj.khem@gmail.com>

> ---

>  meta/recipes-graphics/mesa/mesa-gl_18.3.4.bb | 1 +

>  1 file changed, 1 insertion(+)

>

> diff --git a/meta/recipes-graphics/mesa/mesa-gl_18.3.4.bb

> b/meta/recipes-graphics/mesa/mesa-gl_18.3.4.bb

> index 73267eb4f0..d4b1c1c454 100644

> --- a/meta/recipes-graphics/mesa/mesa-gl_18.3.4.bb

> +++ b/meta/recipes-graphics/mesa/mesa-gl_18.3.4.bb

> @@ -7,3 +7,4 @@ 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)}"

> --

> 2.20.1

>

> --

> _______________________________________________

> Openembedded-core mailing list

> Openembedded-core@lists.openembedded.org

> http://lists.openembedded.org/mailman/listinfo/openembedded-core

>
<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Fixes e.g.:<br></div><div dir="ltr">ERROR: weston-5.0.0-r0 do_prepare_recipe_sysroot: The file /usr/lib/libEGL.so.1.0.0 is installed by both mesa-gl and libhybris, aborting</div><div dir="ltr"><br></div><div>but there is still:</div><div><div>ERROR: weston-5.0.0-r0 do_prepare_recipe_sysroot: The file /usr/include/KHR/khrplatform.h is installed by both mesa-gl and libhybris, aborting</div></div><div><br></div><div>I believe this header wasn&#39;t included in mesa-gl before recent changes, maybe something else needs to be filtered out?</div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 26, 2019 at 12:18 AM Khem Raj &lt;<a href="mailto:raj.khem@gmail.com" target="_blank">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">mesa.inc uses PACKAGECONFIG_class-target override to setup default<br>
packageconfigs, which means that when we build mesa-gl for target then<br>
it does no honor the ??= setting we have in mesa-gl recipe, and ends up<br>
compiling egl, gles2 as well, which is not intended.<br>
<br>
Signed-off-by: Khem Raj &lt;<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a>&gt;<br>

---<br>
 meta/recipes-graphics/mesa/<a href="http://mesa-gl_18.3.4.bb" rel="noreferrer" target="_blank">mesa-gl_18.3.4.bb</a> | 1 +<br>
 1 file changed, 1 insertion(+)<br>
<br>
diff --git a/meta/recipes-graphics/mesa/<a href="http://mesa-gl_18.3.4.bb" rel="noreferrer" target="_blank">mesa-gl_18.3.4.bb</a> b/meta/recipes-graphics/mesa/<a href="http://mesa-gl_18.3.4.bb" rel="noreferrer" target="_blank">mesa-gl_18.3.4.bb</a><br>
index 73267eb4f0..d4b1c1c454 100644<br>
--- a/meta/recipes-graphics/mesa/<a href="http://mesa-gl_18.3.4.bb" rel="noreferrer" target="_blank">mesa-gl_18.3.4.bb</a><br>
+++ b/meta/recipes-graphics/mesa/<a href="http://mesa-gl_18.3.4.bb" rel="noreferrer" target="_blank">mesa-gl_18.3.4.bb</a><br>
@@ -7,3 +7,4 @@ PROVIDES = &quot;virtual/libgl virtual/mesa&quot;<br>
 S = &quot;${WORKDIR}/mesa-${PV}&quot;<br>
<br>
 PACKAGECONFIG ??= &quot;opengl dri ${@bb.utils.filter(&#39;DISTRO_FEATURES&#39;, &#39;x11&#39;, d)}&quot;<br>
+PACKAGECONFIG_class-target = &quot;opengl dri ${@bb.utils.filter(&#39;DISTRO_FEATURES&#39;, &#39;x11&#39;, d)}&quot;<br>
-- <br>
2.20.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>
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Khem Raj Feb. 27, 2019, 1:29 a.m. UTC | #2
On Tue, Feb 26, 2019 at 5:17 PM Martin Jansa <martin.jansa@gmail.com> wrote:
>

> Fixes e.g.:

> ERROR: weston-5.0.0-r0 do_prepare_recipe_sysroot: The file /usr/lib/libEGL.so.1.0.0 is installed by both mesa-gl and libhybris, aborting

>

> but there is still:

> ERROR: weston-5.0.0-r0 do_prepare_recipe_sysroot: The file /usr/include/KHR/khrplatform.h is installed by both mesa-gl and libhybris, aborting

>

> I believe this header wasn't included in mesa-gl before recent changes, maybe something else needs to be filtered out?

>


Yes, https://patchwork.freedesktop.org/patch/166596/
worked in past but does not work anymore with latest version
maybe a regression or may be it will work with meson.
irrespective of what/where gets fixed, this patch helps us to move

For rpi layer, I have fixed it like this
https://github.com/YoeDistro/meta-raspberrypi/commit/46dbdbb1f9059dcd36e032a074023ac9c78be4aa

probably, that fix should be made to main mesa-gl recipe itself so all
can use it.

> On Tue, Feb 26, 2019 at 12:18 AM Khem Raj <raj.khem@gmail.com> wrote:

>>

>> mesa.inc uses PACKAGECONFIG_class-target override to setup default

>> packageconfigs, which means that when we build mesa-gl for target then

>> it does no honor the ??= setting we have in mesa-gl recipe, and ends up

>> compiling egl, gles2 as well, which is not intended.

>>

>> Signed-off-by: Khem Raj <raj.khem@gmail.com>

>> ---

>>  meta/recipes-graphics/mesa/mesa-gl_18.3.4.bb | 1 +

>>  1 file changed, 1 insertion(+)

>>

>> diff --git a/meta/recipes-graphics/mesa/mesa-gl_18.3.4.bb b/meta/recipes-graphics/mesa/mesa-gl_18.3.4.bb

>> index 73267eb4f0..d4b1c1c454 100644

>> --- a/meta/recipes-graphics/mesa/mesa-gl_18.3.4.bb

>> +++ b/meta/recipes-graphics/mesa/mesa-gl_18.3.4.bb

>> @@ -7,3 +7,4 @@ 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)}"

>> --

>> 2.20.1

>>

>> --

>> _______________________________________________

>> Openembedded-core mailing list

>> Openembedded-core@lists.openembedded.org

>> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/recipes-graphics/mesa/mesa-gl_18.3.4.bb b/meta/recipes-graphics/mesa/mesa-gl_18.3.4.bb
index 73267eb4f0..d4b1c1c454 100644
--- a/meta/recipes-graphics/mesa/mesa-gl_18.3.4.bb
+++ b/meta/recipes-graphics/mesa/mesa-gl_18.3.4.bb
@@ -7,3 +7,4 @@  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)}"