生成llvm 3.0时出错
我试图在我的机器上获得LLVM3.0,但是当我给出make-k时,我得到了以下错误生成llvm 3.0时出错,llvm,Llvm,我试图在我的机器上获得LLVM3.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 /h
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
chethan@ubuntu:~/llvm-3.0$make
make[1]:输入目录“/home/chethan/llvm-3.0/lib/Support”
llvm[1]:为发布版本编译APFloat.cpp
在APFloat.cpp中包含的文件中:15:
在/home/chethan/llvm-3.0/include/llvm/ADT/APFloat.h:104中包含的文件中:
在/home/chethan/llvm-3.0/include/llvm/ADT/APInt.h中包含的文件中:18:
在/home/chethan/llvm-3.0/include/llvm/ADT/ArrayRef.h中包含的文件中:13:
在/home/chethan/llvm-3.0/include/llvm/ADT/SmallVector.h:17中包含的文件中:
/home/chethan/llvm-3.0/include/llvm/Support/type_traits.h:20:10:致命错误:未找到“实用工具”文件
#包括
^
生成1个错误。
make[1]:***[/home/chethan/llvm-3.0/lib/Support/Release/APFloat.o]错误1
make[1]:离开目录“/home/chethan/llvm-3.0/lib/Support”
make:**[all]错误1
我按照以下步骤在我的机器上构建llvm
今天早上,我在家里的机器上执行了相同的步骤,llvm-3.0构建成功!知道这里可能缺少什么吗?使用
CC=gcc-CXX=g++
进行配置。看起来配置脚本正在寻找一个版本,实际上没有正确编译C++代码。< /P>我会问LLVM邮件列表、IrC或论坛上的问题。谢谢@ Servn,解决了这个问题!如果可能的话,从PATH变量中删除(如果有的话)clang,clang++,然后它会自动选择gcc/g++