【问题标题】:Error building llvm 3.0构建 llvm 3.0 时出错
【发布时间】:2011-12-07 16:17:35
【问题描述】:

我试图在我的机器上安装 llvm 3.0,但是当我执行 make -k 时出现以下错误。

chethan@ubuntu:~/llvm-3.0$ make
make[1]: Entering directory `/home/chethan/llvm-3.0/lib/Support'
llvm[1]: Compiling APFloat.cpp for Release build
In file included from APFloat.cpp:15:
In file included from /home/chethan/llvm-3.0/include/llvm/ADT/APFloat.h:104:
In file included from /home/chethan/llvm-3.0/include/llvm/ADT/APInt.h:18:
In file included from /home/chethan/llvm-3.0/include/llvm/ADT/ArrayRef.h:13:
In file included from /home/chethan/llvm-3.0/include/llvm/ADT/SmallVector.h:17:
/home/chethan/llvm-3.0/include/llvm/Support/type_traits.h:20:10: fatal error: 'utility' file not found
#include <utility>
     ^
1 error generated.
make[1]: *** [/home/chethan/llvm-3.0/lib/Support/Release/APFloat.o] Error 1
make[1]: Leaving directory `/home/chethan/llvm-3.0/lib/Support'
make: *** [all] Error 1

我按照这些步骤在我的机器上构建 llvm。

  1. 从 llvm 下载页面获取 llvm 源 zip 文件并解压到文件夹 llvm-3.0
  2. cd /home/chethan/llvm-3.0
  3. ./配置
  4. make -k

虽然在这种情况下,我只是给出了“make”,以便它在第一个错误时停止。我的机器上安装了 llvm-gcc 4.2。

我今天早上在家里的机器上按照同样的步骤,llvm-3.0 构建成功!知道这里可能缺少什么吗?

【问题讨论】:

  • 我会在 LLVM 邮件列表、IRC 或论坛上问这个问题。

标签: llvm


【解决方案1】:

使用CC=gcc CXX=g++ 进行配置。看起来配置脚本正在寻找一个实际上没有正确设置来编译 C++ 代码的 clang 版本。

【讨论】:

  • 感谢@servn,解决了问题!
  • 如果可能的话,从你的 PATH 变量中移除(如果有的话)clang、clang++,那么它应该会自动选择 gcc/g++
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-07-31
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多