From 0ce9eb4736bc6ef56677e15a00ae2c8e9c8392d3 Mon Sep 17 00:00:00 2001 From: vasilito Date: Wed, 1 Jul 2026 00:20:18 +0300 Subject: [PATCH] fix: qt-sysroot dep symlinks point to dependency's own stage, not caller's sysroot redbear_qt_ensure_dep_sysroots was creating symlinks in the dependency's sysroot pointing to the CALLING recipe's sysroot. This caused CMake 'hidden library' warnings and corrupts the dependency's build when it gets rebuilt later. Fix: derive the dependency's stage path from its sysroot path (dirname(sysroot)/stage/usr) and link to that instead. This way qtdeclarative's sysroot include/lib point to qtdeclarative's OWN stage, not to qt6-sensors' sysroot. Also fix wayland-patch.sh: replace ${LIBXCB_LIBRARIES} with empty string instead of a comment. The comment was eating the closing ) on the same line, causing 'Function missing ending paren' CMake parse error in src/daemon/CMakeLists.txt:63. --- local/recipes/kde/sddm/wayland-patch.sh | 4 ++-- local/scripts/lib/qt-sysroot.sh | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/local/recipes/kde/sddm/wayland-patch.sh b/local/recipes/kde/sddm/wayland-patch.sh index f2390b4e6e..967a18e4a9 100755 --- a/local/recipes/kde/sddm/wayland-patch.sh +++ b/local/recipes/kde/sddm/wayland-patch.sh @@ -17,8 +17,8 @@ sed -i 's/find_package(XCB)/# Wayland-only: XCB not needed/' "$CMAKE" for cmakelists in "$SRC/src/daemon/CMakeLists.txt" "$SRC/src/helper/CMakeLists.txt" "$SRC/src/greeter/CMakeLists.txt"; do if [ -f "$cmakelists" ]; then - sed -i 's/"\${LIBXCB_INCLUDE_DIR}"/# Wayland-only: XCB not needed/' "$cmakelists" - sed -i 's/\${LIBXCB_LIBRARIES}/# Wayland-only: XCB not needed/' "$cmakelists" + sed -i 's/"\${LIBXCB_INCLUDE_DIR}"//' "$cmakelists" + sed -i 's/\${LIBXCB_LIBRARIES}//' "$cmakelists" fi done diff --git a/local/scripts/lib/qt-sysroot.sh b/local/scripts/lib/qt-sysroot.sh index ddb565894a..5c31aa064d 100644 --- a/local/scripts/lib/qt-sysroot.sh +++ b/local/scripts/lib/qt-sysroot.sh @@ -155,9 +155,14 @@ 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" + local dep_target_dir dep_stage_usr + dep_target_dir=$(dirname "${dep_sysroot}") + dep_stage_usr="${dep_target_dir}/stage/usr" + if [ -d "${dep_stage_usr}/include" ]; then + mkdir -p "${dep_sysroot}" + ln -sf "${dep_stage_usr}/include" "${dep_sysroot}/include" + ln -sf "${dep_stage_usr}/lib" "${dep_sysroot}/lib" + fi fi done }