From 806663698cf0f7822c17a474020d1500bd108413 Mon Sep 17 00:00:00 2001 From: Vasilito Date: Wed, 6 May 2026 15:18:09 +0100 Subject: [PATCH] fix: copy libwayland .so files to qtbase stage for Qt plugin loading Qt plugins (libqwayland.so, libqredox.so) fail to dlopen() because libwayland-client.so was missing at runtime. libwayland = "ignore" prevents the package from being installed. Fixed by adding post-build copy step in qtbase recipe: libwayland-*.so files from sysroot are copied to stage/usr/lib/ so they're available when Qt plugins load. Also restored libwayland recipe.toml (was accidentally truncated to 22 lines without blake3 hash). --- local/recipes/qt/qtbase/recipe.toml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/local/recipes/qt/qtbase/recipe.toml b/local/recipes/qt/qtbase/recipe.toml index 35a1135af..a85245483 100644 --- a/local/recipes/qt/qtbase/recipe.toml +++ b/local/recipes/qt/qtbase/recipe.toml @@ -127,8 +127,7 @@ GLES3_EOF done mkdir -p "${COOKBOOK_SYSROOT}/include/netinet" -if [ ! -f "${COOKBOOK_SYSROOT}/include/netinet/in6_pktinfo_compat.h" ]; then - cat > "${COOKBOOK_SYSROOT}/include/netinet/in6_pktinfo_compat.h" <<'PKTINFO_EOF' +cat > "${COOKBOOK_SYSROOT}/include/netinet/in6_pktinfo_compat.h" <<'PKTINFO_EOF' #ifndef REDBEAR_IN6_PKTINFO_COMPAT_H #define REDBEAR_IN6_PKTINFO_COMPAT_H #include @@ -138,13 +137,14 @@ if [ ! -f "${COOKBOOK_SYSROOT}/include/netinet/in6_pktinfo_compat.h" ]; then #ifndef IPV6_PKTINFO #define IPV6_PKTINFO 50 #endif +#ifndef __redox__ struct in6_pktinfo { struct in6_addr ipi6_addr; int ipi6_ifindex; }; #endif +#endif PKTINFO_EOF -fi python - <<'PY' import os from pathlib import Path @@ -736,4 +736,16 @@ for path in targets: text = text.replace(old, new, 1) path.write_text(text) PY -""" +# libwayland is "ignore" in the config because it can't be rebuilt from source. +# But Qt Wayland plugins need libwayland-client.so at runtime. Copy them from +# the sysroot into the stage so they're available when dlopen() loads the plugins. +mkdir -p "${COOKBOOK_STAGE}/usr/lib" +for lib in libwayland-client libwayland-server libwayland-cursor libwayland-egl; do + for variant in so so.0 so.0.24.0 so.1 so.1.24.0; do + src="${COOKBOOK_SYSROOT}/usr/lib/${lib}.${variant}" + if [ -f "$src" ]; then + cp -v "$src" "${COOKBOOK_STAGE}/usr/lib/" + fi + done +done + """