cmake的编译失败

cmake的编译失败,cmake,mingw,msys2,Cmake,Mingw,Msys2,当我试图从MinGW MSYS2系统上的源代码编译cmake2.8.12.2时,在运行sh bootstrap后,我遇到以下错误: make:没有规则使目标“/cygdrive/e/software/pkg/cmake-2.8.12.2/Source” /“cmStandardIncludes.o”所需的cmStandardIncludes.cxx”。停下来 我已经检查了源代码目录,找到了cmStandardIncludes.cxx。请在这方面提供帮助。谢谢 输出: E:\software\pk

当我试图从MinGW MSYS2系统上的源代码编译cmake2.8.12.2时,在运行sh bootstrap后,我遇到以下错误:

make:没有规则使目标“/cygdrive/e/software/pkg/cmake-2.8.12.2/Source” /“cmStandardIncludes.o”所需的cmStandardIncludes.cxx”。停下来

我已经检查了源代码目录,找到了cmStandardIncludes.cxx。请在这方面提供帮助。谢谢

输出:

E:\software\pkg\cmake-2.8.12.2>sh bootstrap
---------------------------------------------
CMake 2.8.12.2, Copyright 2000-2012 Kitware, Inc.
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++ does not have setenv
g++ does not have unsetenv
g++ has environ in stdlib.h
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++ has 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
---------------------------------------------
make: *** No rule to make target '/cygdrive/e/software/pkg/cmake-2.8.12.2/Source
/cmStandardIncludes.cxx', needed by 'cmStandardIncludes.o'.  Stop.
---------------------------------------------
Error when bootstrapping CMake:
Problem while running make
---------------------------------------------
Log of errors: /cygdrive/e/software/pkg/cmake-2.8.12.2/Bootstrap.cmk/cmake_boots
trap.log
---------------------------------------------
E:\software\pkg\cmake-2.8.12.2>sh引导
---------------------------------------------
CMake 2.8.12.2,版权所有2000-2012 Kitware,Inc。
这个系统上的C编译器是:gcc
这个系统的C++编译器是:G++
此系统上的Makefile处理器为:make
g++是GNU编译器
g++没有setenv
g++没有未设置的环境
g++在stdlib.h中有environ
g++在std::namespace中有STL
g++具有ANSI流
g++在std::namespace中有流
g++具有sstream
g++有操作符=(字符串,char*)
g++具有stl迭代器的特性
g++有标准的模板分配器
g++具有分配器::重新绑定
g++没有非标准的分配器::max_size参数
g++具有支持分配器对象的stl容器
g++具有头CSTDEF
g++需要模板朋友才能使用
g++支持成员模板
g++具有标准的模板专门化语法
g++具有依赖于参数的查找
g++没有包含st_mtim成员的struct stat
g++具有ios::二进制openmode
g++有ANSI的作用域
---------------------------------------------
make:**无规则生成target'/cygdrive/e/software/pkg/cmake-2.8.12.2/Source
/“cmStandardIncludes.o”所需的cmStandardIncludes.cxx”。停止
---------------------------------------------
引导CMake时出错:
运行make时出现问题
---------------------------------------------
错误日志:/cygdrive/e/software/pkg/cmake-2.8.12.2/Bootstrap.cmk/cmake_boots
trap.log
---------------------------------------------

如果您想使用MinGW编译器,我建议您使用MinGW shell提示符而不是cygwin。这可以确保正确设置多个MinGW编译器特定的环境变量

请注意,如果使用MSYS,则必须使用“MSYS Makefiles”生成器,而
make
程序应简单调用
make
(如果安装正确),而如果使用“MinGW Makefiles”作为生成器,则必须使用
mingw32 make
作为make程序


如果生成“MinGW makefile”并调用make,则会调用错误的make程序。明确指定mingw32 make

非常感谢您的建议。我将sh重命名为sh1,并使用MinGW Makefiles generatoor编译cmake。建造成功了。