2011-12-07 6 views
0

私のマシンでllvm 3.0を入手しようとしていましたが、make -kを実行すると次のエラーが発生します。エラービルドllvm 3.0

[email protected]:~/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. は./configure
  4. は-k
を作るフォルダに解凍しました

この場合、最初のエラーで停止するように 'make'を指定しましたが、私はllvm-gcc 4.2を自分のマシンにインストールしています。

私は今日の家のマシンで同じ手順を踏襲し、llvm-3.0は正常に構築されました!ここで何が欠落しているかもしれないと思いますか?

+0

私はLLVMメーリングリスト、IRC、フォーラムで質問します。 –

答えて

7

CC=gcc CXX=g++で設定します。 configureスクリプトが実際にC++コードをコンパイルするために正しく設定されていないclangのバージョンを見つけているようです。

+0

ありがとう@servn、問題を修正しました! –

+0

可能であれば、あなたのPATH変数からclang、clang ++を削除してください(もしあれば)。それは自動的にgcc/g ++を選ぶべきです – sdkie

関連する問題