[CMake] how to build cmake with mingw and msys?

Alan W. Irwin irwin at beluga.phys.uvic.ca
Thu Aug 16 01:47:56 EDT 2012


On 2012-08-15 08:51-0400 Bill Hoffman wrote:

> On 8/14/2012 7:56 PM, John Poole wrote:
>> make: make: Command not found
> The problem is above, you do not have make in your PATH.  It is most likely 
> called mingw32-make.exe.  If you make a copy of that to make.exe it should 
> work.

Bill, you are the chief guru here so I am a bit hesitant to correct
you.  :-) However, I just checked a fairly recently downloaded version
of MinGW/MSYS I use for my Wine experiments using the following
command:

irwin at raven> find /home/wine/newstart/MinGW -name "*make.exe"
/home/wine/newstart/MinGW/msys/1.0/bin/make.exe
/home/wine/newstart/MinGW/bin/mingw32-make.exe

and you appear above to be giving the wrong name of the make executable
to be used with MSYS.

In other words, the MinGW version of make (the one that should be used
with the "MinGW Makefiles" CMake generator is called mingw32-make.exe,
but the MSYS version of make (the one that should be used with the
"MSYS Makefiles" CMake generator that was the focus of the OP is
called make.exe.  mingw32-make.exe is very different than make.exe.
make.exe uses the MSYS bash shell.  I am not sure what
mingw32-make.exe does, but it has no access to a shell at all. So I
would be very surprised if renaming mingw32-make.exe as make.exe helps
the OP get the bootstrap method to work.

I haven't looked in detail, but if the assumption is correct that the
bootstrap command is a shell script, then the MSYS bash shell is the
only possibility for executing that script under MinGW/MSYS. Thus, the
OP should put $install_prefix/MinGW/msys/1.0/bin (the absolute
location of all MSYS executables including bash.exe and make.exe)
first on his MSYS bash PATH.  That should cure the "make not found"
message above using the correct MSYS make, and in light of other's
comments in this thread that the bootstrap method just works under
MinGW/MSYS, that change to the PATH may be all that is necessary.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list