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

Alan W. Irwin irwin at beluga.phys.uvic.ca
Thu Aug 16 11:42:04 EDT 2012


On 2012-08-16 09:32-0400 Bill Hoffman wrote:

> On 8/16/2012 1:47 AM, Alan W. Irwin wrote:
>> 
>> 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:
> OK, I was wrong... If we look at the error message closer, we can see he does 
> have make.exe.  In fact, the bootstrap cmake builds.  When it tries to use 
> that bootstrapped cmake is when it fails.  The output is here:
>
>
>
> Run Build Command:C:/MinGW/msys/bin/make.exe
>  "cmTryCompileExec2155929314/fast"
>
>  make -f CMakeFiles/cmTryCompileExec2155929314.dir/build.make
>  CMakeFiles/cmTryCompileExec2155929314.dir/build
>
>    make: make: Command not found
>
>
> So, that tells me something goes wrong with the PATH maybe.
>
> It runs C:/MinGW/msys/bin/make.exe
>
> Then inside the cmake generated makefile it does this:
>
> $(MAKE) -f somemakefile
>
> At this point MAKE= make, and make is not found.
>
> You should be able to reproduce this with a simple makefile setup like this:
>
> -----Makefile-----
> foo:
>      $(MAKE) -f foo.make
>
> ----foo.make----
> all:
>      echo "foo bar"
>
> So, the C:/MinGW/msys/bin/make.exe make is setting MAKE to be make.  You 
> don't perhaps have an environment variable MAKE set to make do you?  Is 
> C:/MinGW/msys/bin/ in your PATH?
>
> You could also try a makefile like this:
> all:
>     echo $(PATH)
>     echo $(MAKE)
>

@LM (the original poster).  I think Bill has given you excellent PATH
advice and additional experiments to try here, and I am looking
forward to your response to his post.

I am not in a position to do MinGW/MSYS experiments on the Wine
platform at the moment, but once that is possible (should be a couple
of weeks from now) I will attempt to confirm on that platform that the
bootstrap method of building CMake works for MinGW/MSYS provided that
the correct PATH to the MSYS version of make.exe is set.

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