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
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