WIN10 CMake was unable to find a build program corresponding to "MSYS Makefiles". CMAKE_MAKE_PROGRAM is not set.

Asked by Jacek

I am trying to build kicad on windows using msys2. I am fallowing this tutorial: http://ci.kicad-pcb.org/job/kicad-doxygen/ws/Documentation/doxygen/html/md_Documentation_development_compiling.html

Unfortunately this tutorial is probably out of date because of:
1. I dont have mingw64_shell.bat . Instead I am using mingw64.exe wfrom msys2 directory
2. I cannont configure kicad build:

Jacek@DESKTOP-FF4LIVN MINGW64 ~/workspace/kicad/build/release
$ cmake -DCMAKE_BUILD_TYPE=Release -G "MSYS Makefiles" -DCMAKE_PREFIX_PATH=/mingw64 -DCMAKE_INSTALL_PREFIX=/mingw64 -DDEFAULT_INSTALL_PATH=/mingw64 -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_MODULES=ON -DKICAD_SCRIPTING_WXPYTHON=ON ../../
CMake Error: CMake was unable to find a build program corresponding to "MSYS Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMake was unable to find a build program corresponding to "MSYS Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_AR was not found, please set to archive program.
-- Configuring incomplete, errors occurred!

I cannot find any solution using google because everyone says that I have to change MSYS Makefiles to MinGW Makefiles and it also fails:

Jacek@DESKTOP-FF4LIVN MINGW64 ~/workspace/kicad/build/release
$ cmake -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles" -DCMAKE_PREFIX_PATH=/mingw64 -DCMAKE_INSTALL_PREFIX=/mingw64 -DDEFAULT_INSTALL_PATH=/mingw64 -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_MODULES=ON -DKICAD_SCRIPTING_WXPYTHON=ON ../../
CMake Error at C:/msys64/mingw64/share/cmake-3.6/Modules/CMakeMinGWFindMake.cmake:22 (message):
  sh.exe was found in your PATH, here:

  C:/msys64/usr/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.

Call Stack (most recent call first):
  CMakeLists.txt:32 (project)

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

Can somone experienced update windows building?

And yes, I have installed mingw-w64-x86_64-* packages using msys2 and also I have updated msys2 by pacman.

Question information

Language:
English Edit question
Status:
Solved
For:
KiCad Edit question
Assignee:
No assignee Edit question
Solved by:
Jacek
Solved:
Last query:
Last reply:
Revision history for this message
Wayne Stambaugh (stambaughw) said :
#1

Running mingw64.exe is correct. The MSYS2 project did away with the batch file launchers. Did you install all of the dependencies listed in the "MSYS2 the Hard Way" section? It looks like some of the build dependencies are missing.

Revision history for this message
Jacek (dr.jacek) said :
#2

Yes, I have installed all of dependiences. I have copied it into command line.

Revision history for this message
Jacek (dr.jacek) said :
#3

I found a solution:

-DCMAKE_PREFIX_PATH=/mingw64 is uncorrect prefix path and orthodox cmake needs:
-DCMAKE_PREFIX_PATH=/mingw64/ - path should be ended with slash

Revision history for this message
Wayne Stambaugh (stambaughw) said :
#4

This seems odd because I do not need the trailing /. I checked with both mingw32 and mingw64 builds. I'm glad this resolved your issue but I will forgo updating the building kicad from source document unless other user are having this issue.

Revision history for this message
Kristoffer (kristoffer-odmark) said :
#5

This is not the solution for me.

I am following the MSYS2 the Easy way under windows 7, and I get a lot of errors:

CMaker Error: CMake was unable to find a build program corresponding t o"MSYS Makefiles" CMAKE_MAKE_PROGRAM is not set. you probably need to select a different build tool.

CMAKE_C_COMPILER not set, after EnableLanguage
CMAKE_CXX_COMPILER not set, after EnableLanguage
CMAKE_AR was not found, please set to archive program

I have installed the packages from the MSYS2 the Hard Way as well.

Revision history for this message
Kristoffer (kristoffer-odmark) said :
#6

My solution had the same problems and I had to install the package base devel. Then it started working.

pacman -S base-devel