Skip to content

fix: use correct shared library directory for Lake plugin on Windows#13128

Open
kim-em wants to merge 1 commit intomasterfrom
windows_dlls
Open

fix: use correct shared library directory for Lake plugin on Windows#13128
kim-em wants to merge 1 commit intomasterfrom
windows_dlls

Conversation

@kim-em
Copy link
Collaborator

@kim-em kim-em commented Mar 26, 2026

This PR fixes the Windows dev build by using CMAKE_RELATIVE_LIBRARY_OUTPUT_DIRECTORY instead of the hardcoded lib/lean path for the Lake plugin. On Windows, DLLs must be placed next to executables in bin/, but the plugin path was hardcoded to lib/lean, causing stage0 DLLs to not be found.

The CMAKE_RELATIVE_LIBRARY_OUTPUT_DIRECTORY variable was introduced precisely for this purpose — it resolves to bin on Windows and lib/lean elsewhere.

Closes #13126

🤖 Prepared with Claude Code

This PR fixes the Windows dev build by using `CMAKE_RELATIVE_LIBRARY_OUTPUT_DIRECTORY`
instead of the hardcoded `lib/lean` path for the Lake plugin. On Windows, DLLs must be
placed next to executables in `bin/`, but the plugin path was hardcoded to `lib/lean`.

Closes #13126

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kim-em kim-em added the changelog-compiler Compiler, runtime, and FFI label Mar 26, 2026
@tydeu tydeu requested a review from hargoniX March 26, 2026 05:28
@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 Mar 26, 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 db491ddd35e0eabc7fb14181db56074d8228c248 --onto e6df474dd9c3ad0e21771eaa808c53f66222216d. You can force Mathlib CI using the force-mathlib-ci label. (2026-03-26 06:15:30)

@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 db491ddd35e0eabc7fb14181db56074d8228c248 --onto cfa8c5a036d6990635c6ec50b02d0e806995cec3. You can force reference manual CI using the force-manual-ci label. (2026-03-26 06:15:31)

@Kha Kha added this pull request to the merge queue Mar 26, 2026
@Kha Kha removed this pull request from the merge queue due to a manual request Mar 26, 2026
@Kha Kha added the release-ci Enable all CI checks for a PR, like is done for releases label Mar 26, 2026
@hargoniX
Copy link
Contributor

hargoniX commented Mar 26, 2026

The fsanitize error here is on me as I needed to do a multi PR setup to fix some stage0 issues yesterday and I wasn't able to fully go through with it yet, I'll finish that up today. The Windows CI is just broken I think?

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

Labels

changelog-compiler Compiler, runtime, and FFI release-ci Enable all CI checks for a PR, like is done for releases 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.

Default Windows build fails (cannot find stage0 DLLs when building Lake)

5 participants