0

I ran ./configure, but when I try to make llvm, I get the following error:

[  0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/APFloat.cpp.o
In file included from /opt/static_analysis/llvm/include/llvm/Support/SwapByteOrder.h:19:0,
             from /opt/static_analysis/llvm/include/llvm/Support/MathExtras.h:18,
             from /opt/static_analysis/llvm/include/llvm/ADT/SmallVector.h:20,
             from /opt/static_analysis/llvm/include/llvm/ADT/ArrayRef.h:14,
             from /opt/static_analysis/llvm/include/llvm/ADT/APInt.h:19,
             from /opt/static_analysis/llvm/include/llvm/ADT/APFloat.h:20,
             from /opt/static_analysis/llvm/lib/Support/APFloat.cpp:15:
/opt/static_analysis/build/include/llvm/Support/DataTypes.h:77:3: error: #error "Don't have a definition for uint64_t on this platform"
# error "Don't have a definition for uint64_t on this platform"
^make[2]: \*** [lib/Support/CMakeFiles/LLVMSupport.dir/APFloat.cpp.o] Error 1
make[1]: \*** [lib/Support/CMakeFiles/LLVMSupport.dir/all] Error 2
make: \*** [all] Error 2

P.S. I tried installing it by following these instructions - Getting Started: Building and Running Clang

pl_rock
  • 11,715

2 Answers2

0

I had the same problem and it was solved by installing a newer version of gcc, which is basically an answer in this thread: How do I use the latest GCC on Ubuntu?

I guess a newer version of Ubuntu (15) automatically solves this problem because the default gcc there is 4.9 already.

a_m
  • 116
0

I had the same problem, I fixed it by clearing the CMake cache. Just delete CMakeCache.txt and try running make again. CMakeCache.txt should be in the same directory you're trying to execute the CMake command in.

Adam
  • 271