【问题标题】:CMake Error: File /cygdrive/.../src/LLVMBuild.txt does not existCMake 错误:文件 /cygdrive/.../src/LLVMBuild.txt 不存在
【发布时间】:2015-09-15 03:10:14
【问题描述】:

我正在尝试按照here 的说明在 Windows7 上构建cling

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=[Install Path] ..\src
cmake --build . --config [Release/Debug] --target cling

我注意到编译器 cmake 正在使用 Visual Studio 12 2013(使用 cmake-gui 或在 cmdline 中),而我收到以下错误 (full traceback is here):

Constructing LLVMBuild project information
CMake Error: File /cygdrive/e/ABOUT-C++/cling/src/LLVMBuild.txt does not exist.
CMake Error at E:/ABOUT-C++/cling/build/LLVMBuild.cmake:28 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:431 (include)


CMake Error: File /cygdrive/e/ABOUT-C++/cling/src/bindings/LLVMBuild.txt does not exist.
CMake Error at E:/ABOUT-C++/cling/build/LLVMBuild.cmake:30 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:431 (include)

为什么路径的前缀是/cygdrive/e/... 而不是E:/...?这些是有效的路径吗? (cmake 提到的缺失文件确实存在于相应的文件夹中!)

还是因为llvm / clang / cling应该在windows上用cygwin构建,而我默认使用的编译器vc12不正确?

【问题讨论】:

    标签: windows cmake cygwin llvm cling


    【解决方案1】:

    我敢打赌,你的问题在于你的 python。从D:/cygwin/bin/python2.7.exe 来看,您似乎使用了特殊版本的python,它在所有地方都添加了/cygdrive/

    尝试使用官方binary package for Windows

    【讨论】:

    • 没错!你通常是如何通过经验来判断的?检查上面出现CMake Error 的最近行?
    • 我已经克隆了 CERN 的 llvm 分支,git diffed master 分支和cling-patches,发现LLVMBuild.txt 文件、utils/llvm-build 工具及其 CMake 包装器没有任何变化.由此我得出结论,问题出在您的设置上,通读 CMake 日志并发现 Found PythonInterp: D:/cygwin/bin/python2.7.exe 行。
    • 问题解决了吗?如果是,请将帖子标记为解决方案。如果没有,请添加详细信息。
    • @arrowd 感谢您的帮助! cmake 问题终于解决了,但是现在在 windows 上构建 clang 和 cling 并不是一个好主意...参见:github.com/vgvassilev/cling/issues/73
    猜你喜欢
    • 2016-04-20
    • 1970-01-01
    • 2017-12-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多