Conversation
The Windows Nuitka build hit C1002 'compiler is out of heap space in pass 2' on three files: module.pymupdf.mupdf.c 2,206,786 lines ← unfixable in MSVC module.typing_extensions.c 94,793 lines ← end-of-file OOM module.uvicorn._types.c 4,583 lines ← parallel-job OOM Three coupled changes: 1. Drop pymupdf from the BUILD venv. Replace 'pip install -e .[intelligence,mcp,gui]' with 'pip install -e .[mcp,gui]' + 'pip install pypdf anthropic'. pypdf alone covers the bundle's PDF-text path; PyPI users who 'pip install autopapertoppt [intelligence]' still get pymupdf the regular way. 2. Add --nofollow-import-to for pymupdf + uvicorn + fastapi + starlette + websockets + streamlit + tornado. Belt-and-suspenders with the install change for pymupdf; the rest get pulled in transitively by mcp/web extras and we never use them at runtime from inside the .exe (autopapertoppt-mcp uses stdio, not SSE/ HTTP transports). Excluding them avoids both compile time and bundle size. 3. --lto=no + --jobs=2. Disabling link-time optimization drops MSVC's peak heap pressure (LTO holds the full module graph in memory at link time). --jobs=2 caps parallel compilation at 2 workers instead of the runner's default 4, halving concurrent heap usage during the per-module compile step. Together these should let typing_extensions.c compile within the MSVC per-process heap limit and skip the pymupdf bomb entirely. Build time may go up slightly from --jobs=2 vs. default, but a build that completes beats one that doesn't.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Single-commit fix (
06c0e80) for the Windows Nuitka build'sC1002: compiler is out of heap space in pass 2errors that bombed PR #6's release.What broke
Three generated C files exceeded MSVC's per-file heap cap:
module.pymupdf.mupdf.cmodule.typing_extensions.cmodule.uvicorn._types.cThree coupled fixes
Drop pymupdf from the build venv. Replace
pip install -e ".[intelligence,mcp,gui]"withpip install -e ".[mcp,gui]"+pip install pypdf anthropic. The bundle uses pypdf alone for PDF text extraction. PyPI users still get pymupdf viapip install autopapertoppt[intelligence]. Belt-and-suspenders:--nofollow-import-to=pymupdf.--nofollow-import-to=uvicorn,fastapi,starlette,websockets,streamlit,tornado. These get pulled in transitively by mcp/web extras but the bundle'sautopapertoppt-mcpuses stdio transport, never SSE/HTTP — so we never need them at runtime.--lto=no --jobs=2. Disabling link-time optimization drops MSVC's peak heap pressure (LTO holds the full module graph in memory).--jobs=2caps parallel compilation at 2 workers instead of the runner's default of 4 cores, halving concurrent heap usage.Test plan
--jobs=2instead of 50-70)autopapertoppt-windows-x86_64.ziplands on the release,publish-releaseunmarks the draft, version shows in sidebar.exeruns--helpandguicorrectly.exeshows the icon embedded by--windows-icon-from-ico