Skip to content

fix: CI/CD build fail for arm64 windows - #14556

Closed
peachismomo wants to merge 1 commit into
feat/plugin-featurefrom
fix/cpython-arm64-build
Closed

peachismomo wants to merge 1 commit into
feat/plugin-featurefrom
fix/cpython-arm64-build

Conversation

@peachismomo

Copy link
Copy Markdown
Contributor

Description

Summary

Fix the Windows ARM64 dependency build failing while building the bundled CPython 3.12.3 source with the newer Windows SDK on the windows-11-arm GitHub Actions runner.

Problem

The Windows ARM64 dependency job configures for ARM64 correctly, and CPython is invoked with:

/p:Platform=ARM64

However, CPython builds a host-side _freeze_module.exe helper before installing the final Python runtime. That helper failed with:

posixmodule.obj : error LNK2019: unresolved external symbol _PssCaptureSnapshot
posixmodule.obj : error LNK2019: unresolved external symbol _PssQuerySnapshot
posixmodule.obj : error LNK2019: unresolved external symbol _PssFreeSnapshot
PCbuild\win32\_freeze_module.exe : fatal error LNK1120: 3 unresolved externals

This is a known CPython 3.12.3 issue with newer Windows SDKs. Python 3.12.3 still sets its Windows API baseline to Windows 8:

#define Py_WINVER 0x0602
#define Py_NTDDI NTDDI_WIN8

The newer Windows SDK exposes the Process Snapshotting APIs used by posixmodule.c only for Windows 8.1 or newer, so those declarations are hidden and the _freeze_module link fails.

Upstream CPython fixed this by moving the Windows build API baseline to Windows 8.1:

python/cpython#124676

Fix

Add a local patch for the pinned Python-3.12.3.tar.xz source and apply it during the Windows dep_python3 external project patch step.

The patch updates CPython's PC/pyconfig.h from:

#define Py_WINVER 0x0602
#define Py_NTDDI NTDDI_WIN8

to:

#define Py_WINVER 0x0603
#define Py_NTDDI NTDDI_WINBLUE

This makes the Windows SDK expose PssCaptureSnapshot, PssQuerySnapshot, and PssFreeSnapshot, allowing CPython's _freeze_module helper to link successfully.

Scope

This does not upgrade bundled Python and does not change OrcaSlicer's embedded Python version. It only backports the upstream CPython build fix to the pinned 3.12.3 source archive.

How to Download Pull Requests Artifacts for Testing

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

Hi @peachismomo, you can manage the labels for this PR by /bot add-label and /bot remove-label

Allowed labels are:
bug-fix, enhancement, Localization, profile, QoL, UI/UX and dependencies.

Examples:

/bot add-label bug-fix
/bot add-label bug-fix, UI/UX
/bot remove-label bug-fix, UI/UX

@peachismomo
peachismomo deleted the fix/cpython-arm64-build branch July 12, 2026 07:09
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.

1 participant