diff mbox series

[4/4] weston: Add xcb-util-cursor dependency

Message ID 20241219222120.1188742-4-tom.hochstein@oss.nxp.com
State New
Headers show
Series [1/4] pkgconfig: Add pkg-config-native to SDK | expand

Commit Message

Tom Hochstein Dec. 19, 2024, 10:21 p.m. UTC
Building weston with core-image-weston SDK fails:
```
Run-time dependency xcb-cursor found: NO (tried pkgconfig and cmake)

tests/meson.build:357:2: ERROR: Problem encountered: xcb and xcb-cursor required for running xwayland tests
```

Fixed by adding xcb-util-cursor as runtime dependency.

Signed-off-by: Tom Hochstein <tom.hochstein@oss.nxp.com>
---
 meta/recipes-graphics/wayland/weston_14.0.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexander Kanavin Dec. 19, 2024, 10:41 p.m. UTC | #1
On Thu, 19 Dec 2024 at 23:22, Tom Hochstein via lists.openembedded.org
<tom.hochstein=oss.nxp.com@lists.openembedded.org> wrote:
>
> Building weston with core-image-weston SDK fails:
> ```
> Run-time dependency xcb-cursor found: NO (tried pkgconfig and cmake)
>
> tests/meson.build:357:2: ERROR: Problem encountered: xcb and xcb-cursor required for running xwayland tests
> ```
>
> Fixed by adding xcb-util-cursor as runtime dependency.
> -PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcb libxcursor xcb-util-cursor xwayland"
> +PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcb libxcursor xcb-util-cursor xwayland,xcb-util-cursor"

I'm not sure I understand. If the error happens at build time, how is
it addressed with a runtime dependency?

Alex
Tom Hochstein Dec. 19, 2024, 11:12 p.m. UTC | #2
On 12/19/2024 4:41 PM, Alexander Kanavin wrote:
> On Thu, 19 Dec 2024 at 23:22, Tom Hochstein via lists.openembedded.org
> <tom.hochstein=oss.nxp.com@lists.openembedded.org> wrote:
>>
>> Building weston with core-image-weston SDK fails:
>> ```
>> Run-time dependency xcb-cursor found: NO (tried pkgconfig and cmake)
>>
>> tests/meson.build:357:2: ERROR: Problem encountered: xcb and xcb-cursor required for running xwayland tests
>> ```
>>
>> Fixed by adding xcb-util-cursor as runtime dependency.
>> -PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcb libxcursor xcb-util-cursor xwayland"
>> +PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcb libxcursor xcb-util-cursor xwayland,xcb-util-cursor"
> 
> I'm not sure I understand. If the error happens at build time, how is
> it addressed with a runtime dependency?
> 
> Alex

Good question, I actually made a guess that xcb-util-cursor is missing 
from the rootfs because nothing actually links to it, so Yocto doesn't 
automatically add it to the runtime. Adding it explicitly to the runtime 
forces it into the SDK as well and fixes the above error.

Tom
Alexander Kanavin Dec. 20, 2024, 9:42 a.m. UTC | #3
On Fri, 20 Dec 2024 at 00:13, Tom Hochstein <tom.hochstein@oss.nxp.com> wrote:
> Good question, I actually made a guess that xcb-util-cursor is missing
> from the rootfs because nothing actually links to it, so Yocto doesn't
> automatically add it to the runtime. Adding it explicitly to the runtime
> forces it into the SDK as well and fixes the above error.

This can't be the correct fix. RDEPENDS is intended only for things
necessary at runtime that aren't discovered automatically (like for
example shared library dependencies are). SDK content is determined
via DEPENDS, particularly, by taking everything in it, and adding -dev
to it. You need to see why that doesn't work in this case.

Alex
Tom Hochstein Dec. 21, 2024, 7:59 p.m. UTC | #4
On 12/20/2024 3:42 AM, Alexander Kanavin wrote:
> On Fri, 20 Dec 2024 at 00:13, Tom Hochstein <tom.hochstein@oss.nxp.com> wrote:
>> Good question, I actually made a guess that xcb-util-cursor is missing
>> from the rootfs because nothing actually links to it, so Yocto doesn't
>> automatically add it to the runtime. Adding it explicitly to the runtime
>> forces it into the SDK as well and fixes the above error.
> 
> This can't be the correct fix. RDEPENDS is intended only for things
> necessary at runtime that aren't discovered automatically (like for
> example shared library dependencies are). SDK content is determined
> via DEPENDS, particularly, by taking everything in it, and adding -dev
> to it. You need to see why that doesn't work in this case.
> 
> Alex

Unfortunately, this is beyond my ability to fix. I can see that xcb-
util-cursor is in the DEPENDS of weston, but xcb-util-cursor-dev does
not make it into the core-image-weston SDK. I've done some grepping of
the build folder with and without this patch and can find no clue.

Note that xcb-util-cursor doesn't make it into core-image-weston image
either. Perhaps adding this to RDEPENDS is necessary anyway? This is the
error message reported:

tests/meson.build:357:2: ERROR: Problem encountered: xcb and xcb-cursor 
required for running xwayland tests

Tom
Khem Raj Dec. 21, 2024, 8:10 p.m. UTC | #5
On Sat, Dec 21, 2024 at 11:59 AM Tom Hochstein via
lists.openembedded.org
<tom.hochstein=oss.nxp.com@lists.openembedded.org> wrote:
>
> On 12/20/2024 3:42 AM, Alexander Kanavin wrote:
> > On Fri, 20 Dec 2024 at 00:13, Tom Hochstein <tom.hochstein@oss.nxp.com> wrote:
> >> Good question, I actually made a guess that xcb-util-cursor is missing
> >> from the rootfs because nothing actually links to it, so Yocto doesn't
> >> automatically add it to the runtime. Adding it explicitly to the runtime
> >> forces it into the SDK as well and fixes the above error.
> >
> > This can't be the correct fix. RDEPENDS is intended only for things
> > necessary at runtime that aren't discovered automatically (like for
> > example shared library dependencies are). SDK content is determined
> > via DEPENDS, particularly, by taking everything in it, and adding -dev
> > to it. You need to see why that doesn't work in this case.
> >
> > Alex
>
> Unfortunately, this is beyond my ability to fix. I can see that xcb-
> util-cursor is in the DEPENDS of weston, but xcb-util-cursor-dev does
> not make it into the core-image-weston SDK. I've done some grepping of
> the build folder with and without this patch and can find no clue.
>
> Note that xcb-util-cursor doesn't make it into core-image-weston image
> either. Perhaps adding this to RDEPENDS is necessary anyway? This is the
> error message reported:
>
> tests/meson.build:357:2: ERROR: Problem encountered: xcb and xcb-cursor
> required for running xwayland tests

Tests sometimes do require additional packages and at times
development headers and libs
on target for different reasons and these dependencies may not be
needed for normal
functioning of the package. I would suggest to add them into image as
rdeps (if they are needed)
conditional upon ptests being enabled.

>
> Tom
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#208990): https://lists.openembedded.org/g/openembedded-core/message/208990
> Mute This Topic: https://lists.openembedded.org/mt/110206258/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Tom Hochstein Dec. 21, 2024, 9:44 p.m. UTC | #6
On 12/21/2024 2:10 PM, Khem Raj wrote:
> 
> Tests sometimes do require additional packages and at times
> development headers and libs
> on target for different reasons and these dependencies may not be
> needed for normal
> functioning of the package. I would suggest to add them into image as
> rdeps (if they are needed)
> conditional upon ptests being enabled.
> 

I don't see that weston references ptests. Is your comment a mistake,
or do I misunderstand?

Tom
Khem Raj Dec. 21, 2024, 10:33 p.m. UTC | #7
On Sat, Dec 21, 2024 at 1:45 PM Tom Hochstein <tom.hochstein@oss.nxp.com>
wrote:

> On 12/21/2024 2:10 PM, Khem Raj wrote:
> >
> > Tests sometimes do require additional packages and at times
> > development headers and libs
> > on target for different reasons and these dependencies may not be
> > needed for normal
> > functioning of the package. I would suggest to add them into image as
> > rdeps (if they are needed)
> > conditional upon ptests being enabled.
> >
>
> I don't see that weston references ptests. Is your comment a mistake,
> or do I misunderstand?


No you did not misunderstand. I am trying to help you

>
Hmm. Is there is meson option to disable/enable tests in Weston ? If so
then you can disable the tests by default. Since the error seems to be
showing a test configuration failure



>
> Tom
>
>
Tom Hochstein Dec. 22, 2024, 12:13 a.m. UTC | #8
On 12/21/2024 4:33 PM, Khem Raj via lists.openembedded.org wrote:
> 
> 
> On Sat, Dec 21, 2024 at 1:45 PM Tom Hochstein <tom.hochstein@oss.nxp.com 
> <mailto:tom.hochstein@oss.nxp.com>> wrote:
> 
>     On 12/21/2024 2:10 PM, Khem Raj wrote:
>      >
>      > Tests sometimes do require additional packages and at times
>      > development headers and libs
>      > on target for different reasons and these dependencies may not be
>      > needed for normal
>      > functioning of the package. I would suggest to add them into image as
>      > rdeps (if they are needed)
>      > conditional upon ptests being enabled.
>      >
> 
>     I don't see that weston references ptests. Is your comment a mistake,
>     or do I misunderstand?
> 
> 
> No you did not misunderstand. I am trying to help you
> 
> 
> Hmm. Is there is meson option to disable/enable tests in Weston ? If so 
> then you can disable the tests by default. Since the error seems to be 
> showing a test configuration failure
> 

Aha, we've gotten to the root now. We're building the tests folder but
not installing it. Will send a v2 that disables the unused tests build.

Tom
diff mbox series

Patch

diff --git a/meta/recipes-graphics/wayland/weston_14.0.1.bb b/meta/recipes-graphics/wayland/weston_14.0.1.bb
index 4cb0ca4d5f..bcdd77bf67 100644
--- a/meta/recipes-graphics/wayland/weston_14.0.1.bb
+++ b/meta/recipes-graphics/wayland/weston_14.0.1.bb
@@ -72,7 +72,7 @@  PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp"
 # Weston with systemd support
 PACKAGECONFIG[systemd] = "-Dsystemd=true,-Dsystemd=false,systemd dbus"
 # Weston with Xwayland support (requires X11 and Wayland)
-PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcb libxcursor xcb-util-cursor xwayland"
+PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcb libxcursor xcb-util-cursor xwayland,xcb-util-cursor"
 # Clients support
 PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLECLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false"
 # Virtual remote output with GStreamer on DRM backend