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

David Cole david.cole at kitware.com
Thu Aug 16 12:05:43 EDT 2012


On Thu, Aug 16, 2012 at 11:42 AM, Alan W. Irwin
<irwin at beluga.phys.uvic.ca>wrote:

> 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
> __________________________
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/**
> opensource/opensource.html<http://www.kitware.com/opensource/opensource.html>
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/**CMake_FAQ<http://www.cmake.org/Wiki/CMake_FAQ>
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/**listinfo/cmake<http://www.cmake.org/mailman/listinfo/cmake>
>


One additional point of information / recommendation:

Look at the CMake BootstrapTest results on the nightly CMake dashboard.

The CMake "BootstrapTest" runs every night on every one of our dashboard
machines that is capable of executing "./bootstrap". You can see last
night's test results for this test here:


http://open.cdash.org/testSummary.php?project=1&name=BootstrapTest&date=2012-08-16

(Or for any night in the database by substituting the appropriate date
value in the URL...)

As you can see from that page, we run the test on over 50 machines. Two of
which, dash22 and amber12 are running it with the "MSYS Makefiles"
generator. You can analyze the scripts we use to drive those dashboards to
see what environment settings might be in there to facilitate getting it
working. Those scripts are here:

  http://open.cdash.org/viewNotes.php?buildid=2518478
    in which we see only: set(ENV{PATH}
"C:\\msys\\1.0\\bin;C:\\MinGW\\bin;$ENV{PATH}")

and here:

  http://open.cdash.org/viewNotes.php?buildid=2518539
    in which we see nothing about ENV, so MSYS stuff is probably in the
PATH already on dash22

Those machines have relatively recent, but infrequently updated MSYS/mingw
environments. So... they may not always reflect what's needed for a current
MSYS env if *they* change something, but they're a good resource and place
to look to see what is thought to be necessary to bootstrap CMake with any
given platform.


Cheers,
David C.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120816/5dd7467f/attachment.htm>


More information about the CMake mailing list