Skip to content

Fix Flatpak build with SLIC3R_PCH=OFF (mixed-filament missing includes) - #712

Merged
LiuLikeQian merged 1 commit into
Snapmaker:mainfrom
zhangzhend0ng:fix/flatpak-pch-off-build
Aug 13, 2026
Merged

Fix Flatpak build with SLIC3R_PCH=OFF (mixed-filament missing includes)#712
LiuLikeQian merged 1 commit into
Snapmaker:mainfrom
zhangzhend0ng:fix/flatpak-pch-off-build

Conversation

@zhangzhend0ng

Copy link
Copy Markdown
Collaborator

Description

The Flatpak CI build fails because the mixed-filament code relies on the precompiled header to pull in two headers:

  • src/slic3r/GUI/MixedFilamentBatchDialog.cpp uses wxWindowUpdateLocker but never includes <wx/wupdlock.h>. The Flatpak build sets -DSLIC3R_PCH=OFF, so the TU fails with 'wxWindowUpdateLocker' was not declared in this scope (run 31679936598, aarch64 Flatpak job).
  • src/slic3r/GUI/MixedFilamentColorMapPanel.hpp uses std::array without including <array> — the same latent PCH dependency. The failed CI run aborted at 74% before compiling this TU, so it would have failed on the next run.

Both are one-line include additions, matching sibling files (e.g. BitmapComboBox.cpp, EditGCodeDialog.cpp) that already include these headers directly.

Screenshots/Recordings/Graphs

N/A — build-only fix.

Tests

  • Reproduced the failure locally with -DSLIC3R_PCH=OFF (MSVC, fresh Ninja build reusing the prebuilt deps): MixedFilamentBatchDialog.cpp failed with C2065 'wxWindowUpdateLocker': undeclared identifier; after the fix, all 14 TUs touched by the mixed-filament commit (9e42e78) compile cleanly.
  • A/B CI comparison: the previous scheduled "Build all" run (31626722495, commit b63ab9afb9) had both Flatpak jobs green; the failing dispatch run (31679936598, commit df205a640d) differs by 6 commits, of which only the mixed-filament commit (feat: mixed-filament phase 2 — batch color match with manual/recommended modes #702) touches C++ that reaches the Flatpak build.
  • A fresh Flatpak CI run on this branch is the final confirmation.

MixedFilamentBatchDialog.cpp uses wxWindowUpdateLocker but never included
<wx/wupdlock.h>; it only compiled because the PCH (pchheader.hpp) pulls the
header in. The Flatpak build sets -DSLIC3R_PCH=OFF, so the TU failed with
'wxWindowUpdateLocker was not declared in this scope'.

MixedFilamentColorMapPanel.hpp uses std::array without including <array>,
the same latent PCH dependency; the Flatpak CI run never reached this file
(74% aborted), so it would have failed on the next run.

Both are one-line include additions matching the surrounding code.
@LiuLikeQian
LiuLikeQian merged commit f1e9f78 into Snapmaker:main Aug 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants