MantisBT - CMake
View Issue Details
0012418CMakeCMakeSetuppublic2011-08-24 05:442012-02-06 06:07
a123b 
Brad King 
normalminoralways
closedfixed 
CMake 2.8.5 
CMake 2.8.6CMake 2.8.6 
0012418: make error when configuring cmake with MinGW/MSYS
$ configure
---------------------------------------------
CMake 2.8.5, Copyright 2000-2009 Kitware, Inc.
Found GNU toolchain
C compiler on this system is: gcc
C++ compiler on this system is: g++
Makefile processor on this system is: make
g++ is GNU compiler
g++ has STL in std:: namespace
g++ has ANSI streams
g++ has streams in std:: namespace
g++ has sstream
g++ has operator!=(string, char*)
g++ has stl iterator_traits
g++ has standard template allocator
g++ has allocator<>::rebind<>
g++ does not have non-standard allocator<>::max_size argument
g++ has stl containers supporting allocator objects
g++ has header cstddef
g++ requires template friends to use <>
g++ supports member templates
g++ does not have standard template specialization syntax
g++ has argument dependent lookup
g++ does not have struct stat with st_mtim member
g++ has ios::binary openmode
g++ has ANSI for scoping
---------------------------------------------
---------------------------------------------
Error when bootstrapping CMake:
Problem while running make
---------------------------------------------
Log of errors: /cmake-2.8.5/Bootstrap.cmk/cmake_bootstrap.log
---------------------------------------------
No tags attached.
log cmake_bootstrap.log (188,861) 2011-08-24 05:44
https://public.kitware.com/Bug/file/4017/cmake_bootstrap.log
Issue History
2011-08-24 05:44a123bNew Issue
2011-08-24 05:44a123bFile Added: cmake_bootstrap.log
2011-08-24 08:51David ColeNote Added: 0027264
2011-08-24 09:47a123bNote Added: 0027265
2011-08-24 10:26David ColeNote Added: 0027266
2011-08-25 08:23a123bNote Added: 0027270
2011-09-16 13:52sajtyNote Added: 0027437
2011-09-19 11:10David ColeAssigned To => Brad King
2011-09-19 11:10David ColeStatusnew => assigned
2011-09-19 11:11David ColeNote Added: 0027449
2011-09-19 11:11David ColeStatusassigned => resolved
2011-09-19 11:11David ColeFixed in Version => CMake 2.8.6
2011-09-19 11:11David ColeResolutionopen => fixed
2011-09-19 11:11David ColeTarget Version => CMake 2.8.6
2012-02-06 06:07David ColeNote Added: 0028510
2012-02-06 06:07David ColeStatusresolved => closed

Notes
(0027264)
David Cole   
2011-08-24 08:51   
The "configure" or "bootstrap" script only works from an MSYS shell. Are you running it from an MSYS shell when you get these results? Or just a normal Windows cmd prompt?
(0027265)
a123b   
2011-08-24 09:47   
I am running it from the MSYS shell.
(0027266)
David Cole   
2011-08-24 10:26   
Where did you get the CMake source tree from...?

And what version of MSYS/mingw/gcc are you using?

I cannot reproduce this problem on my own system.

I used the file http://cmake.org/files/v2.8/cmake-2.8.5.zip [^] as my CMake source tree.

I have an MSYS install from December 2010, which contains gcc 4.5.0.
(0027270)
a123b   
2011-08-25 08:23   
I could resolve the problem by reinstalling MinGW. There was a conflict between two different MinGW installations. After running both uninstallers, removing the C:/MinGW directory and installing the latest version of MinGW the bootstrap script finished successfully. But now there's anoter error when running make:

$ make
[ 0%] Built target cmsysEncodeExecutable
[ 0%] Built target cmsysProcessFwd9x
[ 5%] Built target cmsys
[ 5%] Built target cmsysTestDynload
[ 7%] Built target cmsys_c
[ 8%] Built target cmsysTestProcess
[ 8%] Built target cmsysTestSharedForward
[ 9%] Built target cmsysTestsC
[ 12%] Built target cmsysTestsCxx
[ 15%] Built target cmzlib
[ 31%] Built target cmcurl
[ 32%] Built target LIBCURL
[ 32%] Built target cmcompress
[ 34%] Built target cmbzip2
[ 34%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_read.c.obj
c:\MinGW\msys\1.0\cmake-2.8.5\Utilities\cmlibarchive\libarchive\archive_read.c:572:1: error: conflicting types for 'archive_read_data'
c:\MinGW\msys\1.0\cmake-2.8.5\Utilities\cmlibarchive\libarchive\archive.h:386:30: note: previous declaration of 'archive_read_data' was here
c:\MinGW\msys\1.0\cmake-2.8.5\Utilities\cmlibarchive\libarchive\archive_read.c:651:1: error: conflicting types for 'archive_read_data_into_buffer'
c:\MinGW\msys\1.0\cmake-2.8.5\Utilities\cmlibarchive\libarchive\archive.h:411:22: note: previous declaration of 'archive_read_data_into_buffer' was here
make[2]: *** [Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_read.c.obj] Error 1
make[1]: *** [Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/all] Error 2
make[1]: *** [all] Error 2
(0027437)
sajty   
2011-09-16 13:52   
I get the same archive_read_data error.
With mingw 4.5.2 it works, but mingw 4.6.1 fails with this error.
I have tested cmake 2.8.3 and 2.8.5.
Its not a regression in cmake.

Workaround: use older mingw.
(0027449)
David Cole   
2011-09-19 11:11   
Although it's not strictly speaking a regression in CMake... the following commit should fix this issue:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8dfe74c358c5c5b364341a5fda1a43281d5bcc97 [^]
(0028510)
David Cole   
2012-02-06 06:07   
Closing resolved issues that have not been updated in more than 4 months.