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

Doug douglas.linder at gmail.com
Wed Aug 15 21:05:03 EDT 2012


I have no idea if it'll help at all, but I've had issues before with
mingw where if you don't have '.' in your path (and you don't seem to)
you need to put the full command path at the shell prompt. ie.
make.exe instead of make.

This miiight be causing your issue, but if you can just type 'make'
and it runs, I would expect it to be fine.

Perhaps the mingw list has some suggestions...

~
Doug.

On Wed, Aug 15, 2012 at 11:36 PM, LM <lmemsm at gmail.com> wrote:
> 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.
> --
>
> 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


More information about the CMake mailing list