2011-12-07 61 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++。它看起來像配置腳本找到一個實際上沒有正確設置編譯C++代碼的clang版本。

+0

謝謝@servn,解決了問題! –

+0

如果可能的話從PATH變量中刪除(如果有)clang,clang ++,那麼它應該自動選擇gcc/g ++ – sdkie