【发布时间】:2013-05-18 10:44:58
【问题描述】:
我正在尝试使用 CMAKE 在 Windows 7 上构建 Clang。
我已经执行了以下步骤;在this guide 中指定。该指南在一个方面是错误的:Python is 是必需的,没有它,cmake 会返回错误。我假设由于 cmake 支持 Visual Studio 11,并且我没有安装 VS10,因此可以用一个代替另一个。这样做会产生我看到的错误似乎不合理。
我已经使用来自this page 的 Windows x86 安装程序安装了带有所有默认选项的 Python 3.3。
安装 Python 3.3 并在路径上,cmake -G "Visual Studio 11" ..\llvm 返回以下错误:
D:\Code\build>cmake -G "Visual Studio 11" ..\llvm
<snip>
-- Found PythonInterp: C:/Python33/python.exe (found version "3.3.2")
-- Constructing LLVMBuild project information
CMake Error at CMakeLists.txt:308 (message):
Unexpected failure executing llvm-build: Traceback (most recent call last):
File "D:/Code/llvm/utils/llvm-build/llvm-build", line 3, in <module>
import llvmbuild
File "D:\Code\llvm\utils\llvm-build\llvmbuild\__init__.py", line 1, in <module>
from main import main
ImportError: No module named 'main'
-- Configuring incomplete, errors occurred!
D:\Code\build>
什么?这是否表明 python 2.x 和 python 3.x 之间存在兼容性问题,或者其他什么?我找不到任何明确的信息表明 cmake 是否支持 python 3.x,但我也找不到任何说它不支持的信息。如果可能的话,我宁愿不要在我的机器上安装两个不兼容的 python 版本。
编辑:啊。似乎this question 提出了同样的问题,并且似乎表明不支持 python 3.x。如果实验证明了这一点,我会将其作为答案发布。哦!
【问题讨论】:
-
我不会在lazyweb上询问,而是检查错误报告。我确定已经有 Python 3 支持的功能请求。
-
有一对夫妇以一种迟钝的方式指出了这一点,但没有什么明显的。无论如何,我猜这就是问题所在。因为我碰巧知道 python 2.x 和 python 3.x 不兼容;没有理由假设普通新手会这样做。真正的问题是“这个错误信息是什么意思?” - 因为它没有说明实际问题是什么 - 与开源项目一样。