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

LM lmemsm at gmail.com
Wed Aug 15 11:36:11 EDT 2012


On Aug 14, Doug wrote:

>For what it's worth, it works for me?
>
>I'm using stock mingw on windows 7, with these settings:
>
>doug at Zed e:/lib/cmake
>$ which gcc
>/mingw/bin/gcc.exe
>
>doug at Zed e:/lib/cmake
>$ which make
>/usr/bin/make.exe
>
>doug at Zed e:/lib/cmake
>$ echo $PATH

...

>...and cmake bootstaps and builds without any issue.

Tried the exact same commands on my system and get the same responses
(except my path was as mentioned in the previous message).

>The only thing I can think of is, just to be sure: You're not using
the git-MSYS shell are you?

I don't have git on my system.

>Does automake work for you? Try building
>http://www.libpng.org/pub/png/libpng.html and make sure your build
>environment is sane...

I've built over 100 programs from source including libpng 1.5.10.  I
also just downloaded 1.5.12 now and tried building now.  They're all
building fine using regular gnu make or gnu configure/make style
commands.  Am attempting to script all the steps to build several
applications on my system (from source).  I was hoping to add some
applications that needed to be built with cmake.  However, I can't get
the steps to build cmake from scratch working.

Amine Chadly wrote:
>Isn't it a problem with the where it's looking for the compiler ?
>is c:/MinGW/bin/gcc.exe an equivalent of /mingw/bin/gcc.exe ?

>You can try to play around with a simple Makefile and setting the CC environment variable to see what are the correct values.

I tried the following command before running cmake's bootstrap.
export CC=gcc

I also tried
export CC=/mingw/bin/gcc.exe

Neither worked.  I get the same errors.  Is there another way to
change the path to my mingw compiler in the cmake build scripts?

Appreciate everyone's suggestions on this.  Thanks.  If anyone has any
other ideas, on how to get cmake to build successfully from source
with mingw and msys, I'd really like to hear them.


More information about the CMake mailing list