[LLVMdev] problem building gcc4 front end on fedora core 5

Reid Spencer rspencer at reidspencer.com
Sun Dec 3 07:59:28 PST 2006


Hi Ram,

On Sun, 2006-12-03 at 05:20 -0800, Ram Bhamidipaty wrote:
> I'm getting a build error when trying to build gcc4 from sources. This is
> for the recent 1.9 release.
> 
> How I built llvm-1.9:
> -----------------------------
> tar zxf llvm-1.9.tar.gz
> cd llvm-1.9/
> ./configure --prefix=/custom/llvm-1.9
> make ENABLE_OPTIMIZED=1 OPTIMIZE_OPTION='-O2' tools-only
> make install

Looks good.

> 
> How I built gcc4:
> -----------------------------
> export PATH=/custom/llvm-1.9/bin:.../llvm-1.9/Release/bin:$PATH

Note that you're putting both the built and the installed executables in
the path here. Probably isn't a problem, but not many of us do that.

> tar zxf llvm-gcc4-1.9.source.tar.gz
> mkdir llvm-gcc4-1.9.build
> cd llvm-gcc4-1.9.build
> 
> ../llvm-gcc4-1.9.source/configure --prefix=/custom/llvm-1.9-gcc4
> --enable-languages=c,c++ --enable-checking --with-llvm=...../llvm-1.9
> --disable-threads --program-prefix=llvm-

Try --disable-shared. Sometimes linking the wrong libgcc.so or libstdc
++.so can produce the error you got below.

> 
> make
> 
> -------------------
> 
> This results in the following error:
> 
> /bulk/src/LLVM/llvm-gcc-build/gcc/xgcc
> -B/bulk/src/LLVM/llvm-gcc-build/gcc/
> -B/custom/llvm-1.9-gcc4/i686-pc-linux-gnu/bin/
> -B/custom/llvm-1.9-gcc4/i686-pc-linux-gnu/lib/ -isystem
> /custom/llvm-1.9-gcc4/i686-pc-linux-gnu/include -isystem
> /custom/llvm-1.9-gcc4/i686-pc-linux-gnu/sys-include -O2  -DIN_GCC
> -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
> -Wold-style-definition  -isystem ./include  -fPIC -g  -DIN_LIBGCC2
> -D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I../../llvm-gcc4-1.9.source/gcc
> -I../../llvm-gcc4-1.9.source/gcc/.
> -I../../llvm-gcc4-1.9.source/gcc/../include
> -I../../llvm-gcc4-1.9.source/gcc/../libcpp/include  -DL_mulvdi3
> -fvisibility=hidden -DHIDE_EXPORTS -c
> ../../llvm-gcc4-1.9.source/gcc/libgcc2.c -o libgcc/./_mulvdi3.o
> ../../llvm-gcc4-1.9.source/gcc/libgcc2.c:403: internal compiler error:
> in prune_unused_types_update_strings, at dwarf2out.c:14372

Not sure what the problem is but this is failing very early. mulvdi3.o
is one of the first things built in the libgcc library. The xgcc
compiler is really llvm-gcc4. We won't be able to do much on this
without a backtrace. To get one, please do the following:

1. Run the xgcc command above with the -v option.
2. Capture the cc1 command options that xgcc spawns. 
3. gdb the cc1 and run it with the options captured in step 2
4. When it fails, type "where" and capture the output
5. Open a bug report at http://llvm.org/bugs/ and attach this message
and the backtrace.

Reid.

> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://llvm.org/bugs> for instructions.
> make[2]: *** [libgcc/./_mulvdi3.o] Error 1
> make[2]: Leaving directory `/bulk/src/LLVM/llvm-gcc-build/gcc'
> make[1]: *** [libgcc.a] Error 2
> make[1]: Leaving directory `/bulk/src/LLVM/llvm-gcc-build/gcc'
> make: *** [all-gcc] Error 2
> 
> 
> ----------------------
> 
> Can anyone suggest some things I can do to figure out the source of the
> problem?
> 
> Thanks for any info.
> -Ram
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list