[LLVMdev] trying to compile llvm+clang on CentOS 5

Albert Vilella avilella at gmail.com
Sun Jul 7 02:21:43 PDT 2013


I am trying to have llvm and clang on a centOS 5 without root permissions.
I tried to do it downloading llvm and clang src packages and trying the
ususal configure, make and make install steps as such:

wget http://llvm.org/releases/3.3/llvm-3.3.src.tar.gz
wget http://llvm.org/releases/3.3/cfe-3.3.src.tar.gz
tar xzf llvm-3.3.src.tar.gz && cd llvm-3.3.src/tools/ && tar xzf
../../cfe-3.3.src.tar.gz

I tried with a newer version of gcc compiled for this 64bit CentOS system,
because the older version wouldn't work (see below). When I try it with the
newer version, I get this:

export LD_LIBRARY_PATH=/home/avilella/src/gcc/gcc-4.7.2/lib64:/home/avilella/src/gcc/gcc-4.7.2/lib
export CC=/home/avilella/src/gcc/gcc-4.7.2/bin/gcc
export CXX=/home/avilella/src/gcc/gcc-4.7.2/bin/g++
export PATH=/home/avilella/src/python/python-2.7.3/bin:$PATH
cd ~/src/llvm/latest/llvm-3.3.src
./configure --prefix=/home/avilella/src/llvm/latest/llvm && make clean
&& make -j8 && make install

After these steps, I don't see clang in the bin directory:

/home/avilella/src/llvm/latest/llvm/bin

So I followed the instructions in the clang directory, and ran make -j8 on
it:

cd ~/src/llvm/latest/llvm-3.3.src/tools/cfe-3.3.src
make -j8

Doing so, I get this clange/Config/config.h error:

[...]
InitHeaderSearch.cpp:17:51: fatal error: clang/Config/config.h: No
such file or directory
[...]

This is mentioned in a bug report from 2011, which I would be solved by now:

http://llvm.org/bugs/show_bug.cgi?id=11903
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130707/0f88c478/attachment.html>


More information about the llvm-dev mailing list