Reid Spencer
2006-Nov-06 19:17 UTC
[LLVMdev] Problems building cfrontend 4 source on SUSE 10.1
This is an libpath problem. When xgcc runs it wants to dynamically link the libgcc.so. When you run it from the command line it will find your system libgcc.so (which works) and so you don't see the segfault. When you run xgcc from the Makefile, it will have set LD_LIBRARY_PATH to get your <cfebuilddir>/gcc directory which will find the libgcc.so that it just built, which is the one that is segfaulting. To fix this, do the following: LD_LIBRARY_PATH=<cfebuilddir>/gcc <insert xgcc command line here> Then it will run xgcc so that it will find the new (buggy) libgcc.so Hopefully that will reproduce the problem and you can then get a stack trace from cc1 Reid. On Mon, 2006-11-06 at 10:45 -0800, Robert Mykland wrote:> Reid, > > I followed the steps but got stuck as described below: > > Reid Spencer wrote: > > Hi Robert, > > > > Please make sure that you: > > > > 1. Completely rebuild LLVM (make clean; make reconfigure; make > > tools-only) > > > This all worked great. > > 2. Completely rebuild llvm-gcc (wipe out the build dir with rm -rf, > > configure llvm-gcc > > and rebuild it) > > > Okay, got the same error as before. > > If you've done that, then please enter the debugger and get a stack > > trace for us. > > You will need to: > > > > 1. Capture the xgcc compile command that failed > > > I captured this command and it is: > > /home/mykland/llvm-gcc/obj/gcc/xgcc -B/home/mykland/llvm-gcc/obj/gcc/ > -B/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/bin/ > -B/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/lib/ > -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/include -isystem /home/mykland/llvm-gcc/obj/../install//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.8-source/gcc -I../../llvm-gcc4-1.8-source/gcc/. -I../../llvm-gcc4-1.8-source/gcc/../include -I../../llvm-gcc4-1.8-source/gcc/../libcpp/include -I/home/mykland/llvm/include -I/home/mykland/llvm/include -DL_muldi3 -fvisibility=hidden -DHIDE_EXPORTS -c ../../llvm-gcc4-1.8-source/gcc/libgcc2.c -o libgcc/./_muldi3.o > > My problem is that when I rerun the command it doesn't fail in the > same way. Several things can't be found anymore. The first time the > command runs inside the makefile environment the messages look like > this: > > /home/mykland/llvm-gcc/obj/gcc/xgcc -B/home/mykland/llvm-gcc/obj/gcc/ > -B/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/bin/ > -B/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/lib/ > -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/include -isystem /home/mykland/llvm-gcc/obj/../install//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.8-source/gcc -I../../llvm-gcc4-1.8-source/gcc/. -I../../llvm-gcc4-1.8-source/gcc/../include -I../../llvm-gcc4-1.8-source/gcc/../libcpp/include -I/home/mykland/llvm/include -I/home/mykland/llvm/include -DL_muldi3 -fvisibility=hidden -DHIDE_EXPORTS -c ../../llvm-gcc4-1.8-source/gcc/libgcc2.c -o libgcc/./_muldi3.o > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:541: internal compiler error: > Segmentation fault > Please submit a full bug report, > with preprocessed source if appropriate. > See <URL:http://llvm.org/bugs> for instructions. > make[2]: *** [libgcc/./_muldi3.o] Error 1 > make[2]: Leaving directory `/home/mykland/llvm-gcc/obj/gcc' > make[1]: *** [libgcc.a] Error 2 > make[1]: Leaving directory `/home/mykland/llvm-gcc/obj/gcc' > make: *** [all-gcc] Error 2 > > Afterwards, when I run it on the command line after the make has > failed the error messages look like this: > > mykland at ascenium:~/llvm-gcc/obj> /home/mykland/llvm-gcc/obj/gcc/xgcc > -B/home/mykland/llvm-gcc/obj/gcc/ > -B/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/bin/ > -B/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/lib/ > -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/include -isystem /home/mykland/llvm-gcc/obj/../install//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.8-source/gcc -I../../llvm-gcc4-1.8-source/gcc/. -I../../llvm-gcc4-1.8-source/gcc/../include -I../../llvm-gcc4-1.8-source/gcc/../libcpp/include -I/home/mykland/llvm/include -I/home/mykland/llvm/include -DL_muldi3 -fvisibility=hidden -DHIDE_EXPORTS -c ../../llvm-gcc4-1.8-source/gcc/libgcc2.c -o libgcc/./_muldi3.o > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:35:23: error: auto-host.h: No > such file or directory > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:40:21: error: tconfig.h: No > such file or directory > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:43:16: error: tm.h: No such > file or directory > In file included from ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:64: > ../../llvm-gcc4-1.8-source/gcc/libgcc2.h:214:3: error: #error "expand > the table"../../llvm-gcc4-1.8-source/gcc/libgcc2.c: In function > ‘__mulhi3’: > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:535: error: ‘BITS_PER_UNIT’ > undeclared (first use in this function) > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:535: error: (Each undeclared > identifier is reported only once > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:535: error: for each function > it appears in.) > > ...or with the -v command added they look like this: > > mykland at ascenium:~/llvm-gcc/obj> /home/mykland/llvm-gcc/obj/gcc/xgcc > -B/home/mykland/llvm-gcc/obj/gcc/ > -B/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/bin/ > -B/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/lib/ > -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/include -isystem /home/mykland/llvm-gcc/obj/../install//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.8-source/gcc -I../../llvm-gcc4-1.8-source/gcc/. -I../../llvm-gcc4-1.8-source/gcc/../include -I../../llvm-gcc4-1.8-source/gcc/../libcpp/include -I/home/mykland/llvm/include -I/home/mykland/llvm/include -DL_muldi3 -fvisibility=hidden -DHIDE_EXPORTS -c ../../llvm-gcc4-1.8-source/gcc/libgcc2.c -o libgcc/./_muldi3.o -v > Reading specs from /home/mykland/llvm-gcc/obj/gcc/specs > Target: i686-pc-linux-gnu > Configured with: ../llvm-gcc4-1.8-source/configure > --prefix=/home/mykland/llvm-gcc/obj/../install/ > --enable-llvm=/home/mykland/llvm --enable-languages=c,c++ > --disable-threads > Thread model: single > gcc version 4.0.1 LLVM (Apple Computer, Inc. build 5400) > /home/mykland/llvm-gcc/obj/gcc/cc1 -quiet -v -I. -I. > -I../../llvm-gcc4-1.8-source/gcc -I../../llvm-gcc4-1.8-source/gcc/. > -I../../llvm-gcc4-1.8-source/gcc/../include > -I../../llvm-gcc4-1.8-source/gcc/../libcpp/include > -I/home/mykland/llvm/include -I/home/mykland/llvm/include > -iprefix /home/mykland/llvm-gcc/obj/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.1/ -isystem /home/mykland/llvm-gcc/obj/gcc/include -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -DL_muldi3 -DHIDE_EXPORTS -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/include -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/sys-include -isystem ./include ../../llvm-gcc4-1.8-source/gcc/libgcc2.c -quiet -dumpbase libgcc2.c -mtune=pentiumpro -auxbase-strip libgcc/./_muldi3.o -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -version -fPIC -fvisibility=hidden -o /tmp/ccsulgFx.s > ignoring nonexistent directory > "/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/include" > ignoring nonexistent directory > "/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/sys-include" > ignoring nonexistent directory "./include" > ignoring nonexistent directory > "/home/mykland/llvm-gcc/obj/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.1/include" > ignoring nonexistent directory > "/home/mykland/llvm-gcc/obj/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.1/../../../../i686-pc-linux-gnu/include" > ignoring nonexistent directory > "/home/mykland/llvm-gcc/obj/../install//include" > ignoring nonexistent directory > "/home/mykland/llvm-gcc/obj/../install//lib/gcc/i686-pc-linux-gnu/4.0.1/include" > ignoring nonexistent directory > "/home/mykland/llvm-gcc/obj/../install//lib/gcc/i686-pc-linux-gnu/4.0.1/../../../../i686-pc-linux-gnu/include" > ignoring duplicate directory "." > ignoring duplicate directory "../../llvm-gcc4-1.8-source/gcc/." > ignoring duplicate directory "/home/mykland/llvm/include" > #include "..." search starts here: > #include <...> search starts here: > . > ../../llvm-gcc4-1.8-source/gcc > ../../llvm-gcc4-1.8-source/gcc/../include > ../../llvm-gcc4-1.8-source/gcc/../libcpp/include > /home/mykland/llvm/include > /home/mykland/llvm-gcc/obj/gcc/include > /usr/local/include > /usr/include > End of search list. > GNU C version 4.0.1 LLVM (Apple Computer, Inc. build 5400) > (i686-pc-linux-gnu) > compiled by GNU C version 4.1.0 (SUSE Linux). > GGC heuristics: --param ggc-min-expand=99 --param > ggc-min-heapsize=129349 > Compiler executable checksum: b890601e6422e9101b52d960e6263283 > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:35:23: error: auto-host.h: No > such file or directory > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:40:21: error: tconfig.h: No > such file or directory > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:43:16: error: tm.h: No such > file or directory > In file included from ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:64: > ../../llvm-gcc4-1.8-source/gcc/libgcc2.h:214:3: error: #error "expand > the table"../../llvm-gcc4-1.8-source/gcc/libgcc2.c: In function > ‘__mulhi3’: > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:535: error: ‘BITS_PER_UNIT’ > undeclared (first use in this function) > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:535: error: (Each undeclared > identifier is reported only once > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:535: error: for each function > it appears in.) > > What now? > > Regards, > > -- Robert. > > 2. Run that command manually with the -v option to print out the > > commands it is running > > 3. Debug gcc/cc1 and run it with the arguments shown in step 2 > > 4. Get a stack trace with "where" > > > > Reid. > > > > On Sun, 2006-11-05 at 20:15 -0800, Robert Mykland wrote: > > > > > I was having video problems, so upgraded my Linux box from SUSE 9.3, > > > where LLVM frontend 4 source built fine, to SUSE 10.1, where I got the > > > error message: > > > > > > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:541: internal compiler error: > > > Segmentation fault > > > Please submit a full bug report, > > > with preprocessed source if appropriate. > > > See <URL:http://llvm.org/bugs> for instructions. > > > > > > This version of SUSE uses version 4.1.0 of the gcc compiler. > > > > > > What now? > > > > > > -- Robert. > > > > > > _______________________________________________ > > > LLVM Developers mailing list > > > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > > > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > > > > > _______________________________________________ > > LLVM Developers mailing list > > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Scott Michel
2006-Nov-06 20:07 UTC
[LLVMdev] Problems building cfrontend 4 source on SUSE 10.1
Reid Spencer wrote:> This is an libpath problem. When xgcc runs it wants to dynamically linkthe libgcc.so. > When you run it from the command line it will find yoursystemlibgcc.so (which works) Not really. For systems that have gcc 4.2 natively installed, like the current Debian testing, the compiler gets GCC_4.2.0 version errors. It isn't easy to work around b/c xgcc wants to link in the 4.2 version of the library. Basically, this is a "me too!" -scooter
Robert Mykland
2006-Nov-06 20:45 UTC
[LLVMdev] Problems building cfrontend 4 source on SUSE 10.1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=utf-8" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> Reid,<br> <br> Here's the backtrace you asked for:<br> <br> (gdb) bt<br> #0 0x0862d65c in llvm::LiveVariables::runOnMachineFunction ()<br> During symbol reading, incomplete CFI data; unspecified registers (e.g., eax) at 0x862d18c.<br> During symbol reading, incomplete CFI data; unspecified registers (e.g., ecx) at 0x862d18c.<br> During symbol reading, incomplete CFI data; unspecified registers (e.g., edx) at 0x862d18c.<br> #1 0x083d0339 in llvm::MachineFunctionPass::runOnFunction ()<br> During symbol reading, incomplete CFI data; unspecified registers (e.g., eax) at 0x83d031f.<br> During symbol reading, incomplete CFI data; unspecified registers (e.g., ecx) at 0x83d031f.<br> During symbol reading, incomplete CFI data; unspecified registers (e.g., edx) at 0x83d031f.<br> During symbol reading, incomplete CFI data; unspecified registers (e.g., ebp) at 0x83d031f.<br> During symbol reading, incomplete CFI data; unspecified registers (e.g., edi) at 0x83d031f.<br> #2 0x086fb4d7 in llvm::FunctionPassManagerT::runPass ()<br> During symbol reading, incomplete CFI data; unspecified registers (e.g., eax) at 0x86fb4c3.<br> During symbol reading, incomplete CFI data; unspecified registers (e.g., ecx) at 0x86fb4c3.<br> During symbol reading, incomplete CFI data; unspecified registers (e.g., edx) at 0x86fb4c3.<br> During symbol reading, incomplete CFI data; unspecified registers (e.g., ebx) at 0x86fb4c3.<br> During symbol reading, incomplete CFI data; unspecified registers (e.g., ebp) at 0x86fb4c3.<br> During symbol reading, incomplete CFI data; unspecified registers (e.g., esi) at 0x86fb4c3.<br> During symbol reading, incomplete CFI data; unspecified registers (e.g., edi) at 0x86fb4c3.<br> #3 0x087033f8 in llvm::PassManagerT<llvm::FTraits>::runPasses ()<br> During symbol reading, incomplete CFI data; unspecified registers (e.g., eax) at 0x870312c.<br> During symbol reading, incomplete CFI data; unspecified registers (e.g., ecx) at 0x870312c.<br> During symbol reading, incomplete CFI data; unspecified registers (e.g., edx) at 0x870312c.<br> #4 0x0870412f in llvm::PassManagerT<llvm::FTraits>::runOnUnit ()<br> During symbol reading, incomplete CFI data; unspecified registers (e.g., eax) at 0x8703daa.<br> During symbol reading, incomplete CFI data; unspecified registers (e.g., ecx) at 0x8703daa.<br> #5 0x086fb59b in llvm::FunctionPassManagerT::runOnFunction ()<br> #6 0x086f6fb9 in llvm::FunctionPass::runOnModule ()<br> #7 0x086fb547 in llvm::ModulePassManager::runPass ()<br> #8 0x08702329 in llvm::PassManagerT<llvm::MTraits>::runPasses ()<br> #9 0x0870300f in llvm::PassManagerT<llvm::MTraits>::runOnUnit ()<br> #10 0x086f65eb in llvm::ModulePassManager::runOnModule ()<br> #11 0x086f6659 in llvm::PassManager::run ()<br> #12 0x08256a93 in llvm_asm_file_end ()<br> at ../../llvm-gcc4-1.8-source/gcc/llvm-backend.cpp:277<br> #13 0x0823bc40 in toplev_main (argc=47, argv=0xbff80804)<br> at ../../llvm-gcc4-1.8-source/gcc/toplev.c:1171<br> #14 0x08096ad2 in main (argc=-1209859528, argv=0xb7e30240)<br> at ../../llvm-gcc4-1.8-source/gcc/llvm-main.cpp:37<br> <br> The command looked like this in gdb when it failed:<br> <br> (gdb) file cc1<br> Reading symbols from /home/mykland/llvm-gcc/obj/gcc/cc1...done.<br> Using host libthread_db library "/lib/libthread_db.so.1".<br> (gdb) run -quiet -v -I. -I. -I../../llvm-gcc4-1.8-source/gcc -I../../llvm-gcc4-1.8-source/gcc/. -I../../llvm-gcc4-1.8-source/gcc/../include -I../../llvm-gcc4-1.8-source/gcc/../libcpp/include -I/home/mykland/llvm/include -I/home/mykland/llvm/include -iprefix /home/mykland/llvm-gcc/obj/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.1/ -isystem /home/mykland/llvm-gcc/obj/gcc/include -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -DL_muldi3 -DHIDE_EXPORTS -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/include -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/sys-include -isystem ./include ../../llvm-gcc4-1.8-source/gcc/libgcc2.c -quiet -dumpbase libgcc2.c -mtune=pentiumpro -auxbase-strip libgcc/./_muldi3.o -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -version -fPIC -fvisibility=hidden -o /tmp/ccaIovPB.s -v<br> Starting program: /home/mykland/llvm-gcc/obj/gcc/cc1 -quiet -v -I. -I. -I../../llvm-gcc4-1.8-source/gcc -I../../llvm-gcc4-1.8-source/gcc/. -I../../llvm-gcc4-1.8-source/gcc/../include -I../../llvm-gcc4-1.8-source/gcc/../libcpp/include -I/home/mykland/llvm/include -I/home/mykland/llvm/include -iprefix /home/mykland/llvm-gcc/obj/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.1/ -isystem /home/mykland/llvm-gcc/obj/gcc/include -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -DL_muldi3 -DHIDE_EXPORTS -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/include -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/sys-include -isystem ./include ../../llvm-gcc4-1.8-source/gcc/libgcc2.c -quiet -dumpbase libgcc2.c -mtune=pentiumpro -auxbase-strip libgcc/./_muldi3.o -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -version -fPIC -fvisibility=hidden -o /tmp/ccaIovPB.s -v<br> [Thread debugging using libthread_db enabled]<br> [New Thread -1211050320 (LWP 4569)]<br> ignoring nonexistent directory "/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/include"<br> ignoring nonexistent directory "/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/sys-include"<br> ignoring duplicate directory "./include"<br> ignoring nonexistent directory "/home/mykland/llvm-gcc/obj/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.1/include"<br> ignoring nonexistent directory "/home/mykland/llvm-gcc/obj/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.1/../../../../i686-pc-linux-gnu/include"<br> ignoring nonexistent directory "/home/mykland/llvm-gcc/obj/../install//include"<br> ignoring nonexistent directory "/home/mykland/llvm-gcc/obj/../install//lib/gcc/i686-pc-linux-gnu/4.0.1/include"<br> ignoring nonexistent directory "/home/mykland/llvm-gcc/obj/../install//lib/gcc/i686-pc-linux-gnu/4.0.1/../../../../i686-pc-linux-gnu/include"<br> ignoring duplicate directory "."<br> ignoring duplicate directory "../../llvm-gcc4-1.8-source/gcc/."<br> ignoring duplicate directory "/home/mykland/llvm/include"<br> #include "..." search starts here:<br> #include <...> search starts here:<br> .<br> ../../llvm-gcc4-1.8-source/gcc<br> ../../llvm-gcc4-1.8-source/gcc/../include<br> ../../llvm-gcc4-1.8-source/gcc/../libcpp/include<br> /home/mykland/llvm/include<br> /home/mykland/llvm-gcc/obj/gcc/include<br> /usr/local/include<br> /usr/include<br> End of search list.<br> GNU C version 4.0.1 LLVM (Apple Computer, Inc. build 5400) (i686-pc-linux-gnu)<br> compiled by GNU C version 4.1.0 (SUSE Linux).<br> GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129349<br> Compiler executable checksum: b890601e6422e9101b52d960e6263283<br> <br> Program received signal SIGSEGV, Segmentation fault.<br> [Switching to Thread -1211050320 (LWP 4569)]<br> 0x0862d65c in llvm::LiveVariables::runOnMachineFunction ()<br> <br> -- Robert.<br> <br> Reid Spencer wrote: <blockquote cite="mid1162840634.30912.21.camel@bashful.x10sys.com" type="cite"> <pre wrap="">This is an libpath problem. When xgcc runs it wants to dynamically link the libgcc.so. When you run it from the command line it will find your system libgcc.so (which works) and so you don't see the segfault. When you run xgcc from the Makefile, it will have set LD_LIBRARY_PATH to get your <cfebuilddir>/gcc directory which will find the libgcc.so that it just built, which is the one that is segfaulting. To fix this, do the following: LD_LIBRARY_PATH=<cfebuilddir>/gcc <insert xgcc command line here> Then it will run xgcc so that it will find the new (buggy) libgcc.so Hopefully that will reproduce the problem and you can then get a stack trace from cc1 Reid. On Mon, 2006-11-06 at 10:45 -0800, Robert Mykland wrote: </pre> <blockquote type="cite"> <pre wrap="">Reid, I followed the steps but got stuck as described below: Reid Spencer wrote: </pre> <blockquote type="cite"> <pre wrap="">Hi Robert, Please make sure that you: 1. Completely rebuild LLVM (make clean; make reconfigure; make tools-only) </pre> </blockquote> <pre wrap="">This all worked great. </pre> <blockquote type="cite"> <pre wrap="">2. Completely rebuild llvm-gcc (wipe out the build dir with rm -rf, configure llvm-gcc and rebuild it) </pre> </blockquote> <pre wrap="">Okay, got the same error as before. </pre> <blockquote type="cite"> <pre wrap="">If you've done that, then please enter the debugger and get a stack trace for us. You will need to: 1. Capture the xgcc compile command that failed </pre> </blockquote> <pre wrap="">I captured this command and it is: /home/mykland/llvm-gcc/obj/gcc/xgcc -B/home/mykland/llvm-gcc/obj/gcc/ -B/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/bin/ -B/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/lib/ -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/include -isystem /home/mykland/llvm-gcc/obj/../install//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.8-source/gcc -I../../llvm-gcc4-1.8-source/gcc/. -I../../llvm-gcc4-1.8-source/gcc/../include -I../../llvm-gcc4-1.8-source/gcc/../libcpp/include -I/home/mykland/llvm/include -I/home/mykland/llvm/include -DL_muldi3 -fvisibility=hidden -DHIDE_EXPORTS -c ../../llvm-gcc4-1.8-source/gcc/libgcc2.c -o libgcc/./_muldi3.o My problem is that when I rerun the command it doesn't fail in the same way. Several things can't be found anymore. The first time the command runs inside the makefile environment the messages look like this: /home/mykland/llvm-gcc/obj/gcc/xgcc -B/home/mykland/llvm-gcc/obj/gcc/ -B/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/bin/ -B/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/lib/ -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/include -isystem /home/mykland/llvm-gcc/obj/../install//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.8-source/gcc -I../../llvm-gcc4-1.8-source/gcc/. -I../../llvm-gcc4-1.8-source/gcc/../include -I../../llvm-gcc4-1.8-source/gcc/../libcpp/include -I/home/mykland/llvm/include -I/home/mykland/llvm/include -DL_muldi3 -fvisibility=hidden -DHIDE_EXPORTS -c ../../llvm-gcc4-1.8-source/gcc/libgcc2.c -o libgcc/./_muldi3.o ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:541: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <a class="moz-txt-link-rfc1738" href="http://llvm.org/bugs"><URL:http://llvm.org/bugs></a> for instructions. make[2]: *** [libgcc/./_muldi3.o] Error 1 make[2]: Leaving directory `/home/mykland/llvm-gcc/obj/gcc' make[1]: *** [libgcc.a] Error 2 make[1]: Leaving directory `/home/mykland/llvm-gcc/obj/gcc' make: *** [all-gcc] Error 2 Afterwards, when I run it on the command line after the make has failed the error messages look like this: mykland@ascenium:~/llvm-gcc/obj> /home/mykland/llvm-gcc/obj/gcc/xgcc -B/home/mykland/llvm-gcc/obj/gcc/ -B/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/bin/ -B/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/lib/ -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/include -isystem /home/mykland/llvm-gcc/obj/../install//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.8-source/gcc -I../../llvm-gcc4-1.8-source/gcc/. -I../../llvm-gcc4-1.8-source/gcc/../include -I../../llvm-gcc4-1.8-source/gcc/../libcpp/include -I/home/mykland/llvm/include -I/home/mykland/llvm/include -DL_muldi3 -fvisibility=hidden -DHIDE_EXPORTS -c ../../llvm-gcc4-1.8-source/gcc/libgcc2.c -o libgcc/./_muldi3.o ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:35:23: error: auto-host.h: No such file or directory ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:40:21: error: tconfig.h: No such file or directory ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:43:16: error: tm.h: No such file or directory In file included from ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:64: ../../llvm-gcc4-1.8-source/gcc/libgcc2.h:214:3: error: #error "expand the table"../../llvm-gcc4-1.8-source/gcc/libgcc2.c: In function ‘__mulhi3’: ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:535: error: ‘BITS_PER_UNIT’ undeclared (first use in this function) ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:535: error: (Each undeclared identifier is reported only once ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:535: error: for each function it appears in.) ...or with the -v command added they look like this: mykland@ascenium:~/llvm-gcc/obj> /home/mykland/llvm-gcc/obj/gcc/xgcc -B/home/mykland/llvm-gcc/obj/gcc/ -B/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/bin/ -B/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/lib/ -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/include -isystem /home/mykland/llvm-gcc/obj/../install//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.8-source/gcc -I../../llvm-gcc4-1.8-source/gcc/. -I../../llvm-gcc4-1.8-source/gcc/../include -I../../llvm-gcc4-1.8-source/gcc/../libcpp/include -I/home/mykland/llvm/include -I/home/mykland/llvm/include -DL_muldi3 -fvisibility=hidden -DHIDE_EXPORTS -c ../../llvm-gcc4-1.8-source/gcc/libgcc2.c -o libgcc/./_muldi3.o -v Reading specs from /home/mykland/llvm-gcc/obj/gcc/specs Target: i686-pc-linux-gnu Configured with: ../llvm-gcc4-1.8-source/configure --prefix=/home/mykland/llvm-gcc/obj/../install/ --enable-llvm=/home/mykland/llvm --enable-languages=c,c++ --disable-threads Thread model: single gcc version 4.0.1 LLVM (Apple Computer, Inc. build 5400) /home/mykland/llvm-gcc/obj/gcc/cc1 -quiet -v -I. -I. -I../../llvm-gcc4-1.8-source/gcc -I../../llvm-gcc4-1.8-source/gcc/. -I../../llvm-gcc4-1.8-source/gcc/../include -I../../llvm-gcc4-1.8-source/gcc/../libcpp/include -I/home/mykland/llvm/include -I/home/mykland/llvm/include -iprefix /home/mykland/llvm-gcc/obj/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.1/ -isystem /home/mykland/llvm-gcc/obj/gcc/include -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -DL_muldi3 -DHIDE_EXPORTS -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/include -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/sys-include -isystem ./include ../../llvm-gcc4-1.8-source/gcc/libgcc2.c -quiet -dumpbase libgcc2.c -mtune=pentiumpro -auxbase-strip libgcc/./_muldi3.o -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -version -fPIC -fvisibility=hidden -o /tmp/ccsulgFx.s ignoring nonexistent directory "/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/include" ignoring nonexistent directory "/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/sys-include" ignoring nonexistent directory "./include" ignoring nonexistent directory "/home/mykland/llvm-gcc/obj/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.1/include" ignoring nonexistent directory "/home/mykland/llvm-gcc/obj/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.1/../../../../i686-pc-linux-gnu/include" ignoring nonexistent directory "/home/mykland/llvm-gcc/obj/../install//include" ignoring nonexistent directory "/home/mykland/llvm-gcc/obj/../install//lib/gcc/i686-pc-linux-gnu/4.0.1/include" ignoring nonexistent directory "/home/mykland/llvm-gcc/obj/../install//lib/gcc/i686-pc-linux-gnu/4.0.1/../../../../i686-pc-linux-gnu/include" ignoring duplicate directory "." ignoring duplicate directory "../../llvm-gcc4-1.8-source/gcc/." ignoring duplicate directory "/home/mykland/llvm/include" #include "..." search starts here: #include <...> search starts here: . ../../llvm-gcc4-1.8-source/gcc ../../llvm-gcc4-1.8-source/gcc/../include ../../llvm-gcc4-1.8-source/gcc/../libcpp/include /home/mykland/llvm/include /home/mykland/llvm-gcc/obj/gcc/include /usr/local/include /usr/include End of search list. GNU C version 4.0.1 LLVM (Apple Computer, Inc. build 5400) (i686-pc-linux-gnu) compiled by GNU C version 4.1.0 (SUSE Linux). GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129349 Compiler executable checksum: b890601e6422e9101b52d960e6263283 ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:35:23: error: auto-host.h: No such file or directory ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:40:21: error: tconfig.h: No such file or directory ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:43:16: error: tm.h: No such file or directory In file included from ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:64: ../../llvm-gcc4-1.8-source/gcc/libgcc2.h:214:3: error: #error "expand the table"../../llvm-gcc4-1.8-source/gcc/libgcc2.c: In function ‘__mulhi3’: ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:535: error: ‘BITS_PER_UNIT’ undeclared (first use in this function) ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:535: error: (Each undeclared identifier is reported only once ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:535: error: for each function it appears in.) What now? Regards, -- Robert. </pre> <blockquote type="cite"> <pre wrap="">2. Run that command manually with the -v option to print out the commands it is running 3. Debug gcc/cc1 and run it with the arguments shown in step 2 4. Get a stack trace with "where" Reid. On Sun, 2006-11-05 at 20:15 -0800, Robert Mykland wrote: </pre> <blockquote type="cite"> <pre wrap="">I was having video problems, so upgraded my Linux box from SUSE 9.3, where LLVM frontend 4 source built fine, to SUSE 10.1, where I got the error message: ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:541: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <a class="moz-txt-link-rfc1738" href="http://llvm.org/bugs"><URL:http://llvm.org/bugs></a> for instructions. This version of SUSE uses version 4.1.0 of the gcc compiler. What now? -- Robert. _______________________________________________ LLVM Developers mailing list <a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a> <a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a> </pre> </blockquote> <pre wrap="">_______________________________________________ LLVM Developers mailing list <a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a> <a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a> </pre> </blockquote> <pre wrap="">_______________________________________________ LLVM Developers mailing list <a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a> <a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a> </pre> </blockquote> <pre wrap=""><!----> _______________________________________________ LLVM Developers mailing list <a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a> <a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a> </pre> </blockquote> </body> </html>
Reid Spencer
2006-Nov-06 20:50 UTC
[LLVMdev] Problems building cfrontend 4 source on SUSE 10.1
Hi Scooter, On Mon, 2006-11-06 at 12:07 -0800, Scott Michel wrote:> Reid Spencer wrote: > > This is an libpath problem. When xgcc runs it wants to dynamically linkthe libgcc.so. > > When you run it from the command line it will find yoursystem > libgcc.so (which works) > > Not really. For systems that have gcc 4.2 natively installed, like the > current Debian testing, the compiler gets GCC_4.2.0 version errors. It > isn't easy to work around b/c xgcc wants to link in the 4.2 version of > the library.You're right. If your system GCC is > 4.0.1 then linking to the system library could cause problems (i.e. the command line xgcc run won't work). In the instant case, that isn't the situation because the command line xgcc did work. Either way, setting LD_LIBRARY_PATH appropriately for the command line run should fix this and allow the original problem (segfault) to appear. The original question was about how to reproduce an error which is only tangentially related to accidentally linking xgcc to a newer libgcc.so.> > Basically, this is a "me too!"I've run into this too, but it doesn't come up in practice if llvm-gcc would just build properly :) Reid.
Reid Spencer
2006-Nov-06 21:18 UTC
[LLVMdev] Problems building cfrontend 4 source on SUSE 10.1
Hi Robert, On Mon, 2006-11-06 at 12:45 -0800, Robert Mykland wrote:> Reid, > > Here's the backtrace you asked for: > > (gdb) bt > #0 0x0862d65c in llvm::LiveVariables::runOnMachineFunction ()Hmm, this is a little strange. Your LLVM build is non-debug (there's no line numbers or arguments in any of the llvm related calls). However, your llvm-gcc build seems to have symbols. So, I have some questions: 1. Did you configure llvm-gcc with the --enable-checking option? 2. What did you provide for the --with-llvm= option? llvm-gcc is going to look in that directory for Debug/lib for libraries. So, you should have debug llvm but you don't. Can you explain why? 3. Can you build an llvm Debug version and link llvm-gcc against it? 4. Are you sure you're linking against the right thing? The function that failed is a one-liner: return runOnMachineFunction(MachineFunction::get(&F)); I don't see any way for that to fail easily (maybe with bad vtable). It could fail in MachineFunction::get but that doesn't show up on your stack trace. Reid.> #1 0x083d0339 in llvm::MachineFunctionPass::runOnFunction () > #2 0x086fb4d7 in llvm::FunctionPassManagerT::runPass () > #3 0x087033f8 in llvm::PassManagerT<llvm::FTraits>::runPasses () > #4 0x0870412f in llvm::PassManagerT<llvm::FTraits>::runOnUnit () > #5 0x086fb59b in llvm::FunctionPassManagerT::runOnFunction () > #6 0x086f6fb9 in llvm::FunctionPass::runOnModule () > #7 0x086fb547 in llvm::ModulePassManager::runPass () > #8 0x08702329 in llvm::PassManagerT<llvm::MTraits>::runPasses () > #9 0x0870300f in llvm::PassManagerT<llvm::MTraits>::runOnUnit () > #10 0x086f65eb in llvm::ModulePassManager::runOnModule () > #11 0x086f6659 in llvm::PassManager::run () > #12 0x08256a93 in llvm_asm_file_end () > at ../../llvm-gcc4-1.8-source/gcc/llvm-backend.cpp:277 > #13 0x0823bc40 in toplev_main (argc=47, argv=0xbff80804) > at ../../llvm-gcc4-1.8-source/gcc/toplev.c:1171 > #14 0x08096ad2 in main (argc=-1209859528, argv=0xb7e30240) > at ../../llvm-gcc4-1.8-source/gcc/llvm-main.cpp:37 > > The command looked like this in gdb when it failed:That all looks pretty normal below here.> > (gdb) file cc1 > Reading symbols from /home/mykland/llvm-gcc/obj/gcc/cc1...done. > Using host libthread_db library "/lib/libthread_db.so.1". > (gdb) run -quiet -v -I. -I. -I../../llvm-gcc4-1.8-source/gcc > -I../../llvm-gcc4-1.8-source/gcc/. > -I../../llvm-gcc4-1.8-source/gcc/../include > -I../../llvm-gcc4-1.8-source/gcc/../libcpp/include > -I/home/mykland/llvm/include -I/home/mykland/llvm/include > -iprefix /home/mykland/llvm-gcc/obj/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.1/ -isystem /home/mykland/llvm-gcc/obj/gcc/include -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -DL_muldi3 -DHIDE_EXPORTS -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/include -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/sys-include -isystem ./include ../../llvm-gcc4-1.8-source/gcc/libgcc2.c -quiet -dumpbase libgcc2.c -mtune=pentiumpro -auxbase-strip libgcc/./_muldi3.o -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -version -fPIC -fvisibility=hidden -o /tmp/ccaIovPB.s -v > Starting program: /home/mykland/llvm-gcc/obj/gcc/cc1 -quiet -v -I. -I. > -I../../llvm-gcc4-1.8-source/gcc -I../../llvm-gcc4-1.8-source/gcc/. > -I../../llvm-gcc4-1.8-source/gcc/../include > -I../../llvm-gcc4-1.8-source/gcc/../libcpp/include > -I/home/mykland/llvm/include -I/home/mykland/llvm/include > -iprefix /home/mykland/llvm-gcc/obj/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.1/ -isystem /home/mykland/llvm-gcc/obj/gcc/include -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -DL_muldi3 -DHIDE_EXPORTS -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/include -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/sys-include -isystem ./include ../../llvm-gcc4-1.8-source/gcc/libgcc2.c -quiet -dumpbase libgcc2.c -mtune=pentiumpro -auxbase-strip libgcc/./_muldi3.o -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -version -fPIC -fvisibility=hidden -o /tmp/ccaIovPB.s -v > [Thread debugging using libthread_db enabled] > [New Thread -1211050320 (LWP 4569)] > ignoring nonexistent directory > "/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/include" > ignoring nonexistent directory > "/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/sys-include" > ignoring duplicate directory "./include" > ignoring nonexistent directory > "/home/mykland/llvm-gcc/obj/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.1/include" > ignoring nonexistent directory > "/home/mykland/llvm-gcc/obj/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.1/../../../../i686-pc-linux-gnu/include" > ignoring nonexistent directory > "/home/mykland/llvm-gcc/obj/../install//include" > ignoring nonexistent directory > "/home/mykland/llvm-gcc/obj/../install//lib/gcc/i686-pc-linux-gnu/4.0.1/include" > ignoring nonexistent directory > "/home/mykland/llvm-gcc/obj/../install//lib/gcc/i686-pc-linux-gnu/4.0.1/../../../../i686-pc-linux-gnu/include" > ignoring duplicate directory "." > ignoring duplicate directory "../../llvm-gcc4-1.8-source/gcc/." > ignoring duplicate directory "/home/mykland/llvm/include" > #include "..." search starts here: > #include <...> search starts here: > . > ../../llvm-gcc4-1.8-source/gcc > ../../llvm-gcc4-1.8-source/gcc/../include > ../../llvm-gcc4-1.8-source/gcc/../libcpp/include > /home/mykland/llvm/include > /home/mykland/llvm-gcc/obj/gcc/include > /usr/local/include > /usr/include > End of search list. > GNU C version 4.0.1 LLVM (Apple Computer, Inc. build 5400) > (i686-pc-linux-gnu) > compiled by GNU C version 4.1.0 (SUSE Linux). > GGC heuristics: --param ggc-min-expand=99 --param > ggc-min-heapsize=129349 > Compiler executable checksum: b890601e6422e9101b52d960e6263283 > > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread -1211050320 (LWP 4569)] > 0x0862d65c in llvm::LiveVariables::runOnMachineFunction () > > -- Robert. > > Reid Spencer wrote: > > This is an libpath problem. When xgcc runs it wants to dynamically link > > the libgcc.so. When you run it from the command line it will find your > > system libgcc.so (which works) and so you don't see the segfault. When > > you run xgcc from the Makefile, it will have set LD_LIBRARY_PATH to get > > your <cfebuilddir>/gcc directory which will find the libgcc.so that it > > just built, which is the one that is segfaulting. To fix this, do the > > following: > > > > LD_LIBRARY_PATH=<cfebuilddir>/gcc <insert xgcc command line here> > > > > Then it will run xgcc so that it will find the new (buggy) libgcc.so > > > > Hopefully that will reproduce the problem and you can then get a stack > > trace from cc1 > > > > Reid. > > > > On Mon, 2006-11-06 at 10:45 -0800, Robert Mykland wrote: > > > > > Reid, > > > > > > I followed the steps but got stuck as described below: > > > > > > Reid Spencer wrote: > > > > > > > Hi Robert, > > > > > > > > Please make sure that you: > > > > > > > > 1. Completely rebuild LLVM (make clean; make reconfigure; make > > > > tools-only) > > > > > > > > > > > This all worked great. > > > > > > > 2. Completely rebuild llvm-gcc (wipe out the build dir with rm -rf, > > > > configure llvm-gcc > > > > and rebuild it) > > > > > > > > > > > Okay, got the same error as before. > > > > > > > If you've done that, then please enter the debugger and get a stack > > > > trace for us. > > > > You will need to: > > > > > > > > 1. Capture the xgcc compile command that failed > > > > > > > > > > > I captured this command and it is: > > > > > > /home/mykland/llvm-gcc/obj/gcc/xgcc -B/home/mykland/llvm-gcc/obj/gcc/ > > > -B/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/bin/ > > > -B/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/lib/ > > > -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/include -isystem /home/mykland/llvm-gcc/obj/../install//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.8-source/gcc -I../../llvm-gcc4-1.8-source/gcc/. -I../../llvm-gcc4-1.8-source/gcc/../include -I../../llvm-gcc4-1.8-source/gcc/../libcpp/include -I/home/mykland/llvm/include -I/home/mykland/llvm/include -DL_muldi3 -fvisibility=hidden -DHIDE_EXPORTS -c ../../llvm-gcc4-1.8-source/gcc/libgcc2.c -o libgcc/./_muldi3.o > > > > > > My problem is that when I rerun the command it doesn't fail in the > > > same way. Several things can't be found anymore. The first time the > > > command runs inside the makefile environment the messages look like > > > this: > > > > > > /home/mykland/llvm-gcc/obj/gcc/xgcc -B/home/mykland/llvm-gcc/obj/gcc/ > > > -B/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/bin/ > > > -B/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/lib/ > > > -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/include -isystem /home/mykland/llvm-gcc/obj/../install//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.8-source/gcc -I../../llvm-gcc4-1.8-source/gcc/. -I../../llvm-gcc4-1.8-source/gcc/../include -I../../llvm-gcc4-1.8-source/gcc/../libcpp/include -I/home/mykland/llvm/include -I/home/mykland/llvm/include -DL_muldi3 -fvisibility=hidden -DHIDE_EXPORTS -c ../../llvm-gcc4-1.8-source/gcc/libgcc2.c -o libgcc/./_muldi3.o > > > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:541: internal compiler error: > > > Segmentation fault > > > Please submit a full bug report, > > > with preprocessed source if appropriate. > > > See <URL:http://llvm.org/bugs> for instructions. > > > make[2]: *** [libgcc/./_muldi3.o] Error 1 > > > make[2]: Leaving directory `/home/mykland/llvm-gcc/obj/gcc' > > > make[1]: *** [libgcc.a] Error 2 > > > make[1]: Leaving directory `/home/mykland/llvm-gcc/obj/gcc' > > > make: *** [all-gcc] Error 2 > > > > > > Afterwards, when I run it on the command line after the make has > > > failed the error messages look like this: > > > > > > mykland at ascenium:~/llvm-gcc/obj> /home/mykland/llvm-gcc/obj/gcc/xgcc > > > -B/home/mykland/llvm-gcc/obj/gcc/ > > > -B/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/bin/ > > > -B/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/lib/ > > > -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/include -isystem /home/mykland/llvm-gcc/obj/../install//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.8-source/gcc -I../../llvm-gcc4-1.8-source/gcc/. -I../../llvm-gcc4-1.8-source/gcc/../include -I../../llvm-gcc4-1.8-source/gcc/../libcpp/include -I/home/mykland/llvm/include -I/home/mykland/llvm/include -DL_muldi3 -fvisibility=hidden -DHIDE_EXPORTS -c ../../llvm-gcc4-1.8-source/gcc/libgcc2.c -o libgcc/./_muldi3.o > > > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:35:23: error: auto-host.h: No > > > such file or directory > > > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:40:21: error: tconfig.h: No > > > such file or directory > > > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:43:16: error: tm.h: No such > > > file or directory > > > In file included from ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:64: > > > ../../llvm-gcc4-1.8-source/gcc/libgcc2.h:214:3: error: #error "expand > > > the table"../../llvm-gcc4-1.8-source/gcc/libgcc2.c: In function > > > ‘__mulhi3’: > > > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:535: error: ‘BITS_PER_UNIT’ > > > undeclared (first use in this function) > > > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:535: error: (Each undeclared > > > identifier is reported only once > > > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:535: error: for each function > > > it appears in.) > > > > > > ...or with the -v command added they look like this: > > > > > > mykland at ascenium:~/llvm-gcc/obj> /home/mykland/llvm-gcc/obj/gcc/xgcc > > > -B/home/mykland/llvm-gcc/obj/gcc/ > > > -B/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/bin/ > > > -B/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/lib/ > > > -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/include -isystem /home/mykland/llvm-gcc/obj/../install//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.8-source/gcc -I../../llvm-gcc4-1.8-source/gcc/. -I../../llvm-gcc4-1.8-source/gcc/../include -I../../llvm-gcc4-1.8-source/gcc/../libcpp/include -I/home/mykland/llvm/include -I/home/mykland/llvm/include -DL_muldi3 -fvisibility=hidden -DHIDE_EXPORTS -c ../../llvm-gcc4-1.8-source/gcc/libgcc2.c -o libgcc/./_muldi3.o -v > > > Reading specs from /home/mykland/llvm-gcc/obj/gcc/specs > > > Target: i686-pc-linux-gnu > > > Configured with: ../llvm-gcc4-1.8-source/configure > > > --prefix=/home/mykland/llvm-gcc/obj/../install/ > > > --enable-llvm=/home/mykland/llvm --enable-languages=c,c++ > > > --disable-threads > > > Thread model: single > > > gcc version 4.0.1 LLVM (Apple Computer, Inc. build 5400) > > > /home/mykland/llvm-gcc/obj/gcc/cc1 -quiet -v -I. -I. > > > -I../../llvm-gcc4-1.8-source/gcc -I../../llvm-gcc4-1.8-source/gcc/. > > > -I../../llvm-gcc4-1.8-source/gcc/../include > > > -I../../llvm-gcc4-1.8-source/gcc/../libcpp/include > > > -I/home/mykland/llvm/include -I/home/mykland/llvm/include > > > -iprefix /home/mykland/llvm-gcc/obj/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.1/ -isystem /home/mykland/llvm-gcc/obj/gcc/include -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -DL_muldi3 -DHIDE_EXPORTS -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/include -isystem /home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/sys-include -isystem ./include ../../llvm-gcc4-1.8-source/gcc/libgcc2.c -quiet -dumpbase libgcc2.c -mtune=pentiumpro -auxbase-strip libgcc/./_muldi3.o -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -version -fPIC -fvisibility=hidden -o /tmp/ccsulgFx.s > > > ignoring nonexistent directory > > > "/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/include" > > > ignoring nonexistent directory > > > "/home/mykland/llvm-gcc/obj/../install//i686-pc-linux-gnu/sys-include" > > > ignoring nonexistent directory "./include" > > > ignoring nonexistent directory > > > "/home/mykland/llvm-gcc/obj/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.1/include" > > > ignoring nonexistent directory > > > "/home/mykland/llvm-gcc/obj/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.1/../../../../i686-pc-linux-gnu/include" > > > ignoring nonexistent directory > > > "/home/mykland/llvm-gcc/obj/../install//include" > > > ignoring nonexistent directory > > > "/home/mykland/llvm-gcc/obj/../install//lib/gcc/i686-pc-linux-gnu/4.0.1/include" > > > ignoring nonexistent directory > > > "/home/mykland/llvm-gcc/obj/../install//lib/gcc/i686-pc-linux-gnu/4.0.1/../../../../i686-pc-linux-gnu/include" > > > ignoring duplicate directory "." > > > ignoring duplicate directory "../../llvm-gcc4-1.8-source/gcc/." > > > ignoring duplicate directory "/home/mykland/llvm/include" > > > #include "..." search starts here: > > > #include <...> search starts here: > > > . > > > ../../llvm-gcc4-1.8-source/gcc > > > ../../llvm-gcc4-1.8-source/gcc/../include > > > ../../llvm-gcc4-1.8-source/gcc/../libcpp/include > > > /home/mykland/llvm/include > > > /home/mykland/llvm-gcc/obj/gcc/include > > > /usr/local/include > > > /usr/include > > > End of search list. > > > GNU C version 4.0.1 LLVM (Apple Computer, Inc. build 5400) > > > (i686-pc-linux-gnu) > > > compiled by GNU C version 4.1.0 (SUSE Linux). > > > GGC heuristics: --param ggc-min-expand=99 --param > > > ggc-min-heapsize=129349 > > > Compiler executable checksum: b890601e6422e9101b52d960e6263283 > > > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:35:23: error: auto-host.h: No > > > such file or directory > > > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:40:21: error: tconfig.h: No > > > such file or directory > > > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:43:16: error: tm.h: No such > > > file or directory > > > In file included from ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:64: > > > ../../llvm-gcc4-1.8-source/gcc/libgcc2.h:214:3: error: #error "expand > > > the table"../../llvm-gcc4-1.8-source/gcc/libgcc2.c: In function > > > ‘__mulhi3’: > > > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:535: error: ‘BITS_PER_UNIT’ > > > undeclared (first use in this function) > > > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:535: error: (Each undeclared > > > identifier is reported only once > > > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:535: error: for each function > > > it appears in.) > > > > > > What now? > > > > > > Regards, > > > > > > -- Robert. > > > > > > > 2. Run that command manually with the -v option to print out the > > > > commands it is running > > > > 3. Debug gcc/cc1 and run it with the arguments shown in step 2 > > > > 4. Get a stack trace with "where" > > > > > > > > Reid. > > > > > > > > On Sun, 2006-11-05 at 20:15 -0800, Robert Mykland wrote: > > > > > > > > > > > > > I was having video problems, so upgraded my Linux box from SUSE 9.3, > > > > > where LLVM frontend 4 source built fine, to SUSE 10.1, where I got the > > > > > error message: > > > > > > > > > > ../../llvm-gcc4-1.8-source/gcc/libgcc2.c:541: internal compiler error: > > > > > Segmentation fault > > > > > Please submit a full bug report, > > > > > with preprocessed source if appropriate. > > > > > See <URL:http://llvm.org/bugs> for instructions. > > > > > > > > > > This version of SUSE uses version 4.1.0 of the gcc compiler. > > > > > > > > > > What now? > > > > > > > > > > -- Robert. > > > > > > > > > > _______________________________________________ > > > > > LLVM Developers mailing list > > > > > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > > > > > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > > > > > > > > > > > > _______________________________________________ > > > > LLVM Developers mailing list > > > > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > > > > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > LLVM Developers mailing list > > > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > > > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > > > > > _______________________________________________ > > LLVM Developers mailing list > > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Apparently Analagous Threads
- [LLVMdev] Problems building cfrontend 4 source on SUSE 10.1
- [LLVMdev] Problems building cfrontend 4 source on SUSE 10.1
- [LLVMdev] Problems building cfrontend 4 source on SUSE 10.1
- [LLVMdev] Problems building cfrontend 4 source on SUSE 10.1
- [LLVMdev] Fedora packaging problem