Skip to content

fix(lake): use response files on all platforms to avoid ARG_MAX#12540

Open
kim-em wants to merge 4 commits intoleanprover:masterfrom
kim-em:fix/response-file-all-platforms
Open

fix(lake): use response files on all platforms to avoid ARG_MAX#12540
kim-em wants to merge 4 commits intoleanprover:masterfrom
kim-em:fix/response-file-all-platforms

Conversation

@kim-em
Copy link
Collaborator

@kim-em kim-em commented Feb 18, 2026

Lake already uses response files (@file) on Windows to avoid exceeding CLI length limits when invoking clang/ar. This extends that behavior to macOS and Linux, where linking Mathlib's ~15,000 object files into a shared library can exceed macOS's ARG_MAX (262,144 bytes).

Both clang and gcc support @file response files on all platforms, so this is safe to enable unconditionally.

Reported as a macOS issue at https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/The.20clang.20command.20line.20with.20all.20~15.2C000.20Mathlib.20.2Ec.2Eo.2Eexport/near/574369912: the Mathlib cache ships Linux .so shared libs but not macOS .dylib files, so precompileModules on macOS triggers a full re-link that exceeds ARG_MAX.

🤖 Prepared with Claude Code

kim-em and others added 4 commits February 17, 2026 23:20
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This PR reorders doc-gen4 after mathlib4 in the release process. Previously
doc-gen4 was processed before mathlib4, but its benchmarks reference the
mathlib tag which doesn't exist yet at that point, causing CI failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…s.yml

ProofWidgets4 no longer depends on batteries (no `require` statements in its lakefile).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Lake already uses response files (`@file`) on Windows to avoid
exceeding CLI length limits. This extends that behavior to macOS
and Linux, where linking Mathlib's ~15,000 object files into a
shared library exceeds macOS's ARG_MAX (262,144 bytes).

Both `clang` and `gcc` support `@file` response files on all
platforms, so this is safe to enable unconditionally.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kim-em kim-em requested a review from tydeu as a code owner February 18, 2026 00:25
set(LEAN_VERSION_MINOR 29)
set(LEAN_VERSION_PATCH 0)
set(LEAN_VERSION_IS_RELEASE 0) # This number is 1 in the release revision, and 0 otherwise.
set(LEAN_VERSION_IS_RELEASE 1) # This number is 1 in the release revision, and 0 otherwise.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it intentional for this PR? Same question for release_repos changes.

@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Feb 18, 2026
@mathlib-lean-pr-testing
Copy link

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase bfc5d43ad314d1e44a71c3ca761a3640ff23c4fb --onto 91bd6e19a7b7aca769f9720e1127c768df0cd2a7. You can force Mathlib CI using the force-mathlib-ci label. (2026-02-18 01:21:41)

@leanprover-bot
Copy link
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI will not be attempted unless your PR branches off the nightly-with-manual branch. Try git rebase bfc5d43ad314d1e44a71c3ca761a3640ff23c4fb --onto 5c7a508e21c5ebc710b0dfe65648d5beba4e34e0. You can force reference manual CI using the force-manual-ci label. (2026-02-18 01:21:43)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants