From b8b348b11eebdcac8a9d7fc6b65ea97abf233b12 Mon Sep 17 00:00:00 2001 From: vasilito Date: Tue, 30 Jun 2026 23:59:46 +0300 Subject: [PATCH] fix: resolve qtdeclarative sysroot propagation failures Three build failures (qt6-sensors, sddm, kwin) all trace to qtdeclarative's sysroot/ directory being missing after staging. CMake config files reference absolute paths into that sysroot. 1. qt-sysroot.sh: add mkdir -p before ln -sf in redbear_qt_ensure_dep_sysroots() so the parent directory is created when the dependency sysroot was cleaned up. 2. sddm wayland-patch.sh: fix sed pattern to include LinguistTools token that exists in the actual upstream CMakeLists.txt line. Without it the sed silently fails to match, leaving LinguistTools/Test/QuickTest as REQUIRED components. 3. qt6-sensors recipe.toml: source qt-sysroot.sh and call redbear_qt_ensure_dep_sysroots() before cmake configure. Previously the recipe only symlinked plugins/mkspecs/metatypes/ modules but never fixed up dependency sysroot paths, causing Qt6::Qml INTERFACE_INCLUDE_DIRECTORIES to reference a non-existent include path. --- local/recipes/kde/sddm/wayland-patch.sh | 2 +- local/recipes/qt/qt6-sensors/recipe.toml | 8 +++----- local/scripts/lib/qt-sysroot.sh | 1 + 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/local/recipes/kde/sddm/wayland-patch.sh b/local/recipes/kde/sddm/wayland-patch.sh index 39c0d3a571..f2390b4e6e 100755 --- a/local/recipes/kde/sddm/wayland-patch.sh +++ b/local/recipes/kde/sddm/wayland-patch.sh @@ -39,7 +39,7 @@ if [ -f "$SRC/cmake/FindXKB.cmake" ]; then fi if [ -f "$SRC/CMakeLists.txt" ]; then - sed -i 's/find_package(Qt\${QT_MAJOR_VERSION} 5.15.0 CONFIG REQUIRED Core DBus Gui Qml Quick Test QuickTest)/find_package(Qt\${QT_MAJOR_VERSION} 5.15.0 CONFIG REQUIRED Core DBus Gui Network Qml Quick)/' "$SRC/CMakeLists.txt" + sed -i 's/find_package(Qt\${QT_MAJOR_VERSION} 5.15.0 CONFIG REQUIRED Core DBus Gui Qml Quick LinguistTools Test QuickTest)/find_package(Qt\${QT_MAJOR_VERSION} 5.15.0 CONFIG REQUIRED Core DBus Gui Network Qml Quick)/' "$SRC/CMakeLists.txt" sed -i '/find_package(Qt\${QT_MAJOR_VERSION} 5.15.0 CONFIG REQUIRED Core DBus Gui Network Qml Quick)/a find_package(Qt\${QT_MAJOR_VERSION} 5.15.0 CONFIG OPTIONAL_COMPONENTS LinguistTools Test QuickTest)' "$SRC/CMakeLists.txt" fi diff --git a/local/recipes/qt/qt6-sensors/recipe.toml b/local/recipes/qt/qt6-sensors/recipe.toml index 399a448f0a..12032d58eb 100644 --- a/local/recipes/qt/qt6-sensors/recipe.toml +++ b/local/recipes/qt/qt6-sensors/recipe.toml @@ -15,11 +15,9 @@ DYNAMIC_INIT HOST_BUILD="${COOKBOOK_ROOT}/build/qt-host-build" -for qtdir in plugins mkspecs metatypes modules; do - if [ -d "${COOKBOOK_SYSROOT}/usr/${qtdir}" ] && [ ! -e "${COOKBOOK_SYSROOT}/${qtdir}" ]; then - ln -s "usr/${qtdir}" "${COOKBOOK_SYSROOT}/${qtdir}" - fi -done +source "${COOKBOOK_ROOT}/local/scripts/lib/qt-sysroot.sh" +redbear_qt_prepare_common_sysroot "${COOKBOOK_SYSROOT}" +redbear_qt_ensure_dep_sysroots "${COOKBOOK_ROOT}" "${COOKBOOK_SYSROOT}" rm -f CMakeCache.txt rm -rf CMakeFiles diff --git a/local/scripts/lib/qt-sysroot.sh b/local/scripts/lib/qt-sysroot.sh index 7959e63eef..ddb565894a 100644 --- a/local/scripts/lib/qt-sysroot.sh +++ b/local/scripts/lib/qt-sysroot.sh @@ -155,6 +155,7 @@ redbear_qt_ensure_dep_sysroots() { if [ -L "${dep_sysroot}/lib" ] || [ -e "${dep_sysroot}/lib" ]; then rm -rf "${dep_sysroot}/lib" fi + mkdir -p "${dep_sysroot}" ln -sf "${sysroot}/usr/include" "${dep_sysroot}/include" ln -sf "${sysroot}/usr/lib" "${dep_sysroot}/lib" fi