Chethan Ravindranath
Chethan Ravindranath

Reputation: 2051

Error building llvm 3.0

I was trying to get llvm 3.0 on my machine, but I get the following errors when I give 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

I follow these steps to build llvm on my machine.

  1. Get the llvm source zip file from llvm download page and unzipped to folder llvm-3.0
  2. cd /home/chethan/llvm-3.0
  3. ./configure
  4. make -k

Although in this case, I just gave 'make' so that it stops on first error. I have llvm-gcc 4.2 installed on my machine.

I followed the same steps today morning in my home machine, and llvm-3.0 built successfully! Any idea what might be missing here?

Upvotes: 1

Views: 2339

Answers (1)

servn
servn

Reputation: 3069

configure with CC=gcc CXX=g++. It looks like the configure script is finding a version of clang that isn't actually set up correctly to compile C++ code.

Upvotes: 7

Related Questions