Windows: lake build of pfaffelh/leancourse fails linking verso_VersoManual_Docstring (undefined symbol lean_md4c_markdown_parse)

Open
#1,070 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
43/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Domain
build-system

Research direction

Start by reproducing the reported Windows 11 build with Lean 4.34.0: run lake exe cache get followed by lake build in the leancourse checkout. Inspect the VersoManual.Docstring dynamic library link command and the MD4Lean package artifacts mentioned in the issue to trace why lean_md4c_markdown_parse is unresolved. Done means identifying whether Windows builds are supported and providing a working fix or workaround.

Written by the indexing model from the issue text.

Description

Environment: Windows 11, Lean toolchain leanprover/lean4:v4.34.0 via elan.

Steps: clone https://github.com/pfaffelh/leancourse, run lake exe cache get, then lake build.

Result: build stops at 18636/18923 with

ld.lld: error: undefined symbol: lean_md4c_markdown_parse

referenced 5 more times
error: external command clang.exe exited with code 1
Some required targets logged failures:

  • VersoManual.Docstring:dynlib

Details:

  • Before that, lake reported a missing libLake_shared.dll in the toolchain's lib\lean folder.
    I worked around it by copying the DLL there.
  • The response file of verso_VersoManual_Docstring.dll.rsp contains -LC:....lake\packages\MD4Lean.lake\build\lib
    and -lMD4Lean_MD4Lean.
  • .lake\packages\MD4Lean.lake\build\lib\MD4Lean_MD4Lean.dll exists. A byte search (findstr)
    finds the string lean_md4c_markdown_parse in that file, but not in MD4Lean_MD4Lean_FFI.dll or MD4Lean_MD4Lean_Basic.dll.
  • The MD4Lean sources (md4c, wrapper) are present, git status of the package is clean, and the folder is excluded from Windows Defender.

Question: is building this project on Windows supported, and is there a workaround?

kind regards Roman Wurdack

Dominant language
Lean
Stars
420
Forks
134
Avg merge
1d 9m
Merged PRs (30d)
46

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from leanprover/verso

All issues in leanprover/verso

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.