diff mbox series

[meta-oe,kirkstone,PATCHv2] glfw: add packageconfig and wayland dependencies

Message ID 20230427164723.863197-1-rs@ti.com
State Under Review
Headers show
Series [meta-oe,kirkstone,PATCHv2] glfw: add packageconfig and wayland dependencies | expand

Commit Message

Randolph Sapp April 27, 2023, 4:47 p.m. UTC
From: Randolph Sapp <rs@ti.com>

GLFW has the ability to use a wayland backend. This patch adds a config
for it, but does not enable it by default because it has a dependency on
extra-cmake-modules which is provided (most commonly) by meta-qt5-extra.

Signed-off-by: Randolph Sapp <rs@ti.com>
---
 meta-oe/recipes-core/glfw/glfw_3.3.bb | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

Comments

Khem Raj April 27, 2023, 4:53 p.m. UTC | #1
On Thu, Apr 27, 2023 at 9:47 AM <rs@ti.com> wrote:
>
> From: Randolph Sapp <rs@ti.com>
>
> GLFW has the ability to use a wayland backend. This patch adds a config
> for it, but does not enable it by default because it has a dependency on
> extra-cmake-modules which is provided (most commonly) by meta-qt5-extra.
>
> Signed-off-by: Randolph Sapp <rs@ti.com>
> ---
>  meta-oe/recipes-core/glfw/glfw_3.3.bb | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/meta-oe/recipes-core/glfw/glfw_3.3.bb b/meta-oe/recipes-core/glfw/glfw_3.3.bb
> index b31bba6b6b..5b0d61241e 100644
> --- a/meta-oe/recipes-core/glfw/glfw_3.3.bb
> +++ b/meta-oe/recipes-core/glfw/glfw_3.3.bb
> @@ -20,7 +20,17 @@ EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DGLFW_BUILD_DOCS=OFF"
>
>  CFLAGS += "-fPIC"
>
> -DEPENDS = "libpng libglu zlib libxrandr libxinerama libxi libxcursor"
> -REQUIRED_DISTRO_FEATURES = "x11 opengl"
> +DEPENDS = "libpng libglu zlib"
> +REQUIRED_DISTRO_FEATURES = "opengl"
> +ANY_OF_DISTRO_FEATURES = "wayland x11"
> +
> +# upstream considers x11 and wayland backends mutually exclusive and will
> +# prioritize wayland if it is enabled, but wayland has dependencies that cannot
> +# be satisfied by this layer so it is disabled by default
> +
> +PACKAGECONFIG ??= "x11"
> +
> +PACKAGECONFIG[wayland] = "-DGLFW_USE_WAYLAND=ON,,wayland wayland-native wayland-protocols extra-cmake-modules libxkbcommon"

I wonder if extra-cmake-modules recipe is common enough to live in meta-oe

> +PACKAGECONFIG[x11] = ",,libxrandr libxinerama libxi libxcursor"
>
>  COMPATIBLE_HOST:libc-musl = "null"
> --
> 2.40.0
>
Randolph Sapp April 27, 2023, 5:34 p.m. UTC | #2
On 4/27/23 11:53, Khem Raj wrote:
> On Thu, Apr 27, 2023 at 9:47 AM <rs@ti.com> wrote:
>>
>> From: Randolph Sapp <rs@ti.com>
>>
>> GLFW has the ability to use a wayland backend. This patch adds a config
>> for it, but does not enable it by default because it has a dependency on
>> extra-cmake-modules which is provided (most commonly) by meta-qt5-extra.
>>
>> Signed-off-by: Randolph Sapp <rs@ti.com>
>> ---
>>   meta-oe/recipes-core/glfw/glfw_3.3.bb | 14 ++++++++++++--
>>   1 file changed, 12 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta-oe/recipes-core/glfw/glfw_3.3.bb b/meta-oe/recipes-core/glfw/glfw_3.3.bb
>> index b31bba6b6b..5b0d61241e 100644
>> --- a/meta-oe/recipes-core/glfw/glfw_3.3.bb
>> +++ b/meta-oe/recipes-core/glfw/glfw_3.3.bb
>> @@ -20,7 +20,17 @@ EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DGLFW_BUILD_DOCS=OFF"
>>
>>   CFLAGS += "-fPIC"
>>
>> -DEPENDS = "libpng libglu zlib libxrandr libxinerama libxi libxcursor"
>> -REQUIRED_DISTRO_FEATURES = "x11 opengl"
>> +DEPENDS = "libpng libglu zlib"
>> +REQUIRED_DISTRO_FEATURES = "opengl"
>> +ANY_OF_DISTRO_FEATURES = "wayland x11"
>> +
>> +# upstream considers x11 and wayland backends mutually exclusive and will
>> +# prioritize wayland if it is enabled, but wayland has dependencies that cannot
>> +# be satisfied by this layer so it is disabled by default
>> +
>> +PACKAGECONFIG ??= "x11"
>> +
>> +PACKAGECONFIG[wayland] = "-DGLFW_USE_WAYLAND=ON,,wayland wayland-native wayland-protocols extra-cmake-modules libxkbcommon"
> 
> I wonder if extra-cmake-modules recipe is common enough to live in meta-oe

I'd be happy to offer up a recipe loosely based on what we've got in 
meta-arago if you think it's worth it, but it seems to be mostly KDE 
specific excluding this weird instance and a handful of desktop 
applications that aren't packaged by oe-core or meta-oe.

>> +PACKAGECONFIG[x11] = ",,libxrandr libxinerama libxi libxcursor"
>>
>>   COMPATIBLE_HOST:libc-musl = "null"
>> --
>> 2.40.0
>>
Khem Raj April 27, 2023, 5:35 p.m. UTC | #3
On Thu, Apr 27, 2023 at 10:34 AM Randolph Sapp <rs@ti.com> wrote:
>
> On 4/27/23 11:53, Khem Raj wrote:
> > On Thu, Apr 27, 2023 at 9:47 AM <rs@ti.com> wrote:
> >>
> >> From: Randolph Sapp <rs@ti.com>
> >>
> >> GLFW has the ability to use a wayland backend. This patch adds a config
> >> for it, but does not enable it by default because it has a dependency on
> >> extra-cmake-modules which is provided (most commonly) by meta-qt5-extra.
> >>
> >> Signed-off-by: Randolph Sapp <rs@ti.com>
> >> ---
> >>   meta-oe/recipes-core/glfw/glfw_3.3.bb | 14 ++++++++++++--
> >>   1 file changed, 12 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/meta-oe/recipes-core/glfw/glfw_3.3.bb b/meta-oe/recipes-core/glfw/glfw_3.3.bb
> >> index b31bba6b6b..5b0d61241e 100644
> >> --- a/meta-oe/recipes-core/glfw/glfw_3.3.bb
> >> +++ b/meta-oe/recipes-core/glfw/glfw_3.3.bb
> >> @@ -20,7 +20,17 @@ EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DGLFW_BUILD_DOCS=OFF"
> >>
> >>   CFLAGS += "-fPIC"
> >>
> >> -DEPENDS = "libpng libglu zlib libxrandr libxinerama libxi libxcursor"
> >> -REQUIRED_DISTRO_FEATURES = "x11 opengl"
> >> +DEPENDS = "libpng libglu zlib"
> >> +REQUIRED_DISTRO_FEATURES = "opengl"
> >> +ANY_OF_DISTRO_FEATURES = "wayland x11"
> >> +
> >> +# upstream considers x11 and wayland backends mutually exclusive and will
> >> +# prioritize wayland if it is enabled, but wayland has dependencies that cannot
> >> +# be satisfied by this layer so it is disabled by default
> >> +
> >> +PACKAGECONFIG ??= "x11"
> >> +
> >> +PACKAGECONFIG[wayland] = "-DGLFW_USE_WAYLAND=ON,,wayland wayland-native wayland-protocols extra-cmake-modules libxkbcommon"
> >
> > I wonder if extra-cmake-modules recipe is common enough to live in meta-oe
>
> I'd be happy to offer up a recipe loosely based on what we've got in
> meta-arago if you think it's worth it, but it seems to be mostly KDE
> specific excluding this weird instance and a handful of desktop
> applications that aren't packaged by oe-core or meta-oe.

We dont want KDE stuff, but the fact that enabling wayland support
needs it is less than ideal.

>
> >> +PACKAGECONFIG[x11] = ",,libxrandr libxinerama libxi libxcursor"
> >>
> >>   COMPATIBLE_HOST:libc-musl = "null"
> >> --
> >> 2.40.0
> >>
>
Randolph Sapp April 27, 2023, 7:15 p.m. UTC | #4
On 4/27/23 12:35, Khem Raj wrote:
> On Thu, Apr 27, 2023 at 10:34 AM Randolph Sapp <rs@ti.com> wrote:
>>
>> On 4/27/23 11:53, Khem Raj wrote:
>>> On Thu, Apr 27, 2023 at 9:47 AM <rs@ti.com> wrote:
>>>>
>>>> From: Randolph Sapp <rs@ti.com>
>>>>
>>>> GLFW has the ability to use a wayland backend. This patch adds a config
>>>> for it, but does not enable it by default because it has a dependency on
>>>> extra-cmake-modules which is provided (most commonly) by meta-qt5-extra.
>>>>
>>>> Signed-off-by: Randolph Sapp <rs@ti.com>
>>>> ---
>>>>    meta-oe/recipes-core/glfw/glfw_3.3.bb | 14 ++++++++++++--
>>>>    1 file changed, 12 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/meta-oe/recipes-core/glfw/glfw_3.3.bb b/meta-oe/recipes-core/glfw/glfw_3.3.bb
>>>> index b31bba6b6b..5b0d61241e 100644
>>>> --- a/meta-oe/recipes-core/glfw/glfw_3.3.bb
>>>> +++ b/meta-oe/recipes-core/glfw/glfw_3.3.bb
>>>> @@ -20,7 +20,17 @@ EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DGLFW_BUILD_DOCS=OFF"
>>>>
>>>>    CFLAGS += "-fPIC"
>>>>
>>>> -DEPENDS = "libpng libglu zlib libxrandr libxinerama libxi libxcursor"
>>>> -REQUIRED_DISTRO_FEATURES = "x11 opengl"
>>>> +DEPENDS = "libpng libglu zlib"
>>>> +REQUIRED_DISTRO_FEATURES = "opengl"
>>>> +ANY_OF_DISTRO_FEATURES = "wayland x11"
>>>> +
>>>> +# upstream considers x11 and wayland backends mutually exclusive and will
>>>> +# prioritize wayland if it is enabled, but wayland has dependencies that cannot
>>>> +# be satisfied by this layer so it is disabled by default
>>>> +
>>>> +PACKAGECONFIG ??= "x11"
>>>> +
>>>> +PACKAGECONFIG[wayland] = "-DGLFW_USE_WAYLAND=ON,,wayland wayland-native wayland-protocols extra-cmake-modules libxkbcommon"
>>>
>>> I wonder if extra-cmake-modules recipe is common enough to live in meta-oe
>>
>> I'd be happy to offer up a recipe loosely based on what we've got in
>> meta-arago if you think it's worth it, but it seems to be mostly KDE
>> specific excluding this weird instance and a handful of desktop
>> applications that aren't packaged by oe-core or meta-oe.
> 
> We dont want KDE stuff, but the fact that enabling wayland support
> needs it is less than ideal.
> 

Given that this may be required for other components and exists to 
extend cmake should I make a push to integrate this into oe-core 
alongside cmake or do you think it's still enough of an optional package 
that it should be in one of the meta-openembedded layers?

>>
>>>> +PACKAGECONFIG[x11] = ",,libxrandr libxinerama libxi libxcursor"
>>>>
>>>>    COMPATIBLE_HOST:libc-musl = "null"
>>>> --
>>>> 2.40.0
>>>>
>>
Khem Raj April 27, 2023, 7:17 p.m. UTC | #5
On Thu, Apr 27, 2023 at 12:15 PM Randolph Sapp <rs@ti.com> wrote:
>
> On 4/27/23 12:35, Khem Raj wrote:
> > On Thu, Apr 27, 2023 at 10:34 AM Randolph Sapp <rs@ti.com> wrote:
> >>
> >> On 4/27/23 11:53, Khem Raj wrote:
> >>> On Thu, Apr 27, 2023 at 9:47 AM <rs@ti.com> wrote:
> >>>>
> >>>> From: Randolph Sapp <rs@ti.com>
> >>>>
> >>>> GLFW has the ability to use a wayland backend. This patch adds a config
> >>>> for it, but does not enable it by default because it has a dependency on
> >>>> extra-cmake-modules which is provided (most commonly) by meta-qt5-extra.
> >>>>
> >>>> Signed-off-by: Randolph Sapp <rs@ti.com>
> >>>> ---
> >>>>    meta-oe/recipes-core/glfw/glfw_3.3.bb | 14 ++++++++++++--
> >>>>    1 file changed, 12 insertions(+), 2 deletions(-)
> >>>>
> >>>> diff --git a/meta-oe/recipes-core/glfw/glfw_3.3.bb b/meta-oe/recipes-core/glfw/glfw_3.3.bb
> >>>> index b31bba6b6b..5b0d61241e 100644
> >>>> --- a/meta-oe/recipes-core/glfw/glfw_3.3.bb
> >>>> +++ b/meta-oe/recipes-core/glfw/glfw_3.3.bb
> >>>> @@ -20,7 +20,17 @@ EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DGLFW_BUILD_DOCS=OFF"
> >>>>
> >>>>    CFLAGS += "-fPIC"
> >>>>
> >>>> -DEPENDS = "libpng libglu zlib libxrandr libxinerama libxi libxcursor"
> >>>> -REQUIRED_DISTRO_FEATURES = "x11 opengl"
> >>>> +DEPENDS = "libpng libglu zlib"
> >>>> +REQUIRED_DISTRO_FEATURES = "opengl"
> >>>> +ANY_OF_DISTRO_FEATURES = "wayland x11"
> >>>> +
> >>>> +# upstream considers x11 and wayland backends mutually exclusive and will
> >>>> +# prioritize wayland if it is enabled, but wayland has dependencies that cannot
> >>>> +# be satisfied by this layer so it is disabled by default
> >>>> +
> >>>> +PACKAGECONFIG ??= "x11"
> >>>> +
> >>>> +PACKAGECONFIG[wayland] = "-DGLFW_USE_WAYLAND=ON,,wayland wayland-native wayland-protocols extra-cmake-modules libxkbcommon"
> >>>
> >>> I wonder if extra-cmake-modules recipe is common enough to live in meta-oe
> >>
> >> I'd be happy to offer up a recipe loosely based on what we've got in
> >> meta-arago if you think it's worth it, but it seems to be mostly KDE
> >> specific excluding this weird instance and a handful of desktop
> >> applications that aren't packaged by oe-core or meta-oe.
> >
> > We dont want KDE stuff, but the fact that enabling wayland support
> > needs it is less than ideal.
> >
>
> Given that this may be required for other components and exists to
> extend cmake should I make a push to integrate this into oe-core
> alongside cmake or do you think it's still enough of an optional package
> that it should be in one of the meta-openembedded layers?

Since this enabled wayland, I am interested to see if we can have it
in common (non-kde) place.
or make changes to glfw to not need it to enable wayland support.

>
> >>
> >>>> +PACKAGECONFIG[x11] = ",,libxrandr libxinerama libxi libxcursor"
> >>>>
> >>>>    COMPATIBLE_HOST:libc-musl = "null"
> >>>> --
> >>>> 2.40.0
> >>>>
> >>
>
akuster808 April 28, 2023, 11:16 a.m. UTC | #6
Doesn't this need to land it Master first? Kirkstone is in the subject

- armin

On 4/27/23 12:47 PM, rs@ti.com wrote:
> From: Randolph Sapp <rs@ti.com>
>
> GLFW has the ability to use a wayland backend. This patch adds a config
> for it, but does not enable it by default because it has a dependency on
> extra-cmake-modules which is provided (most commonly) by meta-qt5-extra.
>
> Signed-off-by: Randolph Sapp <rs@ti.com>
> ---
>   meta-oe/recipes-core/glfw/glfw_3.3.bb | 14 ++++++++++++--
>   1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/meta-oe/recipes-core/glfw/glfw_3.3.bb b/meta-oe/recipes-core/glfw/glfw_3.3.bb
> index b31bba6b6b..5b0d61241e 100644
> --- a/meta-oe/recipes-core/glfw/glfw_3.3.bb
> +++ b/meta-oe/recipes-core/glfw/glfw_3.3.bb
> @@ -20,7 +20,17 @@ EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DGLFW_BUILD_DOCS=OFF"
>   
>   CFLAGS += "-fPIC"
>   
> -DEPENDS = "libpng libglu zlib libxrandr libxinerama libxi libxcursor"
> -REQUIRED_DISTRO_FEATURES = "x11 opengl"
> +DEPENDS = "libpng libglu zlib"
> +REQUIRED_DISTRO_FEATURES = "opengl"
> +ANY_OF_DISTRO_FEATURES = "wayland x11"
> +
> +# upstream considers x11 and wayland backends mutually exclusive and will
> +# prioritize wayland if it is enabled, but wayland has dependencies that cannot
> +# be satisfied by this layer so it is disabled by default
> +
> +PACKAGECONFIG ??= "x11"
> +
> +PACKAGECONFIG[wayland] = "-DGLFW_USE_WAYLAND=ON,,wayland wayland-native wayland-protocols extra-cmake-modules libxkbcommon"
> +PACKAGECONFIG[x11] = ",,libxrandr libxinerama libxi libxcursor"
>   
>   COMPATIBLE_HOST:libc-musl = "null"
Randolph Sapp April 28, 2023, 4:32 p.m. UTC | #7
On 4/28/23 06:16, akuster808 wrote:
> Doesn't this need to land it Master first? Kirkstone is in the subject
> 
> - armin
> 

Perhaps, but I've only had a chance to test it against kirkstone so I 
flagged it as such. At this point I'm still vetting solutions to this 
dependency chain though. Looking for something this layer would actually 
like to carry.

> On 4/27/23 12:47 PM, rs@ti.com wrote:
>> From: Randolph Sapp <rs@ti.com>
>>
>> GLFW has the ability to use a wayland backend. This patch adds a config
>> for it, but does not enable it by default because it has a dependency on
>> extra-cmake-modules which is provided (most commonly) by meta-qt5-extra.
>>
>> Signed-off-by: Randolph Sapp <rs@ti.com>
>> ---
>>   meta-oe/recipes-core/glfw/glfw_3.3.bb | 14 ++++++++++++--
>>   1 file changed, 12 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta-oe/recipes-core/glfw/glfw_3.3.bb 
>> b/meta-oe/recipes-core/glfw/glfw_3.3.bb
>> index b31bba6b6b..5b0d61241e 100644
>> --- a/meta-oe/recipes-core/glfw/glfw_3.3.bb
>> +++ b/meta-oe/recipes-core/glfw/glfw_3.3.bb
>> @@ -20,7 +20,17 @@ EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON 
>> -DGLFW_BUILD_DOCS=OFF"
>>   CFLAGS += "-fPIC"
>> -DEPENDS = "libpng libglu zlib libxrandr libxinerama libxi libxcursor"
>> -REQUIRED_DISTRO_FEATURES = "x11 opengl"
>> +DEPENDS = "libpng libglu zlib"
>> +REQUIRED_DISTRO_FEATURES = "opengl"
>> +ANY_OF_DISTRO_FEATURES = "wayland x11"
>> +
>> +# upstream considers x11 and wayland backends mutually exclusive and 
>> will
>> +# prioritize wayland if it is enabled, but wayland has dependencies 
>> that cannot
>> +# be satisfied by this layer so it is disabled by default
>> +
>> +PACKAGECONFIG ??= "x11"
>> +
>> +PACKAGECONFIG[wayland] = "-DGLFW_USE_WAYLAND=ON,,wayland 
>> wayland-native wayland-protocols extra-cmake-modules libxkbcommon"
>> +PACKAGECONFIG[x11] = ",,libxrandr libxinerama libxi libxcursor"
>>   COMPATIBLE_HOST:libc-musl = "null"
>
Martin Jansa May 2, 2023, 3:56 p.m. UTC | #8
The version which was merged with:

PACKAGECONFIG ??= "x11"

Should still respect x11 in DISTRO_FEATURES, now this causes:

ERROR: Nothing PROVIDES 'libxi' (but meta-oe/recipes-core/glfw/glfw_3.3.bb
DEPENDS on or otherwise requires it)
libxi was skipped: missing required distro feature 'x11' (not in
DISTRO_FEATURES)
ERROR: Nothing PROVIDES 'libxinerama' (but meta-oe/recipes-core/glfw/
glfw_3.3.bb DEPENDS on or otherwise requires it)
libxinerama was skipped: missing required distro feature 'x11' (not in
DISTRO_FEATURES)
ERROR: Nothing PROVIDES 'libxrandr' (but meta-oe/recipes-core/glfw/
glfw_3.3.bb DEPENDS on or otherwise requires it)
libxrandr was skipped: missing required distro feature 'x11' (not in
DISTRO_FEATURES)
ERROR: Nothing PROVIDES 'libglu' (but meta-oe/recipes-core/glfw/glfw_3.3.bb
DEPENDS on or otherwise requires it)
libglu was skipped: missing required distro feature 'x11' (not in
DISTRO_FEATURES)
ERROR: Nothing PROVIDES 'libxcursor' (but meta-oe/recipes-core/glfw/
glfw_3.3.bb DEPENDS on or otherwise requires it)
libxcursor was skipped: missing required distro feature 'x11' (not in
DISTRO_FEATURES)

when wayland and opengl are in DISTRO_FEATURES, but x11 isn't.

REQUIRED_DISTRO_FEATURES is satisfied by "opengl" and
ANY_OF_DISTRO_FEATURES by "wayland", but the default PACKAGECONFIG doesn't
match with that.

On Fri, Apr 28, 2023 at 6:32 PM Randolph Sapp via lists.openembedded.org
<rs=ti.com@lists.openembedded.org> wrote:

> On 4/28/23 06:16, akuster808 wrote:
> > Doesn't this need to land it Master first? Kirkstone is in the subject
> >
> > - armin
> >
>
> Perhaps, but I've only had a chance to test it against kirkstone so I
> flagged it as such. At this point I'm still vetting solutions to this
> dependency chain though. Looking for something this layer would actually
> like to carry.
>
> > On 4/27/23 12:47 PM, rs@ti.com wrote:
> >> From: Randolph Sapp <rs@ti.com>
> >>
> >> GLFW has the ability to use a wayland backend. This patch adds a config
> >> for it, but does not enable it by default because it has a dependency on
> >> extra-cmake-modules which is provided (most commonly) by meta-qt5-extra.
> >>
> >> Signed-off-by: Randolph Sapp <rs@ti.com>
> >> ---
> >>   meta-oe/recipes-core/glfw/glfw_3.3.bb | 14 ++++++++++++--
> >>   1 file changed, 12 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/meta-oe/recipes-core/glfw/glfw_3.3.bb
> >> b/meta-oe/recipes-core/glfw/glfw_3.3.bb
> >> index b31bba6b6b..5b0d61241e 100644
> >> --- a/meta-oe/recipes-core/glfw/glfw_3.3.bb
> >> +++ b/meta-oe/recipes-core/glfw/glfw_3.3.bb
> >> @@ -20,7 +20,17 @@ EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON
> >> -DGLFW_BUILD_DOCS=OFF"
> >>   CFLAGS += "-fPIC"
> >> -DEPENDS = "libpng libglu zlib libxrandr libxinerama libxi libxcursor"
> >> -REQUIRED_DISTRO_FEATURES = "x11 opengl"
> >> +DEPENDS = "libpng libglu zlib"
> >> +REQUIRED_DISTRO_FEATURES = "opengl"
> >> +ANY_OF_DISTRO_FEATURES = "wayland x11"
> >> +
> >> +# upstream considers x11 and wayland backends mutually exclusive and
> >> will
> >> +# prioritize wayland if it is enabled, but wayland has dependencies
> >> that cannot
> >> +# be satisfied by this layer so it is disabled by default
> >> +
> >> +PACKAGECONFIG ??= "x11"
> >> +
> >> +PACKAGECONFIG[wayland] = "-DGLFW_USE_WAYLAND=ON,,wayland
> >> wayland-native wayland-protocols extra-cmake-modules libxkbcommon"
> >> +PACKAGECONFIG[x11] = ",,libxrandr libxinerama libxi libxcursor"
> >>   COMPATIBLE_HOST:libc-musl = "null"
> >
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#102225):
> https://lists.openembedded.org/g/openembedded-devel/message/102225
> Mute This Topic: https://lists.openembedded.org/mt/98540896/3617156
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [
> Martin.Jansa@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Randolph Sapp May 2, 2023, 4:06 p.m. UTC | #9
On 5/2/23 10:56, Martin Jansa wrote:
> The version which was merged with:
> 
> PACKAGECONFIG ??= "x11"
> 
> Should still respect x11 in DISTRO_FEATURES, now this causes:
> 
> ERROR: Nothing PROVIDES 'libxi' (but 
> meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on or 
> otherwise requires it)
> libxi was skipped: missing required distro feature 'x11' (not in 
> DISTRO_FEATURES)
> ERROR: Nothing PROVIDES 'libxinerama' (but 
> meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on or 
> otherwise requires it)
> libxinerama was skipped: missing required distro feature 'x11' (not in 
> DISTRO_FEATURES)
> ERROR: Nothing PROVIDES 'libxrandr' (but 
> meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on or 
> otherwise requires it)
> libxrandr was skipped: missing required distro feature 'x11' (not in 
> DISTRO_FEATURES)
> ERROR: Nothing PROVIDES 'libglu' (but 
> meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on or 
> otherwise requires it)
> libglu was skipped: missing required distro feature 'x11' (not in 
> DISTRO_FEATURES)
> ERROR: Nothing PROVIDES 'libxcursor' (but 
> meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on or 
> otherwise requires it)
> libxcursor was skipped: missing required distro feature 'x11' (not in 
> DISTRO_FEATURES)
> 
> when wayland and opengl are in DISTRO_FEATURES, but x11 isn't.
> 

Yeah, that's expected behavior at this point. You need to manually 
override the PACKAGECONFIG for wayland in this patch. Just slightly 
better than no wayland at all.

The only way we can get around it is if this layer or one of it's 
dependencies decides to adopt extra-cmake-modules. They the 
packageconfig can automatically configure itself. Discussion on who's 
job it is to carry this package has yet to conclude.

> REQUIRED_DISTRO_FEATURES is satisfied by "opengl" and 
> ANY_OF_DISTRO_FEATURES by "wayland", but the default PACKAGECONFIG 
> doesn't match with that.
> 
> On Fri, Apr 28, 2023 at 6:32 PM Randolph Sapp via lists.openembedded.org 
> <http://lists.openembedded.org> <rs=ti.com@lists.openembedded.org 
> <mailto:ti.com@lists.openembedded.org>> wrote:
> 
>     On 4/28/23 06:16, akuster808 wrote:
>      > Doesn't this need to land it Master first? Kirkstone is in the
>     subject
>      >
>      > - armin
>      >
> 
>     Perhaps, but I've only had a chance to test it against kirkstone so I
>     flagged it as such. At this point I'm still vetting solutions to this
>     dependency chain though. Looking for something this layer would
>     actually
>     like to carry.
> 
>      > On 4/27/23 12:47 PM, rs@ti.com <mailto:rs@ti.com> wrote:
>      >> From: Randolph Sapp <rs@ti.com <mailto:rs@ti.com>>
>      >>
>      >> GLFW has the ability to use a wayland backend. This patch adds a
>     config
>      >> for it, but does not enable it by default because it has a
>     dependency on
>      >> extra-cmake-modules which is provided (most commonly) by
>     meta-qt5-extra.
>      >>
>      >> Signed-off-by: Randolph Sapp <rs@ti.com <mailto:rs@ti.com>>
>      >> ---
>      >>   meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> |
>     14 ++++++++++++--
>      >>   1 file changed, 12 insertions(+), 2 deletions(-)
>      >>
>      >> diff --git a/meta-oe/recipes-core/glfw/glfw_3.3.bb
>     <http://glfw_3.3.bb>
>      >> b/meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb>
>      >> index b31bba6b6b..5b0d61241e 100644
>      >> --- a/meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb>
>      >> +++ b/meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb>
>      >> @@ -20,7 +20,17 @@ EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON
>      >> -DGLFW_BUILD_DOCS=OFF"
>      >>   CFLAGS += "-fPIC"
>      >> -DEPENDS = "libpng libglu zlib libxrandr libxinerama libxi
>     libxcursor"
>      >> -REQUIRED_DISTRO_FEATURES = "x11 opengl"
>      >> +DEPENDS = "libpng libglu zlib"
>      >> +REQUIRED_DISTRO_FEATURES = "opengl"
>      >> +ANY_OF_DISTRO_FEATURES = "wayland x11"
>      >> +
>      >> +# upstream considers x11 and wayland backends mutually
>     exclusive and
>      >> will
>      >> +# prioritize wayland if it is enabled, but wayland has
>     dependencies
>      >> that cannot
>      >> +# be satisfied by this layer so it is disabled by default
>      >> +
>      >> +PACKAGECONFIG ??= "x11"
>      >> +
>      >> +PACKAGECONFIG[wayland] = "-DGLFW_USE_WAYLAND=ON,,wayland
>      >> wayland-native wayland-protocols extra-cmake-modules libxkbcommon"
>      >> +PACKAGECONFIG[x11] = ",,libxrandr libxinerama libxi libxcursor"
>      >>   COMPATIBLE_HOST:libc-musl = "null"
>      >
> 
> 
>     -=-=-=-=-=-=-=-=-=-=-=-
>     Links: You receive all messages sent to this group.
>     View/Reply Online (#102225):
>     https://lists.openembedded.org/g/openembedded-devel/message/102225
>     <https://lists.openembedded.org/g/openembedded-devel/message/102225>
>     Mute This Topic: https://lists.openembedded.org/mt/98540896/3617156
>     <https://lists.openembedded.org/mt/98540896/3617156>
>     Group Owner: openembedded-devel+owner@lists.openembedded.org
>     <mailto:openembedded-devel%2Bowner@lists.openembedded.org>
>     Unsubscribe:
>     https://lists.openembedded.org/g/openembedded-devel/unsub
>     <https://lists.openembedded.org/g/openembedded-devel/unsub>
>     [Martin.Jansa@gmail.com <mailto:Martin.Jansa@gmail.com>]
>     -=-=-=-=-=-=-=-=-=-=-=-
>
Khem Raj May 2, 2023, 4:08 p.m. UTC | #10
On Tue, May 2, 2023 at 9:06 AM Randolph Sapp <rs@ti.com> wrote:
>
> On 5/2/23 10:56, Martin Jansa wrote:
> > The version which was merged with:
> >
> > PACKAGECONFIG ??= "x11"
> >
> > Should still respect x11 in DISTRO_FEATURES, now this causes:
> >
> > ERROR: Nothing PROVIDES 'libxi' (but
> > meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on or
> > otherwise requires it)
> > libxi was skipped: missing required distro feature 'x11' (not in
> > DISTRO_FEATURES)
> > ERROR: Nothing PROVIDES 'libxinerama' (but
> > meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on or
> > otherwise requires it)
> > libxinerama was skipped: missing required distro feature 'x11' (not in
> > DISTRO_FEATURES)
> > ERROR: Nothing PROVIDES 'libxrandr' (but
> > meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on or
> > otherwise requires it)
> > libxrandr was skipped: missing required distro feature 'x11' (not in
> > DISTRO_FEATURES)
> > ERROR: Nothing PROVIDES 'libglu' (but
> > meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on or
> > otherwise requires it)
> > libglu was skipped: missing required distro feature 'x11' (not in
> > DISTRO_FEATURES)
> > ERROR: Nothing PROVIDES 'libxcursor' (but
> > meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on or
> > otherwise requires it)
> > libxcursor was skipped: missing required distro feature 'x11' (not in
> > DISTRO_FEATURES)
> >
> > when wayland and opengl are in DISTRO_FEATURES, but x11 isn't.
> >
>
> Yeah, that's expected behavior at this point. You need to manually
> override the PACKAGECONFIG for wayland in this patch. Just slightly
> better than no wayland at all.
>
> The only way we can get around it is if this layer or one of it's
> dependencies decides to adopt extra-cmake-modules. They the
> packageconfig can automatically configure itself. Discussion on who's
> job it is to carry this package has yet to conclude.
>

May be bring it to meta-oe at this point.

> > REQUIRED_DISTRO_FEATURES is satisfied by "opengl" and
> > ANY_OF_DISTRO_FEATURES by "wayland", but the default PACKAGECONFIG
> > doesn't match with that.
> >
> > On Fri, Apr 28, 2023 at 6:32 PM Randolph Sapp via lists.openembedded.org
> > <http://lists.openembedded.org> <rs=ti.com@lists.openembedded.org
> > <mailto:ti.com@lists.openembedded.org>> wrote:
> >
> >     On 4/28/23 06:16, akuster808 wrote:
> >      > Doesn't this need to land it Master first? Kirkstone is in the
> >     subject
> >      >
> >      > - armin
> >      >
> >
> >     Perhaps, but I've only had a chance to test it against kirkstone so I
> >     flagged it as such. At this point I'm still vetting solutions to this
> >     dependency chain though. Looking for something this layer would
> >     actually
> >     like to carry.
> >
> >      > On 4/27/23 12:47 PM, rs@ti.com <mailto:rs@ti.com> wrote:
> >      >> From: Randolph Sapp <rs@ti.com <mailto:rs@ti.com>>
> >      >>
> >      >> GLFW has the ability to use a wayland backend. This patch adds a
> >     config
> >      >> for it, but does not enable it by default because it has a
> >     dependency on
> >      >> extra-cmake-modules which is provided (most commonly) by
> >     meta-qt5-extra.
> >      >>
> >      >> Signed-off-by: Randolph Sapp <rs@ti.com <mailto:rs@ti.com>>
> >      >> ---
> >      >>   meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> |
> >     14 ++++++++++++--
> >      >>   1 file changed, 12 insertions(+), 2 deletions(-)
> >      >>
> >      >> diff --git a/meta-oe/recipes-core/glfw/glfw_3.3.bb
> >     <http://glfw_3.3.bb>
> >      >> b/meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb>
> >      >> index b31bba6b6b..5b0d61241e 100644
> >      >> --- a/meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb>
> >      >> +++ b/meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb>
> >      >> @@ -20,7 +20,17 @@ EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON
> >      >> -DGLFW_BUILD_DOCS=OFF"
> >      >>   CFLAGS += "-fPIC"
> >      >> -DEPENDS = "libpng libglu zlib libxrandr libxinerama libxi
> >     libxcursor"
> >      >> -REQUIRED_DISTRO_FEATURES = "x11 opengl"
> >      >> +DEPENDS = "libpng libglu zlib"
> >      >> +REQUIRED_DISTRO_FEATURES = "opengl"
> >      >> +ANY_OF_DISTRO_FEATURES = "wayland x11"
> >      >> +
> >      >> +# upstream considers x11 and wayland backends mutually
> >     exclusive and
> >      >> will
> >      >> +# prioritize wayland if it is enabled, but wayland has
> >     dependencies
> >      >> that cannot
> >      >> +# be satisfied by this layer so it is disabled by default
> >      >> +
> >      >> +PACKAGECONFIG ??= "x11"
> >      >> +
> >      >> +PACKAGECONFIG[wayland] = "-DGLFW_USE_WAYLAND=ON,,wayland
> >      >> wayland-native wayland-protocols extra-cmake-modules libxkbcommon"
> >      >> +PACKAGECONFIG[x11] = ",,libxrandr libxinerama libxi libxcursor"
> >      >>   COMPATIBLE_HOST:libc-musl = "null"
> >      >
> >
> >
> >     -=-=-=-=-=-=-=-=-=-=-=-
> >     Links: You receive all messages sent to this group.
> >     View/Reply Online (#102225):
> >     https://lists.openembedded.org/g/openembedded-devel/message/102225
> >     <https://lists.openembedded.org/g/openembedded-devel/message/102225>
> >     Mute This Topic: https://lists.openembedded.org/mt/98540896/3617156
> >     <https://lists.openembedded.org/mt/98540896/3617156>
> >     Group Owner: openembedded-devel+owner@lists.openembedded.org
> >     <mailto:openembedded-devel%2Bowner@lists.openembedded.org>
> >     Unsubscribe:
> >     https://lists.openembedded.org/g/openembedded-devel/unsub
> >     <https://lists.openembedded.org/g/openembedded-devel/unsub>
> >     [Martin.Jansa@gmail.com <mailto:Martin.Jansa@gmail.com>]
> >     -=-=-=-=-=-=-=-=-=-=-=-
> >
>
Randolph Sapp May 2, 2023, 4:13 p.m. UTC | #11
On 5/2/23 11:08, Khem Raj wrote:
> On Tue, May 2, 2023 at 9:06 AM Randolph Sapp <rs@ti.com> wrote:
>>
>> On 5/2/23 10:56, Martin Jansa wrote:
>>> The version which was merged with:
>>>
>>> PACKAGECONFIG ??= "x11"
>>>
>>> Should still respect x11 in DISTRO_FEATURES, now this causes:
>>>
>>> ERROR: Nothing PROVIDES 'libxi' (but
>>> meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on or
>>> otherwise requires it)
>>> libxi was skipped: missing required distro feature 'x11' (not in
>>> DISTRO_FEATURES)
>>> ERROR: Nothing PROVIDES 'libxinerama' (but
>>> meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on or
>>> otherwise requires it)
>>> libxinerama was skipped: missing required distro feature 'x11' (not in
>>> DISTRO_FEATURES)
>>> ERROR: Nothing PROVIDES 'libxrandr' (but
>>> meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on or
>>> otherwise requires it)
>>> libxrandr was skipped: missing required distro feature 'x11' (not in
>>> DISTRO_FEATURES)
>>> ERROR: Nothing PROVIDES 'libglu' (but
>>> meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on or
>>> otherwise requires it)
>>> libglu was skipped: missing required distro feature 'x11' (not in
>>> DISTRO_FEATURES)
>>> ERROR: Nothing PROVIDES 'libxcursor' (but
>>> meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on or
>>> otherwise requires it)
>>> libxcursor was skipped: missing required distro feature 'x11' (not in
>>> DISTRO_FEATURES)
>>>
>>> when wayland and opengl are in DISTRO_FEATURES, but x11 isn't.
>>>
>>
>> Yeah, that's expected behavior at this point. You need to manually
>> override the PACKAGECONFIG for wayland in this patch. Just slightly
>> better than no wayland at all.
>>
>> The only way we can get around it is if this layer or one of it's
>> dependencies decides to adopt extra-cmake-modules. They the
>> packageconfig can automatically configure itself. Discussion on who's
>> job it is to carry this package has yet to conclude.
>>
> 
> May be bring it to meta-oe at this point.

Roger. Patches Soon™

> 
>>> REQUIRED_DISTRO_FEATURES is satisfied by "opengl" and
>>> ANY_OF_DISTRO_FEATURES by "wayland", but the default PACKAGECONFIG
>>> doesn't match with that.
>>>
>>> On Fri, Apr 28, 2023 at 6:32 PM Randolph Sapp via lists.openembedded.org
>>> <http://lists.openembedded.org> <rs=ti.com@lists.openembedded.org
>>> <mailto:ti.com@lists.openembedded.org>> wrote:
>>>
>>>      On 4/28/23 06:16, akuster808 wrote:
>>>       > Doesn't this need to land it Master first? Kirkstone is in the
>>>      subject
>>>       >
>>>       > - armin
>>>       >
>>>
>>>      Perhaps, but I've only had a chance to test it against kirkstone so I
>>>      flagged it as such. At this point I'm still vetting solutions to this
>>>      dependency chain though. Looking for something this layer would
>>>      actually
>>>      like to carry.
>>>
>>>       > On 4/27/23 12:47 PM, rs@ti.com <mailto:rs@ti.com> wrote:
>>>       >> From: Randolph Sapp <rs@ti.com <mailto:rs@ti.com>>
>>>       >>
>>>       >> GLFW has the ability to use a wayland backend. This patch adds a
>>>      config
>>>       >> for it, but does not enable it by default because it has a
>>>      dependency on
>>>       >> extra-cmake-modules which is provided (most commonly) by
>>>      meta-qt5-extra.
>>>       >>
>>>       >> Signed-off-by: Randolph Sapp <rs@ti.com <mailto:rs@ti.com>>
>>>       >> ---
>>>       >>   meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> |
>>>      14 ++++++++++++--
>>>       >>   1 file changed, 12 insertions(+), 2 deletions(-)
>>>       >>
>>>       >> diff --git a/meta-oe/recipes-core/glfw/glfw_3.3.bb
>>>      <http://glfw_3.3.bb>
>>>       >> b/meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb>
>>>       >> index b31bba6b6b..5b0d61241e 100644
>>>       >> --- a/meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb>
>>>       >> +++ b/meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb>
>>>       >> @@ -20,7 +20,17 @@ EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON
>>>       >> -DGLFW_BUILD_DOCS=OFF"
>>>       >>   CFLAGS += "-fPIC"
>>>       >> -DEPENDS = "libpng libglu zlib libxrandr libxinerama libxi
>>>      libxcursor"
>>>       >> -REQUIRED_DISTRO_FEATURES = "x11 opengl"
>>>       >> +DEPENDS = "libpng libglu zlib"
>>>       >> +REQUIRED_DISTRO_FEATURES = "opengl"
>>>       >> +ANY_OF_DISTRO_FEATURES = "wayland x11"
>>>       >> +
>>>       >> +# upstream considers x11 and wayland backends mutually
>>>      exclusive and
>>>       >> will
>>>       >> +# prioritize wayland if it is enabled, but wayland has
>>>      dependencies
>>>       >> that cannot
>>>       >> +# be satisfied by this layer so it is disabled by default
>>>       >> +
>>>       >> +PACKAGECONFIG ??= "x11"
>>>       >> +
>>>       >> +PACKAGECONFIG[wayland] = "-DGLFW_USE_WAYLAND=ON,,wayland
>>>       >> wayland-native wayland-protocols extra-cmake-modules libxkbcommon"
>>>       >> +PACKAGECONFIG[x11] = ",,libxrandr libxinerama libxi libxcursor"
>>>       >>   COMPATIBLE_HOST:libc-musl = "null"
>>>       >
>>>
>>>
>>>      -=-=-=-=-=-=-=-=-=-=-=-
>>>      Links: You receive all messages sent to this group.
>>>      View/Reply Online (#102225):
>>>      https://lists.openembedded.org/g/openembedded-devel/message/102225
>>>      <https://lists.openembedded.org/g/openembedded-devel/message/102225>
>>>      Mute This Topic: https://lists.openembedded.org/mt/98540896/3617156
>>>      <https://lists.openembedded.org/mt/98540896/3617156>
>>>      Group Owner: openembedded-devel+owner@lists.openembedded.org
>>>      <mailto:openembedded-devel%2Bowner@lists.openembedded.org>
>>>      Unsubscribe:
>>>      https://lists.openembedded.org/g/openembedded-devel/unsub
>>>      <https://lists.openembedded.org/g/openembedded-devel/unsub>
>>>      [Martin.Jansa@gmail.com <mailto:Martin.Jansa@gmail.com>]
>>>      -=-=-=-=-=-=-=-=-=-=-=-
>>>
>>
Denys Dmytriyenko May 2, 2023, 4:59 p.m. UTC | #12
On Tue, May 02, 2023 at 09:08:07AM -0700, Khem Raj wrote:
> On Tue, May 2, 2023 at 9:06 AM Randolph Sapp <rs@ti.com> wrote:
> >
> > On 5/2/23 10:56, Martin Jansa wrote:
> > > The version which was merged with:
> > >
> > > PACKAGECONFIG ??= "x11"
> > >
> > > Should still respect x11 in DISTRO_FEATURES, now this causes:
> > >
> > > ERROR: Nothing PROVIDES 'libxi' (but
> > > meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on or
> > > otherwise requires it)
> > > libxi was skipped: missing required distro feature 'x11' (not in
> > > DISTRO_FEATURES)
> > > ERROR: Nothing PROVIDES 'libxinerama' (but
> > > meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on or
> > > otherwise requires it)
> > > libxinerama was skipped: missing required distro feature 'x11' (not in
> > > DISTRO_FEATURES)
> > > ERROR: Nothing PROVIDES 'libxrandr' (but
> > > meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on or
> > > otherwise requires it)
> > > libxrandr was skipped: missing required distro feature 'x11' (not in
> > > DISTRO_FEATURES)
> > > ERROR: Nothing PROVIDES 'libglu' (but
> > > meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on or
> > > otherwise requires it)
> > > libglu was skipped: missing required distro feature 'x11' (not in
> > > DISTRO_FEATURES)
> > > ERROR: Nothing PROVIDES 'libxcursor' (but
> > > meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on or
> > > otherwise requires it)
> > > libxcursor was skipped: missing required distro feature 'x11' (not in
> > > DISTRO_FEATURES)
> > >
> > > when wayland and opengl are in DISTRO_FEATURES, but x11 isn't.
> > >
> >
> > Yeah, that's expected behavior at this point. You need to manually
> > override the PACKAGECONFIG for wayland in this patch. Just slightly
> > better than no wayland at all.
> >
> > The only way we can get around it is if this layer or one of it's
> > dependencies decides to adopt extra-cmake-modules. They the
> > packageconfig can automatically configure itself. Discussion on who's
> > job it is to carry this package has yet to conclude.
> >
> 
> May be bring it to meta-oe at this point.

I wonder if it would be better/cleaner to extract a single CMake module this 
glfw package needs to configure wayland support and carry it locally, instead 
of bringing in the entire KDE-specific set of such CMake modules and be on the 
hook for updating it forever?
https://api.kde.org/frameworks/extra-cmake-modules/html/index.html
https://invent.kde.org/frameworks/extra-cmake-modules


> > > REQUIRED_DISTRO_FEATURES is satisfied by "opengl" and
> > > ANY_OF_DISTRO_FEATURES by "wayland", but the default PACKAGECONFIG
> > > doesn't match with that.
> > >
> > > On Fri, Apr 28, 2023 at 6:32 PM Randolph Sapp via lists.openembedded.org
> > > <http://lists.openembedded.org> <rs=ti.com@lists.openembedded.org
> > > <mailto:ti.com@lists.openembedded.org>> wrote:
> > >
> > >     On 4/28/23 06:16, akuster808 wrote:
> > >      > Doesn't this need to land it Master first? Kirkstone is in the
> > >     subject
> > >      >
> > >      > - armin
> > >      >
> > >
> > >     Perhaps, but I've only had a chance to test it against kirkstone so I
> > >     flagged it as such. At this point I'm still vetting solutions to this
> > >     dependency chain though. Looking for something this layer would
> > >     actually
> > >     like to carry.
> > >
> > >      > On 4/27/23 12:47 PM, rs@ti.com <mailto:rs@ti.com> wrote:
> > >      >> From: Randolph Sapp <rs@ti.com <mailto:rs@ti.com>>
> > >      >>
> > >      >> GLFW has the ability to use a wayland backend. This patch adds a
> > >     config
> > >      >> for it, but does not enable it by default because it has a
> > >     dependency on
> > >      >> extra-cmake-modules which is provided (most commonly) by
> > >     meta-qt5-extra.
> > >      >>
> > >      >> Signed-off-by: Randolph Sapp <rs@ti.com <mailto:rs@ti.com>>
> > >      >> ---
> > >      >>   meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> |
> > >     14 ++++++++++++--
> > >      >>   1 file changed, 12 insertions(+), 2 deletions(-)
> > >      >>
> > >      >> diff --git a/meta-oe/recipes-core/glfw/glfw_3.3.bb
> > >     <http://glfw_3.3.bb>
> > >      >> b/meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb>
> > >      >> index b31bba6b6b..5b0d61241e 100644
> > >      >> --- a/meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb>
> > >      >> +++ b/meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb>
> > >      >> @@ -20,7 +20,17 @@ EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON
> > >      >> -DGLFW_BUILD_DOCS=OFF"
> > >      >>   CFLAGS += "-fPIC"
> > >      >> -DEPENDS = "libpng libglu zlib libxrandr libxinerama libxi
> > >     libxcursor"
> > >      >> -REQUIRED_DISTRO_FEATURES = "x11 opengl"
> > >      >> +DEPENDS = "libpng libglu zlib"
> > >      >> +REQUIRED_DISTRO_FEATURES = "opengl"
> > >      >> +ANY_OF_DISTRO_FEATURES = "wayland x11"
> > >      >> +
> > >      >> +# upstream considers x11 and wayland backends mutually
> > >     exclusive and
> > >      >> will
> > >      >> +# prioritize wayland if it is enabled, but wayland has
> > >     dependencies
> > >      >> that cannot
> > >      >> +# be satisfied by this layer so it is disabled by default
> > >      >> +
> > >      >> +PACKAGECONFIG ??= "x11"
> > >      >> +
> > >      >> +PACKAGECONFIG[wayland] = "-DGLFW_USE_WAYLAND=ON,,wayland
> > >      >> wayland-native wayland-protocols extra-cmake-modules libxkbcommon"
> > >      >> +PACKAGECONFIG[x11] = ",,libxrandr libxinerama libxi libxcursor"
> > >      >>   COMPATIBLE_HOST:libc-musl = "null"
Khem Raj May 2, 2023, 5:04 p.m. UTC | #13
On Tue, May 2, 2023 at 10:00 AM Denys Dmytriyenko <denis@denix.org> wrote:
>
> On Tue, May 02, 2023 at 09:08:07AM -0700, Khem Raj wrote:
> > On Tue, May 2, 2023 at 9:06 AM Randolph Sapp <rs@ti.com> wrote:
> > >
> > > On 5/2/23 10:56, Martin Jansa wrote:
> > > > The version which was merged with:
> > > >
> > > > PACKAGECONFIG ??= "x11"
> > > >
> > > > Should still respect x11 in DISTRO_FEATURES, now this causes:
> > > >
> > > > ERROR: Nothing PROVIDES 'libxi' (but
> > > > meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on or
> > > > otherwise requires it)
> > > > libxi was skipped: missing required distro feature 'x11' (not in
> > > > DISTRO_FEATURES)
> > > > ERROR: Nothing PROVIDES 'libxinerama' (but
> > > > meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on or
> > > > otherwise requires it)
> > > > libxinerama was skipped: missing required distro feature 'x11' (not in
> > > > DISTRO_FEATURES)
> > > > ERROR: Nothing PROVIDES 'libxrandr' (but
> > > > meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on or
> > > > otherwise requires it)
> > > > libxrandr was skipped: missing required distro feature 'x11' (not in
> > > > DISTRO_FEATURES)
> > > > ERROR: Nothing PROVIDES 'libglu' (but
> > > > meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on or
> > > > otherwise requires it)
> > > > libglu was skipped: missing required distro feature 'x11' (not in
> > > > DISTRO_FEATURES)
> > > > ERROR: Nothing PROVIDES 'libxcursor' (but
> > > > meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on or
> > > > otherwise requires it)
> > > > libxcursor was skipped: missing required distro feature 'x11' (not in
> > > > DISTRO_FEATURES)
> > > >
> > > > when wayland and opengl are in DISTRO_FEATURES, but x11 isn't.
> > > >
> > >
> > > Yeah, that's expected behavior at this point. You need to manually
> > > override the PACKAGECONFIG for wayland in this patch. Just slightly
> > > better than no wayland at all.
> > >
> > > The only way we can get around it is if this layer or one of it's
> > > dependencies decides to adopt extra-cmake-modules. They the
> > > packageconfig can automatically configure itself. Discussion on who's
> > > job it is to carry this package has yet to conclude.
> > >
> >
> > May be bring it to meta-oe at this point.
>
> I wonder if it would be better/cleaner to extract a single CMake module this
> glfw package needs to configure wayland support and carry it locally, instead
> of bringing in the entire KDE-specific set of such CMake modules and be on the
> hook for updating it forever?
> https://api.kde.org/frameworks/extra-cmake-modules/html/index.html
> https://invent.kde.org/frameworks/extra-cmake-modules
>

if it does not get updated often then it should be fine too. Its
maintenance either way

>
> > > > REQUIRED_DISTRO_FEATURES is satisfied by "opengl" and
> > > > ANY_OF_DISTRO_FEATURES by "wayland", but the default PACKAGECONFIG
> > > > doesn't match with that.
> > > >
> > > > On Fri, Apr 28, 2023 at 6:32 PM Randolph Sapp via lists.openembedded.org
> > > > <http://lists.openembedded.org> <rs=ti.com@lists.openembedded.org
> > > > <mailto:ti.com@lists.openembedded.org>> wrote:
> > > >
> > > >     On 4/28/23 06:16, akuster808 wrote:
> > > >      > Doesn't this need to land it Master first? Kirkstone is in the
> > > >     subject
> > > >      >
> > > >      > - armin
> > > >      >
> > > >
> > > >     Perhaps, but I've only had a chance to test it against kirkstone so I
> > > >     flagged it as such. At this point I'm still vetting solutions to this
> > > >     dependency chain though. Looking for something this layer would
> > > >     actually
> > > >     like to carry.
> > > >
> > > >      > On 4/27/23 12:47 PM, rs@ti.com <mailto:rs@ti.com> wrote:
> > > >      >> From: Randolph Sapp <rs@ti.com <mailto:rs@ti.com>>
> > > >      >>
> > > >      >> GLFW has the ability to use a wayland backend. This patch adds a
> > > >     config
> > > >      >> for it, but does not enable it by default because it has a
> > > >     dependency on
> > > >      >> extra-cmake-modules which is provided (most commonly) by
> > > >     meta-qt5-extra.
> > > >      >>
> > > >      >> Signed-off-by: Randolph Sapp <rs@ti.com <mailto:rs@ti.com>>
> > > >      >> ---
> > > >      >>   meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> |
> > > >     14 ++++++++++++--
> > > >      >>   1 file changed, 12 insertions(+), 2 deletions(-)
> > > >      >>
> > > >      >> diff --git a/meta-oe/recipes-core/glfw/glfw_3.3.bb
> > > >     <http://glfw_3.3.bb>
> > > >      >> b/meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb>
> > > >      >> index b31bba6b6b..5b0d61241e 100644
> > > >      >> --- a/meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb>
> > > >      >> +++ b/meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb>
> > > >      >> @@ -20,7 +20,17 @@ EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON
> > > >      >> -DGLFW_BUILD_DOCS=OFF"
> > > >      >>   CFLAGS += "-fPIC"
> > > >      >> -DEPENDS = "libpng libglu zlib libxrandr libxinerama libxi
> > > >     libxcursor"
> > > >      >> -REQUIRED_DISTRO_FEATURES = "x11 opengl"
> > > >      >> +DEPENDS = "libpng libglu zlib"
> > > >      >> +REQUIRED_DISTRO_FEATURES = "opengl"
> > > >      >> +ANY_OF_DISTRO_FEATURES = "wayland x11"
> > > >      >> +
> > > >      >> +# upstream considers x11 and wayland backends mutually
> > > >     exclusive and
> > > >      >> will
> > > >      >> +# prioritize wayland if it is enabled, but wayland has
> > > >     dependencies
> > > >      >> that cannot
> > > >      >> +# be satisfied by this layer so it is disabled by default
> > > >      >> +
> > > >      >> +PACKAGECONFIG ??= "x11"
> > > >      >> +
> > > >      >> +PACKAGECONFIG[wayland] = "-DGLFW_USE_WAYLAND=ON,,wayland
> > > >      >> wayland-native wayland-protocols extra-cmake-modules libxkbcommon"
> > > >      >> +PACKAGECONFIG[x11] = ",,libxrandr libxinerama libxi libxcursor"
> > > >      >>   COMPATIBLE_HOST:libc-musl = "null"
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#102272): https://lists.openembedded.org/g/openembedded-devel/message/102272
> Mute This Topic: https://lists.openembedded.org/mt/98540896/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Martin Jansa May 2, 2023, 5:10 p.m. UTC | #14
On Tue, May 2, 2023 at 6:06 PM Randolph Sapp <rs@ti.com> wrote:

> On 5/2/23 10:56, Martin Jansa wrote:
> > The version which was merged with:
> >
> > PACKAGECONFIG ??= "x11"
> >
> > Should still respect x11 in DISTRO_FEATURES, now this causes:
> >
> > ERROR: Nothing PROVIDES 'libxi' (but
> > meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on
> or
> > otherwise requires it)
> > libxi was skipped: missing required distro feature 'x11' (not in
> > DISTRO_FEATURES)
> > ERROR: Nothing PROVIDES 'libxinerama' (but
> > meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on
> or
> > otherwise requires it)
> > libxinerama was skipped: missing required distro feature 'x11' (not in
> > DISTRO_FEATURES)
> > ERROR: Nothing PROVIDES 'libxrandr' (but
> > meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on
> or
> > otherwise requires it)
> > libxrandr was skipped: missing required distro feature 'x11' (not in
> > DISTRO_FEATURES)
> > ERROR: Nothing PROVIDES 'libglu' (but
> > meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on
> or
> > otherwise requires it)
> > libglu was skipped: missing required distro feature 'x11' (not in
> > DISTRO_FEATURES)
> > ERROR: Nothing PROVIDES 'libxcursor' (but
> > meta-oe/recipes-core/glfw/glfw_3.3.bb <http://glfw_3.3.bb> DEPENDS on
> or
> > otherwise requires it)
> > libxcursor was skipped: missing required distro feature 'x11' (not in
> > DISTRO_FEATURES)
> >
> > when wayland and opengl are in DISTRO_FEATURES, but x11 isn't.
> >
>
> Yeah, that's expected behavior at this point. You need to manually
> override the PACKAGECONFIG for wayland in this patch. Just slightly
> better than no wayland at all.
>

And slightly worse than before, because before it was automatically skipped
thanks to  REQUIRED_DISTRO_FEATURES and now it's pulled into world builds
even when it doesn't build at all.

The only way we can get around it is if this layer or one of it's
> dependencies decides to adopt extra-cmake-modules. They the
> packageconfig can automatically configure itself. Discussion on who's
> job it is to carry this package has yet to conclude.
>

There is also libglu in regular DEPENDS which has x11 in
REQUIRED_DISTRO_FEATURES.

After moving libglu to x11 PACKAGECONFIG and enabling x11 only when it's in
DISTRO_FEATURES as in:
https://git.openembedded.org/meta-openembedded-contrib/commit/?h=jansa/master&id=721240c27e7a8ebe83f2730cf94e12a57932db82

it still fails with:
glfw/3.3+gitAUTOINC+781fbbadb0-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230
(message):
|   Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB)

Maybe return x11 to REQUIRED_DISTRO_FEATURES until the wayland discussion
is resolved somehow?

Regards,
diff mbox series

Patch

diff --git a/meta-oe/recipes-core/glfw/glfw_3.3.bb b/meta-oe/recipes-core/glfw/glfw_3.3.bb
index b31bba6b6b..5b0d61241e 100644
--- a/meta-oe/recipes-core/glfw/glfw_3.3.bb
+++ b/meta-oe/recipes-core/glfw/glfw_3.3.bb
@@ -20,7 +20,17 @@  EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DGLFW_BUILD_DOCS=OFF"
 
 CFLAGS += "-fPIC"
 
-DEPENDS = "libpng libglu zlib libxrandr libxinerama libxi libxcursor"
-REQUIRED_DISTRO_FEATURES = "x11 opengl"
+DEPENDS = "libpng libglu zlib"
+REQUIRED_DISTRO_FEATURES = "opengl"
+ANY_OF_DISTRO_FEATURES = "wayland x11"
+
+# upstream considers x11 and wayland backends mutually exclusive and will
+# prioritize wayland if it is enabled, but wayland has dependencies that cannot
+# be satisfied by this layer so it is disabled by default
+
+PACKAGECONFIG ??= "x11"
+
+PACKAGECONFIG[wayland] = "-DGLFW_USE_WAYLAND=ON,,wayland wayland-native wayland-protocols extra-cmake-modules libxkbcommon"
+PACKAGECONFIG[x11] = ",,libxrandr libxinerama libxi libxcursor"
 
 COMPATIBLE_HOST:libc-musl = "null"