[LLVMdev] compiling llvm-gcc4 on ubuntu

Reid Spencer rspencer at reidspencer.com
Thu Mar 1 14:49:32 PST 2007


Hi Stefan,

On Thu, 2007-03-01 at 23:26 +0100, Stefan Weigert wrote:
> hello,
> 
> i am new to llvm and can't manage to compile the gcc backend.

Okay. Did you read: http://llvm.org/docs/GettingStartedGuide.html ?

> 
> my steps:
> i compile the llvm-source first as suggested in "README.LLVM"
> that works fine and without any issues.

Okay.

> 
> then i make a new dir called build. from there i do the following:
> 
> stefan at ubuntu:~/programs/llvm/build$ ../llvm-gcc4-1.9.source/configure --enable-languages=c,c++ --prefix=/usr/local/ --disable-shared

A few issues here:
     1. This looks like the 1.9 version of llvm-gcc. Is your LLVM also
        the 1.9 version? If not, it definitely won't work (llvm-gcc4 and
        llvm must stay closely in sync).
     2. This configure line is not correct for llvm-gcc4. At the very
        least you need --enable-llvm=/path/to/llvm/build/root. You might
        also consider --disable-nls if you don't care about national
        language support (makes build faster). Finally, if you built
        llvm debug (the default if you checked it out from CVS), then
        you should also have --enable-checking (to build llvm-gcc debug
        as well).

> then after some time i get the follwing error:

I think you also did "make"

> 
> make[2]: Entering directory '/home/stefan/programs/llvm/build/gcc'
> /home/stefan/programs/llvm/build/gcc/xgcc -B/home/stefan/programs/llvm/build/gcc/ -B/usr/local//i686-pc-linux-gnu/bin/ -B/usr/local//i686-pc-linux-gnu/lib/ -isystem /usr/local//i686-pc-linux-gnu/include -isystem /usr/local//i686-pc-linux-gnu/sys-include -O2  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -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 -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
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://llvm.org/bugs> for instructions.

I'm not sure what this is about. Likely its related to one of the issues
above.

> make[2]: *** [libgcc/./_mulvdi3.o] Error 1
> make[2]: Leaving directory '/home/stefan/programs/llvm/build/gcc'
> make[1]: *** [libgcc.a] Error 2
> make[1]: Leaving directory '/home/stefan/programs/llvm/build/gcc'
> make: *** [all-gcc] Error 2
> 
> if you need more information - just ask me :)

Versions, platform, etc. of everything would help.

Reid.

> 
> 
> thanks a lot for your help.
> _______________________________________________
> 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