leanprover / leanprover/lean4

Fails to compile stage2 on msys2/mingw64

Open
#4,197 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P-low
Dominant language
Lean
Stars
9.2k
Forks
990
Avg merge
1d 17h
Merged PRs (30d)
175

Description

Prerequisites

Please put an X between the brackets as you perform the following steps:

Description

I failed to reproduce build on msys2

Building stage2:
it gets stuck on
[ 0%] Built target make_stdlib

make[6]: *** No rule to make target 'runtime/libleanrt_initial-exec.a', needed by 'CMakeFiles/Init_shared'.  Stop.

I followed the steps on the website, downloaded the git code, and successfully compiled state0, and stage1, but it gets stuck on stage2

Context

I have installed all dependencies from msys2 as written in the tutorial

Steps to Reproduce
  1. do
cmake -B build -G "Unix Makefiles"  -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
  1. cd build
  2. make stage2

Expected behavior: [I expect stage2 to compile]

Actual behavior: [stage2 does not compile]

Versions

git master branch 1382e9fbc4877820570d99f8a1226081a4a41750

Using windows 11 with msys2 mingw enviroment, also latest version

Additional Information

Contributor guide

Open the contributing guide

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.

Research direction

Start by reproducing the issue with the provided CMake command in the MSYS2 mingw64 environment, then run make stage2 from build. Investigate the stage2 dependency on runtime/libleanrt_initial-exec.a and confirm the fix by completing the stage2 build without the reported missing-target error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.