Ram Bhamidipaty
2006-Dec-03 13:20 UTC
[LLVMdev] problem building gcc4 front end on fedora core 5
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 How I built gcc4: ----------------------------- export PATH=/custom/llvm-1.9/bin:.../llvm-1.9/Release/bin:$PATH 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- 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 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
Reid Spencer
2006-Dec-03 15:59 UTC
[LLVMdev] problem building gcc4 front end on fedora core 5
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 installLooks good.> > How I built gcc4: > ----------------------------- > export PATH=/custom/llvm-1.9/bin:.../llvm-1.9/Release/bin:$PATHNote 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:14372Not 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
Jim Laskey
2006-Dec-03 17:15 UTC
[LLVMdev] problem building gcc4 front end on fedora core 5
There was a patch that went thru for this recently from Rafael Espindola. The fix is on the mirror. Index: gcc/dwarf2out.c ==================================================================--- gcc/dwarf2out.c (revision 120589) +++ gcc/dwarf2out.c (working copy) @@ -14361,9 +14361,8 @@ s->refcount++; /* Avoid unnecessarily putting strings that are used less than twice in the hash table. */ - if (s->refcount == 2 - || (s->refcount == 1 - && (DEBUG_STR_SECTION_FLAGS & SECTION_MERGE) != 0)) + if (s->refcount + == ((DEBUG_STR_SECTION_FLAGS & SECTION_MERGE) ? 1 : 2)) { void ** slot; slot = htab_find_slot_with_hash (debug_str_hash, s->str, Cheers, -- Jim On Dec 3, 2006, at 9:20 AM, Ram Bhamidipaty wrote:> ../../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,-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20061203/af0b04d6/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2417 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20061203/af0b04d6/attachment.bin>
Ram Bhamidipaty
2006-Dec-03 18:14 UTC
[LLVMdev] problem building gcc4 front end on fedora core 5
Thank you! This did the trick. -Ram On 12/3/06, Jim Laskey <jlaskey at apple.com> wrote:> There was a patch that went thru for this recently from Rafael Espindola. > The fix is on the mirror. > > Index: gcc/dwarf2out.c > ==================================================================> --- gcc/dwarf2out.c (revision 120589) > +++ gcc/dwarf2out.c (working copy) > @@ -14361,9 +14361,8 @@ > s->refcount++; > /* Avoid unnecessarily putting strings that are used less than > twice in the hash table. */ > - if (s->refcount == 2 > - || (s->refcount == 1 > - && (DEBUG_STR_SECTION_FLAGS & SECTION_MERGE) != 0)) > + if (s->refcount > + == ((DEBUG_STR_SECTION_FLAGS & SECTION_MERGE) ? 1 : 2)) > { > void ** slot; > slot = htab_find_slot_with_hash (debug_str_hash, s->str, > > Cheers, > > -- Jim > > > > On Dec 3, 2006, at 9:20 AM, Ram Bhamidipaty wrote: > > > ../../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, > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > >