From eb780944ec8fb9df7f18c079cbd8eaff5bf96baa Mon Sep 17 00:00:00 2001 From: SulfurNitride Date: Sat, 14 Mar 2026 04:06:40 -0500 Subject: Bundle Qt libs missing from PyQt6 dep scan (fixes Bazzite crash) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PyQt6 is staged after the main dep-collection loop, so its .so deps (e.g. libQt6OpenGLWidgets) were never copied to lib/. The dynamic linker then fell back to the host's Qt RPM build, which exports Qt_6.*_PRIVATE_API version symbols that aqtinstall's Qt doesn't — causing a crash on Fedora- based distros (Bazzite, etc.) whenever a Python plugin imported PyQt6 OpenGL. Add a post-PyQt6 dep scan that bundles any Qt libs not yet present in lib/. Co-Authored-By: Claude Sonnet 4.6 --- docker/build-inner.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docker/build-inner.sh b/docker/build-inner.sh index fc98c39..ca2c648 100755 --- a/docker/build-inner.sh +++ b/docker/build-inner.sh @@ -306,6 +306,22 @@ find "${PYQT6_OUT}" -name "*.so" -exec \ strip --strip-unneeded "${PYQT6_OUT}"/*.so 2>/dev/null || true echo "Bundled PyQt6 (no Qt dupe): $(du -sh "${PYQT6_OUT}" | cut -f1)" +# Scan PyQt6 binding deps and bundle any Qt libs not yet in lib/. +# PyQt6 is bundled after the main dep-collection loop, so its deps (e.g. +# libQt6OpenGLWidgets) would otherwise be missing. Without them the dynamic +# linker falls back to the host's Qt RPM build, which uses Qt_6.*_PRIVATE_API +# version symbols that aqtinstall's Qt libs don't export — causing crashes on +# distros like Bazzite/Fedora that ship their own Qt. +echo "Scanning PyQt6 deps for missing Qt libs..." +find "${PYQT6_OUT}" -name "*.so" | while read -r pyqt_so; do + ldd "${pyqt_so}" 2>/dev/null | grep "=>" | awk '{print $3}' | grep "^/" | while read -r dep; do + dep_name="$(basename "${dep}")" + if echo "${dep_name}" | grep -qE "${SKIP_PATTERN}"; then continue; fi + if [ -f "${OUT_DIR}/lib/${dep_name}" ]; then continue; fi + cp -Lf "${dep}" "${OUT_DIR}/lib/" 2>/dev/null && echo " + ${dep_name}" || true + done +done + # ── Strip all MO2 binaries ── echo "Stripping MO2 binaries..." strip --strip-unneeded "${OUT_DIR}/ModOrganizer-core" 2>/dev/null || true -- cgit v1.3.1