错误是什么" CMAKE_BOOTSTRAP_BINARY_DIR"从源代码构建CMake的时间

时间:2015-04-29 03:31:38

标签: build cmake

错误是什么" CMAKE_BOOTSTRAP_BINARY_DIR"。如何从源代码构建cmake。

环境:

繁殖:

git clone git@github.com:Kitware/CMake.git
cd CMake
git checkout v3.2.2
./bootstrap

错误(在./bootstrap):

---------------------------------------------
g++  -I/home/usagi/repos/CMake/Bootstrap.cmk -I/home/usagi/repos/CMake/Source   -I/home/usagi/repos/CMake/Bootstrap.cmk -c /home/usagi/repos/CMake/Source/cmSystemTools.cxx -o cmSystemTools.o
/home/usagi/repos/CMake/Source/cmSystemTools.cxx: In static member function ‘static void cmSystemTools::FindCMakeResources(const char*)’:
/home/usagi/repos/CMake/Source/cmSystemTools.cxx:2195:13: error: ‘CMAKE_BOOTSTRAP_BINARY_DIR’ was not declared in this scope
   exe_dir = CMAKE_BOOTSTRAP_BINARY_DIR "/bin";
             ^
/home/usagi/repos/CMake/Source/cmSystemTools.cxx:2249:28: error: ‘CMAKE_BOOTSTRAP_SOURCE_DIR’ was not declared in this scope
   cmSystemToolsCMakeRoot = CMAKE_BOOTSTRAP_SOURCE_DIR;
                            ^
Makefile:88: recipe for target 'cmSystemTools.o' failed
make: *** [cmSystemTools.o] Error 1
---------------------------------------------
Error when bootstrapping CMake:
Problem while running make

注意:

  • " /家庭/兔子/回购"是我帐户中的存储库池目录。(" usagi"是我在此系统中的用户名。)

2 个答案:

答案 0 :(得分:2)

我在午餐时间尝试了解决方案。

解决方案:

rm *
git checkout -f

./configure # In the environment, it is not require "./bootstrap".

make

"自举./"在这种环境下不需要。

答案 1 :(得分:-1)

我在mac中遇到了同样的问题并花了很多时间, 这是最好的下载cmake dmg来自:

https://cmake.org/download/ (并且只在路径中添加了cmake)

它运行得很好。

我发现了一些关于cmake

中的错误的额外信息

https://cmake.org/pipermail/cmake-commits/2014-June/019853.html

最好的, 我