Skip to content

OPE-2: Lean 4.10.0 user-local install on macOS + Mathlib cache relink workaround - #2

Open
agentforce314 wants to merge 1 commit into
mainfrom
ope/2-lean-install-macos
Open

agentforce314 wants to merge 1 commit into
mainfrom
ope/2-lean-install-macos

Conversation

@agentforce314

Copy link
Copy Markdown
Owner

Summary

Board asked on OPE-2: "can you install lean and other tools?" — done, user-local only.

  • elan 4.2.4 → lean 4.10.0 / lake 5.0.0 under ~/.elan (no sudo, no shell-rc edits; export PATH="$HOME/.elan/bin:$PATH" per shell)
  • Mathlib deps cloned; 4878 .olean from cache (100%)
  • Blocker + fix: lake exe cache get aborted with dyld: __DATA_CONST segment missing SG_READ_ONLY flag (Lean 4.10.0's bundled ld64.lld vs macOS 26 dyld). Added docs/ci/relink-mathlib-cache-macos.sh, which re-links cache with Apple's ld. Documented in docs/LEAN_INSTALL_LOG.md (new macOS section).

How to verify

export PATH="$HOME/.elan/bin:$PATH"
cd proofs/lean-project
lake build ProofLab.NQueens   # exit 0, ~10 s from cache

#print axioms on the three Level A theorems: [propext, Classical.choice, Quot.sound].

Risks

  • lean_exe targets (e.g. proof-lab from Main.lean) linked on this machine will hit the same dyld issue; libraries (.olean) are unaffected. Use lake build ProofLab.<Module> as the gate.
  • Docs-only change; no Lean sources touched.

🤖 Generated with Claude Code

…relink workaround

- elan 4.2.4 / lean 4.10.0 / lake installed under ~/.elan (no PATH edits, no sudo)
- lake exe cache get crashed (dyld SG_READ_ONLY, old bundled lld); added
  docs/ci/relink-mathlib-cache-macos.sh which re-links `cache` with Apple ld
- verify: export PATH="$HOME/.elan/bin:$PATH"; cd proofs/lean-project; lake build ProofLab.NQueens  (exit 0)
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