From 5d77a9209661ca10a2bd596e65442b6eee4ebf15 Mon Sep 17 00:00:00 2001 From: bowman Date: Fri, 4 Sep 2026 11:56:20 -0700 Subject: [PATCH 1/8] fix: BuildFedora.sh: use dnf instead of apt, fix hardcoded BuildLinux.sh usage text BuildFedora.sh was a copy of the Debian/Ubuntu build script that never got ported: the -u dependency-install block still called apt with Debian package names, and the usage/help text still referenced BuildLinux.sh. Switched the dependency installation to dnf with the Fedora equivalent package names, and corrected the usage strings to reference BuildFedora.sh. Claude-Session: https://claude.ai/code/session_01GX1HqJrRdEWvoiwXkfrLQH --- BuildFedora.sh | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/BuildFedora.sh b/BuildFedora.sh index 6c145b61..1c9a86f7 100755 --- a/BuildFedora.sh +++ b/BuildFedora.sh @@ -52,7 +52,7 @@ while getopts ":dsiuhgbr" opt; do r ) SKIP_RAM_CHECK="1" ;; - h ) echo "Usage: ./BuildLinux.sh [-i][-u][-d][-s][-b][-g]" + h ) echo "Usage: ./BuildFedora.sh [-i][-u][-d][-s][-b][-g]" echo " -i: Generate appimage (optional)" echo " -g: force gtk2 build" echo " -b: build in debug mode" @@ -60,8 +60,8 @@ while getopts ":dsiuhgbr" opt; do echo " -s: build qidi-studio (optional)" echo " -u: only update clock & dependency packets (optional and need sudo)" echo " -r: skip free ram check (low ram compiling)" - echo "For a first use, you want to 'sudo ./BuildLinux.sh -u'" - echo " and then './BuildLinux.sh -dsi'" + echo "For a first use, you want to 'sudo ./BuildFedora.sh -u'" + echo " and then './BuildFedora.sh -dsi'" exit 0 ;; esac @@ -69,7 +69,7 @@ done if [ $OPTIND -eq 1 ] then - echo "Usage: ./BuildLinux.sh [-i][-u][-d][-s][-b][-g]" + echo "Usage: ./BuildFedora.sh [-i][-u][-d][-s][-b][-g]" echo " -i: Generate appimage (optional)" echo " -g: force gtk2 build" echo " -b: build in debug mode" @@ -77,8 +77,8 @@ then echo " -s: build qidi-studio (optional)" echo " -u: only update clock & dependency packets (optional and need sudo)" echo " -r: skip free ram check (low ram compiling)" - echo "For a first use, you want to 'sudo ./BuildLinux.sh -u'" - echo " and then './BuildLinux.sh -dsi'" + echo "For a first use, you want to 'sudo ./BuildFedora.sh -u'" + echo " and then './BuildFedora.sh -dsi'" exit 0 fi @@ -101,25 +101,19 @@ if [[ -n "$UPDATE_LIB" ]] then echo -n -e "Updating linux ...\n" # hwclock -s # DeftDawg: Why does SuperSlicer want to do this? - apt update + dnf makecache if [[ -z "$FOUND_GTK3" ]] then - echo -e "\nInstalling: libgtk2.0-dev libglew-dev libudev-dev libdbus-1-dev cmake git\n" - apt install -y libgtk2.0-dev libglew-dev libudev-dev libdbus-1-dev cmake git + echo -e "\nInstalling: gtk2-devel glew-devel systemd-devel dbus-devel cmake git\n" + dnf install -y gtk2-devel glew-devel systemd-devel dbus-devel cmake git else - echo -e "\nFind libgtk-3, installing: libgtk-3-dev libglew-dev libudev-dev libdbus-1-dev cmake git\n" - apt install -y libgtk-3-dev libglew-dev libudev-dev libdbus-1-dev cmake git - fi - # for ubuntu 22.04: - ubu_version="$(cat /etc/issue)" - if [[ $ubu_version == "Ubuntu 22.04"* ]] - then - apt install -y curl libssl-dev libcurl4-openssl-dev m4 + echo -e "\nFind gtk3-devel, installing: gtk3-devel glew-devel systemd-devel dbus-devel cmake git\n" + dnf install -y gtk3-devel glew-devel systemd-devel dbus-devel cmake git fi if [[ -n "$BUILD_DEBUG" ]] then - echo -e "\nInstalling: libssl-dev libcurl4-openssl-dev\n" - apt install -y libssl-dev libcurl4-openssl-dev + echo -e "\nInstalling: openssl-devel libcurl-devel\n" + dnf install -y openssl-devel libcurl-devel fi echo -e "done\n" exit 0 From 99b2f4b8f6e773c50adb018a2b1885296abdfc8d Mon Sep 17 00:00:00 2001 From: bowman Date: Sat, 5 Sep 2026 22:04:45 -0700 Subject: [PATCH 2/8] fix: get BuildFedora.sh -d/-s to actually produce a working Fedora build Beyond the apt->dnf and BuildLinux.sh->BuildFedora.sh renames, the deps build (-d) and app build (-s) steps didn't actually work on Fedora 44/CMake 4.x. Fixes, verified with a full clean `-u` -> `-d` -> `-b -s` run: - deps/CMakeLists.txt required CMake >= 3.2, and CMake 4.x refuses to configure anything below 3.5 at all. Bumped it, and pass CMAKE_POLICY_VERSION_MINIMUM=3.5 (as both a cmake arg and an env var, so it also applies to bundled deps' own nested try_compile() checks) to work around the same problem in third-party vendored CMakeLists.txt files (NLopt, wxWidgets, etc.) we can't edit directly. - Fedora's glew-devel and openvdb-devel ship only shared .so libs, no static .a, but SLIC3R_STATIC forces static linking of both. Added SLIC3R_STATIC_EXCLUDE_OPENVDB (mirroring the existing SLIC3R_STATIC_EXCLUDE_GLEW) and pass both from BuildFedora.sh so the app links the system shared libs instead. - deps/ unconditionally built its own GLFW, OpenVDB (+OpenEXR/Imath) and expat even when a usable system version exists, and being under the same shared destdir/include root as everything else, those headers silently shadow Fedora's system headers regardless of any CMake variable override -- causing ABI-mismatched undefined-symbol link errors (GLFW needs KDE's extra-cmake-modules for its Wayland backend; OpenVDB's ABI-versioned inline namespaces don't match Fedora's; and webkit2gtk needs a matching dynamic libexpat.so, not deps' static one). Added DEP_BUILD_OPENVDB/DEP_BUILD_EXPAT toggles (mirroring the existing DEP_BUILD_GLFW) and disabled all three from BuildFedora.sh. - wx-config hardcodes "-L.../lib" for its own deps (e.g. "-lzlibstatic"), but zlib's own CMakeLists follows GNUInstallDirs, which resolves to "lib64" on Fedora. Added lib64 to the linker search path. - Added the now-required Fedora devel packages to the -u dependency list: nasm, boost-static, webkit2gtk4.1-devel, mesa-compat-libOSMesa-devel, openvdb-devel, imath-devel, openexr-devel, NLopt-devel, glfw-devel. - The -s step's final `make -j4 QIDIStudio` was hardcoded regardless of core count; changed to $NCORES to match the -d step. Claude-Session: https://claude.ai/code/session_01GX1HqJrRdEWvoiwXkfrLQH --- BuildFedora.sh | 60 ++++++++++++++++++++++++++++++++++++++------- CMakeLists.txt | 2 +- deps/CMakeLists.txt | 22 +++++++++++++---- 3 files changed, 69 insertions(+), 15 deletions(-) diff --git a/BuildFedora.sh b/BuildFedora.sh index 1c9a86f7..7ef1f44e 100755 --- a/BuildFedora.sh +++ b/BuildFedora.sh @@ -4,6 +4,12 @@ export ROOT=`pwd` export NCORES=`nproc --all` export CMAKE_BUILD_PARALLEL_LEVEL=${NCORES} +# Several bundled/third-party dependencies (and their own nested try_compile() +# checks) declare cmake_minimum_required() below 3.5, which newer CMake +# (>=4.0) refuses to configure at all. Setting this env var (rather than only +# passing -DCMAKE_POLICY_VERSION_MINIMUM on the command line) makes CMake +# auto-apply it to every nested build tree it creates, not just the top level. +export CMAKE_POLICY_VERSION_MINIMUM=3.5 #FOUND_GTK2=$(dnf list installed | grep gtk2) #FOUND_GTK3=$(dnf list installed | grep gtk3) FOUND_GTK3=1 @@ -102,13 +108,22 @@ then echo -n -e "Updating linux ...\n" # hwclock -s # DeftDawg: Why does SuperSlicer want to do this? dnf makecache + # NOTE: cereal is intentionally NOT installed from Fedora's cereal-devel here. + # deps/CMakeLists.txt always builds its own bundled cereal (no toggle to skip + # it, unlike GLFW), and it exports an imported target literally named + # `cereal`. Fedora's cereal-devel instead exports the namespaced + # `cereal::cereal`, which this project's target_link_libraries(... cereal) + # calls don't match -- if cereal_DIR resolves to the system package, CMake + # silently treats the unmatched "cereal" as a raw "-lcereal" linker flag, + # which fails since there is no such standalone library. Only the + # deps-built cereal-config.cmake is compatible with this codebase. if [[ -z "$FOUND_GTK3" ]] then - echo -e "\nInstalling: gtk2-devel glew-devel systemd-devel dbus-devel cmake git\n" - dnf install -y gtk2-devel glew-devel systemd-devel dbus-devel cmake git + echo -e "\nInstalling: gtk2-devel glew-devel systemd-devel dbus-devel cmake git glfw-devel NLopt-devel openvdb-devel imath-devel openexr-devel nasm webkit2gtk4.1-devel boost-static mesa-compat-libOSMesa-devel\n" + dnf install -y gtk2-devel glew-devel systemd-devel dbus-devel cmake git glfw-devel NLopt-devel openvdb-devel imath-devel openexr-devel nasm webkit2gtk4.1-devel boost-static mesa-compat-libOSMesa-devel else - echo -e "\nFind gtk3-devel, installing: gtk3-devel glew-devel systemd-devel dbus-devel cmake git\n" - dnf install -y gtk3-devel glew-devel systemd-devel dbus-devel cmake git + echo -e "\nFind gtk3-devel, installing: gtk3-devel glew-devel systemd-devel dbus-devel cmake git glfw-devel NLopt-devel openvdb-devel imath-devel openexr-devel nasm webkit2gtk4.1-devel boost-static mesa-compat-libOSMesa-devel\n" + dnf install -y gtk3-devel glew-devel systemd-devel dbus-devel cmake git glfw-devel NLopt-devel openvdb-devel imath-devel openexr-devel nasm webkit2gtk4.1-devel boost-static mesa-compat-libOSMesa-devel fi if [[ -n "$BUILD_DEBUG" ]] then @@ -162,10 +177,28 @@ fi if [[ -n "$BUILD_DEPS" ]] then echo "[3/9] Configuring dependencies..." - BUILD_ARGS="" + # Use Fedora's glfw-devel (ships a proper glfw3Config.cmake) instead of + # building GLFW from source, which on Linux additionally requires KDE's + # extra-cmake-modules (ECM) for Wayland support that we don't otherwise need. + # + # Also skip building OpenVDB (and its OpenEXR/Imath dependency) here: the + # main app build is configured to use Fedora's system openvdb-devel + # instead (see SLIC3R_STATIC_EXCLUDE_OPENVDB below), since Fedora's + # openvdb-devel has no static .a to link against. But all deps share one + # install prefix/include root, so if deps ALSO installed its own (older, + # ABI-incompatible) OpenVDB headers here, the compiler would pick those up + # instead of Fedora's system headers regardless of any CMake variable + # override, causing undefined-symbol link errors from an ABI mismatch. + # + # Also skip building expat here: the final QIDIStudio link pulls in + # Fedora's system libwebkit2gtk-4.1.so (for wxWebView), which itself + # needs a matching dynamic libexpat.so to resolve its own XML_* symbols. + # If the app instead links deps' own static libexpat.a, those symbols + # go unresolved and the final link fails. + BUILD_ARGS="-DDEP_BUILD_GLFW=OFF -DDEP_BUILD_OPENVDB=OFF -DDEP_BUILD_EXPAT=OFF" if [[ -n "$FOUND_GTK3_DEV" ]] then - BUILD_ARGS="-DDEP_WX_GTK3=ON" + BUILD_ARGS="${BUILD_ARGS} -DDEP_WX_GTK3=ON" fi if [[ -n "$BUILD_DEBUG" ]] then @@ -210,10 +243,19 @@ fi if [[ -n "$BUILD_QIDI_STUDIO" ]] then echo "[7/9] Configuring Slic3r..." - BUILD_ARGS="" + # Fedora's glew-devel/openvdb-devel packages only ship shared .so libs, no + # static .a, so linking them statically (the SLIC3R_STATIC default) always + # fails to find them. + BUILD_ARGS="-DSLIC3R_STATIC_EXCLUDE_GLEW=1 -DSLIC3R_STATIC_EXCLUDE_OPENVDB=1" + # wx-config (generated by the bundled wxWidgets build) hardcodes "-L.../lib" + # for its own dependencies, e.g. "-Wl,-Bstatic -lzlibstatic". But zlib's own + # CMakeLists installs via GNUInstallDirs, which resolves to "lib64" on + # Fedora, so that -lzlibstatic can't otherwise be found. Add lib64 as an + # extra linker search path to cover this dep-install-layout mismatch. + BUILD_ARGS="${BUILD_ARGS} -DCMAKE_EXE_LINKER_FLAGS=-L$PWD/deps/build/destdir/usr/local/lib64" if [[ -n "$FOUND_GTK3_DEV" ]] then - BUILD_ARGS="-DSLIC3R_GTK=3" + BUILD_ARGS="${BUILD_ARGS} -DSLIC3R_GTK=3" fi if [[ -n "$BUILD_DEBUG" ]] then @@ -229,7 +271,7 @@ then # make Slic3r echo "[8/9] Building Slic3r..." - make -j4 QIDIStudio + make -j$NCORES QIDIStudio # make .mo # make gettext_po_to_mo # FIXME: DeftDawg: complains about msgfmt not existing even in SuperSlicer, did this ever work? diff --git a/CMakeLists.txt b/CMakeLists.txt index 74e6d759..70afc935 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -604,7 +604,7 @@ endforeach() find_package(NLopt 1.4 REQUIRED) -if(SLIC3R_STATIC) +if(SLIC3R_STATIC AND NOT SLIC3R_STATIC_EXCLUDE_OPENVDB) set(OPENVDB_USE_STATIC_LIBS ON) set(USE_BLOSC TRUE) endif () diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index 356f136c..685a3365 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -20,8 +20,8 @@ # therefore, unfortunately, the installation cannot be copied/moved elsewhere without re-installing wxWidgets. # +cmake_minimum_required(VERSION 3.5) project(QIDIStudio-deps) -cmake_minimum_required(VERSION 3.2) include(ExternalProject) include(ProcessorCount) @@ -40,6 +40,8 @@ option(DEP_BUILD_TIFF "Compile libtiff" ON) option(DEP_BUILD_BOOST "Compile boost" ON) option(DEP_BUILD_OPENSSL "Compile openssl" ON) option(DEP_BUILD_GLFW "Compile GLFW" ON) +option(DEP_BUILD_OPENVDB "Compile OpenVDB" ON) +option(DEP_BUILD_EXPAT "Compile expat" ON) option(DEP_BUILD_BLOSC "Compile Blosc" ON) option(DEP_BUILD_FREETYPE "Compile freetype" ON) option(DEP_BUILD_WXWIDGETS "Compile wxWidgets" ON) @@ -145,6 +147,9 @@ function(qidistudio_add_cmake_project projectname) -DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER} -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE} + # Several bundled dependencies declare cmake_minimum_required() below + # 3.5, which newer CMake (>=4.0) refuses to configure at all. + -DCMAKE_POLICY_VERSION_MINIMUM:STRING=3.5 -DBUILD_SHARED_LIBS:BOOL=OFF ${_cmake_osx_arch} "${_configs_line}" @@ -218,7 +223,7 @@ if (DEP_BUILD_TIFF AND NOT TIFF_FOUND) set(TIFF_PKG dep_TIFF) endif() set(EXPAT_PKG "") -if (NOT EXPAT_FOUND) +if (DEP_BUILD_EXPAT AND NOT EXPAT_FOUND) include(EXPAT/EXPAT.cmake) set(EXPAT_PKG dep_EXPAT) endif () @@ -248,8 +253,10 @@ if (DEP_BUILD_BLOSC) include(Blosc/Blosc.cmake) set(BLOSC_PKG dep_Blosc) endif () -include(OpenEXR/OpenEXR.cmake) -include(OpenVDB/OpenVDB.cmake) +if (DEP_BUILD_OPENVDB) + include(OpenEXR/OpenEXR.cmake) + include(OpenVDB/OpenVDB.cmake) +endif () include(GMP/GMP.cmake) include(MPFR/MPFR.cmake) @@ -294,6 +301,11 @@ if (DEP_BUILD_WEBSOCKET) set(WEBSOCKETPP_PKG dep_WebSocketPP) endif() +set(OPENVDB_PKG "") +if (DEP_BUILD_OPENVDB) + set(OPENVDB_PKG dep_OpenVDB) +endif () + set(_dep_list ${BOOST_PKG} dep_TBB @@ -302,7 +314,7 @@ set(_dep_list dep_Cereal dep_NLopt dep_libnoise - dep_OpenVDB + ${OPENVDB_PKG} dep_OpenCSG dep_OpenCV dep_CGAL From 6cacd92a058b2f21265dc4343b72f8025a7639de Mon Sep 17 00:00:00 2001 From: bowman Date: Sat, 5 Sep 2026 22:51:41 -0700 Subject: [PATCH 3/8] fix: strip active conda/miniforge env from PATH in BuildFedora.sh If a conda/miniforge environment is active (very common as a default shell setup), its bin/ directory sits ahead of the system toolchain on PATH. CMake's find_package(... CONFIG) search treats PATH entries as candidate install prefixes, so it can silently resolve a dependency (observed with zstd, pulled in transitively by Boost::iostreams) to an older/incompatible copy from the conda env instead of Fedora's own libzstd-devel -- and since CMake auto-adds found libraries' directories to the built binary's RPATH, that conda path gets baked into qidi-studio itself. This made the binary pick up conda's outdated libexpat.so.1 too (shared indirectly via the same RPATH entry) at runtime, regardless of the invoking shell's LD_LIBRARY_PATH or whether conda was still active when actually running the binary. Strip $CONDA_PREFIX from PATH at the top of the script so the Fedora system toolchain and libraries are used consistently throughout configure and build. Verified with another full clean -u/-d/-b -s run: the resulting binary's RUNPATH no longer references the conda environment. Claude-Session: https://claude.ai/code/session_01GX1HqJrRdEWvoiwXkfrLQH --- BuildFedora.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/BuildFedora.sh b/BuildFedora.sh index 7ef1f44e..7af0416b 100755 --- a/BuildFedora.sh +++ b/BuildFedora.sh @@ -4,6 +4,16 @@ export ROOT=`pwd` export NCORES=`nproc --all` export CMAKE_BUILD_PARALLEL_LEVEL=${NCORES} +# An active conda/miniforge environment prepends its own bin/ to PATH, and +# CMake's find_package(... CONFIG) search treats PATH entries as candidate +# install prefixes -- so a conda env can silently shadow a perfectly good +# Fedora system library (e.g. zstd, used transitively by Boost::iostreams) +# with an older/incompatible copy, baking that path into the built binary's +# RPATH. Strip any active conda environment's bin dirs from PATH so the +# Fedora system toolchain and libraries are used consistently. +if [[ -n "$CONDA_PREFIX" ]]; then + PATH=$(echo "$PATH" | tr ':' '\n' | grep -vF "$CONDA_PREFIX" | paste -sd:) +fi # Several bundled/third-party dependencies (and their own nested try_compile() # checks) declare cmake_minimum_required() below 3.5, which newer CMake # (>=4.0) refuses to configure at all. Setting this env var (rather than only From 6f3dbcc2a0bf0c08b55aa27ff47e8d9d436c2899 Mon Sep 17 00:00:00 2001 From: bowman Date: Sun, 6 Sep 2026 00:10:42 -0700 Subject: [PATCH 4/8] fix: stop Assimp from building its own broken bundled zlib on macOS Assimp's contrib/zlib is an old vendored fork whose zutil.h still has the classic `#if defined(MACOS) || defined(TARGET_OS_MAC)` branch that redefines fdopen() to NULL. TARGET_OS_MAC is unconditionally 1 on all Apple platforms (not just legacy Mac OS Classic, which this guard was written for), so on macOS-15/Xcode 16 this macro corrupts the system _stdio.h's fdopen() declaration and fails the CI build with "error: expected identifier or '('". Assimp.cmake was passing -DASSIMP_BUILD_ZLIB=ON, forcing it to compile this broken vendored copy instead of the project's own already-fixed zlib (deps/ZLIB/ZLIB.cmake). Every other dependency that needs zlib (CURL, PNG, TIFF, wxWidgets, OpenEXR, Blosc, JPEG) already depends on ${ZLIB_PKG} and lets find_package(ZLIB) resolve it via the shared CMAKE_PREFIX_PATH; Assimp was the one outlier still building its own. Turned ASSIMP_BUILD_ZLIB off and added the same DEPENDS so Assimp finds the shared zlib instead. Claude-Session: https://claude.ai/code/session_013GV54EAeMeXrZuiGg6X2Ct --- deps/Assimp/Assimp.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deps/Assimp/Assimp.cmake b/deps/Assimp/Assimp.cmake index 85a1c326..5e4c3789 100644 --- a/deps/Assimp/Assimp.cmake +++ b/deps/Assimp/Assimp.cmake @@ -9,6 +9,7 @@ endif() qidistudio_add_cmake_project(Assimp URL ${_assimp_url} URL_HASH ${_assimp_hash} + DEPENDS ${ZLIB_PKG} CMAKE_ARGS -DASSIMP_BUILD_TESTS=OFF -DASSIMP_BUILD_SAMPLES=OFF @@ -19,7 +20,7 @@ qidistudio_add_cmake_project(Assimp -DASSIMP_BUILD_GLTF_IMPORTER=ON -DASSIMP_BUILD_OBJ_IMPORTER=ON -DASSIMP_BUILD_FBX_IMPORTER=ON - -DASSIMP_BUILD_ZLIB=ON + -DASSIMP_BUILD_ZLIB=OFF -DASSIMP_WARNINGS_AS_ERRORS=OFF -DBUILD_WITH_STATIC_CRT=OFF ) From 5ec6ef7befbd9730f2bd74ae1cc6f91c0b228272 Mon Sep 17 00:00:00 2001 From: bowman Date: Sun, 6 Sep 2026 00:38:17 -0700 Subject: [PATCH 5/8] fix: bound FFmpeg's make parallelism to NPROC instead of unbounded -j FFMPEG.cmake built its own `make ${_build_j}` invocation with `_build_j` defaulting to a bare `-j` (unlimited parallel jobs) unless CMAKE_BUILD_PARALLEL_LEVEL happened to be set in the environment. On the macOS-15 GitHub Actions runner this exhausted the process table mid-build ("/bin/sh: fork: Resource temporarily unavailable", "make: *** [fftools/ffmpeg_demux.o] Error 128"). The rest of deps/CMakeLists.txt already computes a bounded NPROC (ProcessorCount, overridable via CMAKE_BUILD_PARALLEL_LEVEL) and uses it for every other dependency's build step. FFMPEG.cmake was reimplementing the same env-var check on its own, but without the ProcessorCount fallback, so its effective default parallelism was unbounded. Reuse NPROC directly instead of duplicating the logic. Claude-Session: https://claude.ai/code/session_013GV54EAeMeXrZuiGg6X2Ct --- deps/FFMPEG/FFMPEG.cmake | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/deps/FFMPEG/FFMPEG.cmake b/deps/FFMPEG/FFMPEG.cmake index aa1300be..0207356c 100644 --- a/deps/FFMPEG/FFMPEG.cmake +++ b/deps/FFMPEG/FFMPEG.cmake @@ -46,10 +46,7 @@ else () endif() endif() - set(_build_j -j) - if(DEFINED ENV{CMAKE_BUILD_PARALLEL_LEVEL}) - set(_build_j "-j$ENV{CMAKE_BUILD_PARALLEL_LEVEL}") - endif() + set(_build_j "-j${NPROC}") ExternalProject_Add(dep_FFMPEG URL https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n7.0.2.tar.gz From ac1a9b6989f06a3851c179bb687d5f13cb1d6d2b Mon Sep 17 00:00:00 2001 From: bowman Date: Sun, 6 Sep 2026 01:13:20 -0700 Subject: [PATCH 6/8] fix: guard QIDI/UserPresetSyncManager sources behind QDT_RELEASE_TO_PUBLIC CI builds with -DQDT_RELEASE_TO_PUBLIC=0 (the proprietary QIDI/ cloud sync sources aren't in this checkout), but src/slic3r/CMakeLists.txt still listed QIDI/UserPresetSyncManager.cpp/.hpp unconditionally in SLIC3R_GUI_SOURCES, so add_library() failed with "Cannot find source file" once the deps build got far enough to reach the app's CMake configure step. Every actual use of UserPresetSyncManager in GUI_App.cpp/.hpp is already wrapped in #if QDT_RELEASE_TO_PUBLIC -- only the CMakeLists source list was unguarded. Upstream hit and fixed this exact issue in 911a3eaf ("fix: build without QIDI proprietary assets"), which moved these two files into the existing `if(QDT_RELEASE_TO_PUBLIC)` guarded list alongside QIDINetwork.cpp/P2PManager.cpp. This branch predates that commit, so port just the src/slic3r/CMakeLists.txt hunk (the resulting file is byte-identical to upstream's fixed version). Claude-Session: https://claude.ai/code/session_013GV54EAeMeXrZuiGg6X2Ct --- src/slic3r/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slic3r/CMakeLists.txt b/src/slic3r/CMakeLists.txt index f1f5aba1..c97d191d 100644 --- a/src/slic3r/CMakeLists.txt +++ b/src/slic3r/CMakeLists.txt @@ -241,8 +241,6 @@ set(SLIC3R_GUI_SOURCES GUI/DownloadManager.hpp GUI/QDSDeviceManager.cpp GUI/QDSDeviceManager.hpp - QIDI/UserPresetSyncManager.cpp - QIDI/UserPresetSyncManager.hpp GUI/BedShapeDialog.cpp GUI/BedShapeDialog.hpp GUI/Plater.cpp @@ -683,6 +681,8 @@ if(QDT_RELEASE_TO_PUBLIC) QIDI/QIDISSEClientV2.hpp QIDI/P2PManager.cpp QIDI/P2PManager.hpp + QIDI/UserPresetSyncManager.cpp + QIDI/UserPresetSyncManager.hpp ) endif () From f7b9cbecbed2bd673450496197ec6592889d9998 Mon Sep 17 00:00:00 2001 From: bowman Date: Sun, 6 Sep 2026 02:09:11 -0700 Subject: [PATCH 7/8] fix: fall back to QDT_RELEASE_TO_PUBLIC=0 when QIDI/ sources are missing The Linux CI step tries to force QDT_RELEASE_TO_PUBLIC=0 by sed-patching BuildLinux.sh for the literal string "-DQDT_INTERNAL_TESTING=0", but BuildLinux.sh only ever writes that flag as -DQDT_INTERNAL_TESTING=${INTERNAL_TESTING} (a variable, never the literal "0"), so the sed is a silent no-op and QDT_RELEASE_TO_PUBLIC keeps its "1" default. CMake then configures the QDT_RELEASE_TO_PUBLIC-guarded proprietary QIDI/ sources (QIDINetwork.cpp, P2PManager.cpp, etc.), none of which exist in this checkout, and add_library() fails with "Cannot find source file". Upstream hit the same class of bug and fixed it in 911a3eaf ("fix: build without QIDI proprietary assets") by making version.inc auto-detect missing QIDI/ sources and force QDT_RELEASE_TO_PUBLIC off regardless of what was passed in, instead of relying on every build script/CI step to thread the flag through correctly. Port that same version.inc fallback here so all three CI platforms build correctly even when their flag-passing is unreliable. --- version.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/version.inc b/version.inc index 6d955696..fd54c822 100644 --- a/version.inc +++ b/version.inc @@ -7,6 +7,10 @@ set(SLIC3R_APP_KEY "QIDIStudio") if(NOT DEFINED QDT_RELEASE_TO_PUBLIC) set(QDT_RELEASE_TO_PUBLIC "1") endif() +if(QDT_RELEASE_TO_PUBLIC AND NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/src/slic3r/QIDI/QIDINetwork.cpp") + message(WARNING "src/slic3r/QIDI/ is missing: building without QIDI cloud/account features.") + set(QDT_RELEASE_TO_PUBLIC "0") +endif() if(NOT DEFINED QDT_INTERNAL_TESTING) set(QDT_INTERNAL_TESTING "0") endif() From df7756593c03d24c66f9998c82a35638b9f4b960 Mon Sep 17 00:00:00 2001 From: bowman Date: Sun, 6 Sep 2026 03:33:38 -0700 Subject: [PATCH 8/8] fix: prioritize project's own destdir over Homebrew boost on macOS CI The macOS CI step brew-installs boost and injects it into CMAKE_PREFIX_PATH ahead of the project's own destdir ($DEPS/usr/local): "-DCMAKE_PREFIX_PATH=\"$CMAKE_PREFIX_PATH;$DEPS...". find_package(Boost) in CONFIG mode picks the first root satisfying the minimum version, so it resolved to Homebrew's Boost 1.92.0 instead of the project's own pinned Boost 1.84.0 (built from source by deps/Boost/Boost.cmake specifically so the app isn't at the mercy of whatever boost version the CI image happens to have). Something about that newer Boost's ABI doesn't match what libslic3r/libslic3r_gui was compiled against, and the final link fails with undefined symbols for several boost::filesystem::detail:: functions. BuildMac.sh's own default is "-DCMAKE_PREFIX_PATH=\"$DEPS/usr/local\"" (no Homebrew paths at all), so put $DEPS/usr/local back in front and keep the brew-installed libs only as a fallback after it, instead of ahead of it. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8fcceac2..d442ba25 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -114,7 +114,7 @@ jobs: export CPPFLAGS="-I$CURL_PATH/include -I$BOOST_PATH/include -I$ICU_PATH/include -I$ZLIB_PATH/include -I$ZSTD_PATH/include" export PKG_CONFIG_PATH="$CURL_PATH/lib/pkgconfig:$BOOST_PATH/lib/pkgconfig:$ICU_PATH/lib/pkgconfig:$ZLIB_PATH/lib/pkgconfig:$ZSTD_PATH/lib/pkgconfig" export CMAKE_PREFIX_PATH="$BOOST_PATH;$CURL_PATH;$ICU_PATH" - sed -i '' -e 's/-DCMAKE_PREFIX_PATH="$DEPS/-DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;$DEPS/' BuildMac.sh + sed -i '' -e 's/-DCMAKE_PREFIX_PATH="$DEPS\/usr\/local"/-DCMAKE_PREFIX_PATH="$DEPS\/usr\/local;$CMAKE_PREFIX_PATH"/' BuildMac.sh sed -i '' -e 's/-DQDT_INTERNAL_TESTING=0/-DQDT_INTERNAL_TESTING=1/' BuildMac.sh sed -i '' -e 's/-DQDT_RELEASE_TO_PUBLIC=1/-DQDT_RELEASE_TO_PUBLIC=0/' BuildMac.sh chmod +x BuildMac.sh