From f71a79550b9033bde27c450c964310f90ce780ae Mon Sep 17 00:00:00 2001 From: SoftFever Date: Sat, 23 May 2026 16:19:26 +0800 Subject: [PATCH] fix flatpak crash on start issue (#13808) fix flatpak crash issues --- scripts/build_flatpak_with_docker.sh | 10 +++++----- scripts/flatpak/com.orcaslicer.OrcaSlicer.yml | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/build_flatpak_with_docker.sh b/scripts/build_flatpak_with_docker.sh index 16dfdbb955..9e8805af2f 100755 --- a/scripts/build_flatpak_with_docker.sh +++ b/scripts/build_flatpak_with_docker.sh @@ -177,11 +177,11 @@ format_duration() { overall_start=$(date +%s) install_start=$overall_start -# The workspace and .flatpak-builder cache are bind-mounted from the host. -# Git inside the container may reject cached source repos as unsafe due to -# ownership mismatch, which breaks flatpak-builder when it reuses git sources. -git config --global --add safe.directory /src -git config --global --add safe.directory '/src/.flatpak-builder/git/*' +# This container runs as root, but the bind-mounted workspace and .flatpak-builder +# cache are host-user-owned, so git's dubious-ownership check rejects them and +# breaks flatpak-builder's git checkouts (e.g. wxWidgets). Trust every repo: safe +# in this ephemeral build container, and covers the workspace, mirrors and builds. +git config --global --add safe.directory '*' # Install required SDK extensions (not pre-installed in the container image) flatpak install -y --noninteractive --arch="$BUILD_ARCH" flathub \ diff --git a/scripts/flatpak/com.orcaslicer.OrcaSlicer.yml b/scripts/flatpak/com.orcaslicer.OrcaSlicer.yml index c8f396217b..f5a137050a 100644 --- a/scripts/flatpak/com.orcaslicer.OrcaSlicer.yml +++ b/scripts/flatpak/com.orcaslicer.OrcaSlicer.yml @@ -115,7 +115,10 @@ modules: - -DwxUSE_ZLIB=sys - -DwxUSE_LIBJPEG=sys - -DwxUSE_LIBTIFF=OFF - - -DwxUSE_LIBWEBP=builtin + # sys, not builtin (unlike the static deps build): wxWidgets installs the + # builtin libwxwebp*.so only for static builds, so a shared build leaves + # them missing at runtime. The GNOME runtime provides libwebp. + - -DwxUSE_LIBWEBP=sys - -DwxUSE_EXPAT=sys - -DwxUSE_NANOSVG=OFF - -DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld