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

John Poole jlpoole56 at gmail.com
Tue Aug 14 19:56:53 EDT 2012


I will not be at my windows machine for several day where I've been trying
cmake in MinGW; but I think I had the same problem you have run into.  I
think the path construction is very sensitive, have your tried
"/c/MinGW/bin/gcc.exe" or "/c:/MinGW/bin/gcc.exe"

On Tue, Aug 14, 2012 at 6:17 AM, LM <lmemsm at gmail.com> wrote:

> I built and used cmake on DeLi Linux with no issues, but every time I
> try it on Windows, I seem to have problems.  My latest attempt, I just
> downloaded version 2.8.9.  I'm using mingw (gcc 4.6.2) and msys.  From
> within msys, I tried running ./bootstrap --system-libs --system-zlib
> --system-bzip2 --system-libarchive --system-curl --no-qt-gui
> --prefix=/usr/local --docdir=/usr/local/share/doc/CMake
> --mandir=/usr/local/share/man --verbose
> It errors out with:
>
> make: `cmake' is up to date.
> loading initial cache file
>
> C:/mingw/msys/home/lm/bld/src/cmake/mingw/tmp/cmake-2.8.9/Bootstrap.cmk/InitialCacheFlags.cmake
> -- The C compiler identification is GNU 4.6.2
> -- The CXX compiler identification is GNU 4.6.2
> -- Check for working C compiler: c:/MinGW/bin/gcc.exe
> -- Check for working C compiler: c:/MinGW/bin/gcc.exe -- broken
> CMake Error at Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
>   The C compiler "c:/MinGW/bin/gcc.exe" is not able to compile a simple
> test
>   program.
>
>   It fails with the following output:
>
>    Change Dir: C:/MinGW/msys/home/lm/bld/src/cmake/mingw/tmp/cmake-2.8.9/
> CMakeFiles/CMakeTmp
>
>   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
>
>   make: *** [cmTryCompileExec2155929314/fast] Error 127
>
>   CMake will not be able to correctly generate this project.
> Call Stack (most recent call first):
>   CMakeLists.txt:14 (PROJECT)
>
> -- Configuring incomplete, errors occurred!
> ---------------------------------------------
> Error when bootstrapping CMake:
> Problem while running initial CMake
> ---------------------------------------------
>
> My path is set to:
> PATH=/usr/local/bin:/mingw/bin:/opt/perl/bin:/bin:/usr/bin:/c/util
>
> I have the msys version of make at /bin/make.exe and my compiler is at
> /mingw/bin/gcc.exe
>
> I tried searching on the web and the cmake mailing list for
> instructions to build cmake with mingw and msys, but nothing I found
> shed any light on fixing this issue.  (I also tried running
> ./bootstrap without the extra configuration switches.  Same problem.)
> What are the appropriate steps to get cmake to build using msys?  Is
> there anything I can do to prevent the error during building?  Any
> help in getting this to build properly would be greatly appreciated.
> Thanks.
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
John L. Poole

P.O. Box 6566
Napa, CA 94581-6566
707-812-1323

jlpoole56 at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120814/0df5f350/attachment-0001.htm>


More information about the CMake mailing list