llvm-gcc4.2-2.4 build failure in /gcc/java/lang.c

Hi, every body,

I get stuck when trying to build llvm-gcc4.2-2.4 on x86_64 Linux with GCC-4.3.3. I meet this error:

make[3]: Entering directory `/home/wangtielei/TOOLS/llvm/llvm-gcc-obj/gcc'
/home/wangtielei/TOOLS/llvm/llvm-gcc-obj/./prev-gcc/xgcc -B/home/wangtielei/TOOLS/llvm/llvm-gcc-obj/./prev-gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -DHAVE_CONFIG_H -I. -Ijava -I../../llvm-gcc4.2-2.4.source/gcc -I../../llvm-gcc4.2-2.4.source/gcc/java -I../../llvm-gcc4.2-2.4.source/gcc/../include -I../../llvm-gcc4.2-2.4.source/gcc/../libcpp/include -I../../llvm-gcc4.2-2.4.source/gcc/../libdecnumber -I../libdecnumber -I/home/wangtielei/TOOLS/llvm/llvm-obj//include -I/home/wangtielei/TOOLS/llvm/llvm-2.4/include -DENABLE_LLVM -I/home/wangtielei/TOOLS/llvm/llvm-obj/../llvm-2.4/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS ../../llvm-gcc4.2-2.4.source/gcc/java/lang.c -o java/lang.o
../../llvm-gcc4.2-2.4.source/gcc/java/lang.c: In function ‘java_init’:
../../llvm-gcc4.2-2.4.source/gcc/java/lang.c:378: error: ‘force_align_functions_log’ undeclared (first use in this function)
../../llvm-gcc4.2-2.4.source/gcc/java/lang.c:378: error: (Each undeclared identifier is reported only once
../../llvm-gcc4.2-2.4.source/gcc/java/lang.c:378: error: for each function it appears in.)
make[3]: *** [java/lang.o] Error 1
make[3]: Leaving directory `/home/wangtielei/TOOLS/llvm/llvm-gcc-obj/gcc'
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory `/home/wangtielei/TOOLS/llvm/llvm-gcc-obj'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/home/wangtielei/TOOLS/llvm/llvm-gcc-obj'
make: *** [all] Error 2

Anybody can help me?

Make sure to follow the README.LLVM file in the llvm-gcc distro. llvm-gcc doesn't support gcj yet at all.

-Chris

I did follow the README.LLVM.

I configure like:
../llvm-gcc4.2-2.4.source/configure --program-prefix=llvm- --enable-llvm=/home/wangtielei/TOOLS/llvm/llvm-obj/ --enable-language=c,c++ --disable-jit --disable-multilib

The error information is
/home/wangtielei/TOOLS/llvm/llvm-gcc-obj/./prev-gcc/xgcc -B/home/wangtielei/TOOLS/llvm/llvm-gcc-obj/./prev-gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -DHAVE_CONFIG_H -I. -Ijava -I../../llvm-gcc4.2-2.4.source/gcc -I../../llvm-gcc4.2-2.4.source/gcc/java -I../../llvm-gcc4.2-2.4.source/gcc/../include -I../../llvm-gcc4.2-2.4.source/gcc/../libcpp/include -I../../llvm-gcc4.2-2.4.source/gcc/../libdecnumber -I../libdecnumber -I/home/wangtielei/TOOLS/llvm/llvm-obj//include -I/home/wangtielei/TOOLS/llvm/llvm-2.4/include -DENABLE_LLVM -I/home/wangtielei/TOOLS/llvm/llvm-obj/../llvm-2.4/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS ../../llvm-gcc4.2-2.4.source/gcc/java/lang.c -o java/lang.o
../../llvm-gcc4.2-2.4.source/gcc/java/lang.c: In function ‘java_init’:
../../llvm-gcc4.2-2.4.source/gcc/java/lang.c:378: error: ‘force_align_functions_log’ undeclared (first use in this function)

But I do not understand why xgcc is invoked to compile java.c file.

Could you give me more hints?

Chris Lattner wrote:

Typo? It is --enable-languages, not --enable-language

Best regards,
--Edwin

I did follow the README.LLVM.

No, you didn't

I configure like:
../llvm-gcc4.2-2.4.source/configure --program-prefix=llvm-
--enable-llvm=/home/wangtielei/TOOLS/llvm/llvm-obj/
--enable-language=c,c++ --disable-jit --disable-multilib

Note: "languages", not "language"