Sitelet https://github.com/astral-sh/python-build-standalone/pull/1217
Skip to content

skip llvm-strip on signed DLLs - #1217

Merged
jjhelmus merged 1 commit into
astral-sh:mainfrom
ethernet8023:keep-signature-of-tcl-dlls
Aug 13, 2026
Merged

jjhelmus merged 1 commit into
astral-sh:mainfrom
ethernet8023:keep-signature-of-tcl-dlls

Conversation

@ethernet8023

Copy link
Copy Markdown
Contributor

when packaging a uv python installed python into a .msix app for the microsoft app store, i hit some signtool failures with error 0x800700C1.

these are caused by AppxSIP going thru every binary in your package and validating them in some way.

llvm-strip removes the signature from a bunch of DLLs that come with these python buidls, but it keeps the certificate table entry in the PE optional header , which makes the entry point past the end of the file.

this is exactly the bug from #855 that #856 solved. i'm extending it to more DLLs and adding a comment explaining it.

a more permanent fix might be detecting signatures on files and skipping if we see them? let me know if you'd rather that, i could wireup detecting signatures and/or zipfs to get rid of the hardcoded list that'll probably regress as versions change what DLLs are shipped.

`llvm-strip` removes the Authenticode signature from these DLLs, but it
keeps the certificate table entry in the PE optional header. The entry
then points past the end of the file.

An MSIX package fails to sign when it contains one of these DLLs,
because AppxSIP examines each PE file in the package, and
`signtool` refuses to sign with with 0x800700C1 (ERROR_BAD_EXE_FORMAT).

It still happens with the Tcl/Tk 8.6 DLLs (CPython 3.10 to 3.13, all
Windows targets) and in vcruntime140_threads.dll (CPython 3.10).
CPython 3.14 and later use Tcl 9, which astral-sh#1213 exempted for a different
reason.
ethernet8023 added a commit to NousResearch/hermes-agent that referenced this pull request Aug 12, 2026
@jjhelmus

Copy link
Copy Markdown
Contributor

This makes sense. These DLLs are coming pre-build (and signed) from CPython via https://github.com/python/cpython-bin-deps.

@jjhelmus
jjhelmus merged commit cf85e58 into astral-sh:main Aug 13, 2026
23 checks passed
@ethernet8023
ethernet8023 deleted the keep-signature-of-tcl-dlls branch August 13, 2026 21:54
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