fail to build LLVM GCC front-end

I try to build it on Ubuntu9.04, but in vain. There are errors:



make[3]: *** No rule to make target /home/username/llvm-2.7/Debug/include/llvm/Intrinsics.gen', needed by llvm-convert.o’. Stop.
make[3]: Leaving directory /home/username/obj/gcc' make[2]: *** [all-stage1-gcc] Error 2 make[2]: Leaving directory /home/username/obj’
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory /home/username/obj' make: *** [all] Error 2 make[1]: Entering directory /home/username/obj’
/bin/sh …/llvm-gcc/mkinstalldirs /home/username/obj/…/install /home/username/obj/…/install
cd: 5: can’t cd to ./fixincludes
make[1]: *** [install-fixincludes] Error 2
make[1]: Leaving directory `/home/username/obj’
make: *** [install] Error 2

where I went wrong?

How did you try building it?

-eric

I followed the instructions in llvm_gcc’s README.LLVM file, but not exactly the same.

the following is what I have done with LLVM:
./configure --disable-optimized --enable-checking
make
make install
(Successful)

now the llvm-gcc:
cd /home/username
mkdir obj
mkdir install
cd obj

…/llvm-gcc/configure --prefix=pwd/…/install --program-prefix=llvm- --enable-llvm=/home/username/llvm-2.7/Debug --enable-languages=c,c++

make LLVM_VERSION_INFO=2.7
make install

the mentioned-above errors occured here.
Is something wrong?

I followed the instructions in llvm_gcc's README.LLVM file, but not exactly
the same.

the following is what I have done with LLVM:
./configure --disable-optimized --enable-checking
make
make install
(Successful)

now the llvm-gcc:
cd /home/username
mkdir obj
mkdir install
cd obj

../llvm-gcc/configure --prefix=`pwd`/../install --program-prefix=llvm-
--enable-llvm=/home/username/llvm-2.7/Debug --enable-languages=c,c++

should be:
--enable-llvm=/home/username/llvm-2.7

Hi Jiandong Wang,

I followed the instructions in llvm_gcc's README.LLVM file, but not
exactly the same.

the following is what I have done with LLVM:
./configure --disable-optimized --enable-checking

in which directory did you do this?

../llvm-gcc/configure --prefix=`pwd`/../install --program-prefix=llvm-
--enable-llvm=/home/username/llvm-2.7/Debug --enable-languages=c,c++

You should pass the directory you ran LLVM configure in to --enable-llvm

make LLVM_VERSION_INFO=2.7
make install

make LLVM_VERSION_INFO=2.7 install

Ciao,

Duncan.

Thank you for timely replies. With your tips, I rebuilt llvm-gcc and it eventually works. Special thanks due Lenharth and baldrick. Thanks Christopher as well.