Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MinGW not usable because there is Gits sh.exe in the PATH #111

Closed
2 of 5 tasks
Flamefire opened this issue Nov 23, 2019 · 5 comments
Closed
2 of 5 tasks

MinGW not usable because there is Gits sh.exe in the PATH #111

Flamefire opened this issue Nov 23, 2019 · 5 comments
Assignees
Labels
Area: Git question Further information is requested

Comments

@Flamefire
Copy link

Describe the bug
Runing cmake with -G "MinGW Makefiles" fails with the following error:

CMake Error at C:/Program Files/CMake/share/cmake-3.15/Modules/CMakeMinGWFindMake.cmake:12 (message):
  sh.exe was found in your PATH, here:

  C:/Program Files/Git/bin/sh.exe

  For MinGW make to work correctly sh.exe must NOT be in your path.

  Run cmake from a shell that does not have sh.exe in your PATH.

  If you want to use a UNIX shell, then use MSYS Makefiles.

Virtual environments affected

  • macOS 10.15
  • Ubuntu 16.04 LTS
  • Ubuntu 18.04 LTS
  • Windows Server 2016 R2
  • Windows Server 2019

Expected behavior
MinGW usable out of the box

See also: https://help.appveyor.com/discussions/problems/3193-cmake-building-for-mingw-issue-with-git-shexe

@zauonlok
Copy link

Same issue here. I managed to get MinGW working by adding these two lines:

set PATH=%PATH:C:\Program Files\Git\bin;=%
set PATH=%PATH:C:\Program Files\Git\usr\bin;=%

See also:
https://github.com/zauonlok/renderer/blob/6c274ed54f758c54b1ee4f9e3715e9991601be4d/.github/workflows/cmake-ci.yml#L22-L23

@Flamefire
Copy link
Author

Flamefire commented Dec 11, 2019

Note that this can be work-arounded by using the current CMake version or passing -DCMAKE_SH=SH-NOTFOUND to cmake

@zauonlok
Copy link

Yes, this issue is fixed on the master branch of CMake: Kitware/CMake@82ddcf0

@zauonlok
Copy link

@kaylangan kaylangan added Area: Git question Further information is requested labels Jan 10, 2020
@alepauly
Copy link
Contributor

This was fixed in #211 which should be deployed next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Git question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants