Problems building cfrontend 4 source on SUSE 10.1

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems building cfrontend 4 source on SUSE 10.1

Robert Mykland
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
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Problems building cfrontend 4 source on SUSE 10.1

Reid Spencer-2
Hi Robert,

Please make sure that you:

1. Completely rebuild LLVM (make clean; make reconfigure; make
tools-only)
2. Completely rebuild llvm-gcc (wipe out the build dir with rm -rf,
configure llvm-gcc
   and rebuild it)

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
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
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Problems building cfrontend 4 source on SUSE 10.1

Robert Mykland
Will do.

-- Robert.

Reid Spencer wrote:
Hi Robert,

Please make sure that you:

1. Completely rebuild LLVM (make clean; make reconfigure; make
tools-only)
2. Completely rebuild llvm-gcc (wipe out the build dir with rm -rf,
configure llvm-gcc 
   and rebuild it)

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
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
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
    

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev


  

-- 
Robert Mykland               Voice: (831) 462-6725
Founder/CTO                   Ascenium Corporation
"A new world of computing fulfilling people's lives"

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Problems building cfrontend 4 source on SUSE 10.1

Robert Mykland
In reply to this post by Reid Spencer-2
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@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.

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
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
    

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev


  

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Problems building cfrontend 4 source on SUSE 10.1

Reid Spencer-2
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@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.
> > 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
> > > [hidden email]         http://llvm.cs.uiuc.edu
> > > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> > >    
> >
> > _______________________________________________
> > LLVM Developers mailing list
> > [hidden email]         http://llvm.cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> >
> >
> >  
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Problems building cfrontend 4 source on SUSE 10.1

Scott Michel
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.

Basically, this is a "me too!"


-scooter
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Problems building cfrontend 4 source on SUSE 10.1

Robert Mykland
In reply to this post by Reid Spencer-2
Reid,

Here's the backtrace you asked for:

(gdb) bt
#0  0x0862d65c in llvm::LiveVariables::runOnMachineFunction ()
During symbol reading, incomplete CFI data; unspecified registers (e.g., eax) at 0x862d18c.
During symbol reading, incomplete CFI data; unspecified registers (e.g., ecx) at 0x862d18c.
During symbol reading, incomplete CFI data; unspecified registers (e.g., edx) at 0x862d18c.
#1  0x083d0339 in llvm::MachineFunctionPass::runOnFunction ()
During symbol reading, incomplete CFI data; unspecified registers (e.g., eax) at 0x83d031f.
During symbol reading, incomplete CFI data; unspecified registers (e.g., ecx) at 0x83d031f.
During symbol reading, incomplete CFI data; unspecified registers (e.g., edx) at 0x83d031f.
During symbol reading, incomplete CFI data; unspecified registers (e.g., ebp) at 0x83d031f.
During symbol reading, incomplete CFI data; unspecified registers (e.g., edi) at 0x83d031f.
#2  0x086fb4d7 in llvm::FunctionPassManagerT::runPass ()
During symbol reading, incomplete CFI data; unspecified registers (e.g., eax) at 0x86fb4c3.
During symbol reading, incomplete CFI data; unspecified registers (e.g., ecx) at 0x86fb4c3.
During symbol reading, incomplete CFI data; unspecified registers (e.g., edx) at 0x86fb4c3.
During symbol reading, incomplete CFI data; unspecified registers (e.g., ebx) at 0x86fb4c3.
During symbol reading, incomplete CFI data; unspecified registers (e.g., ebp) at 0x86fb4c3.
During symbol reading, incomplete CFI data; unspecified registers (e.g., esi) at 0x86fb4c3.
During symbol reading, incomplete CFI data; unspecified registers (e.g., edi) at 0x86fb4c3.
#3  0x087033f8 in llvm::PassManagerT<llvm::FTraits>::runPasses ()
During symbol reading, incomplete CFI data; unspecified registers (e.g., eax) at 0x870312c.
During symbol reading, incomplete CFI data; unspecified registers (e.g., ecx) at 0x870312c.
During symbol reading, incomplete CFI data; unspecified registers (e.g., edx) at 0x870312c.
#4  0x0870412f in llvm::PassManagerT<llvm::FTraits>::runOnUnit ()
During symbol reading, incomplete CFI data; unspecified registers (e.g., eax) at 0x8703daa.
During symbol reading, incomplete CFI data; unspecified registers (e.g., ecx) at 0x8703daa.
#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:

(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@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.
    
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
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
    
        
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev


  
      
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
    

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
  

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Problems building cfrontend 4 source on SUSE 10.1

Reid Spencer-2
In reply to this post by Scott Michel
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.


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Problems building cfrontend 4 source on SUSE 10.1

Reid Spencer-2
In reply to this post by Robert Mykland
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@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.
> > >    
> > > > 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
> > > > > [hidden email]         http://llvm.cs.uiuc.edu
> > > > > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> > > > >    
> > > > >        
> > > > _______________________________________________
> > > > LLVM Developers mailing list
> > > > [hidden email]         http://llvm.cs.uiuc.edu
> > > > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> > > >
> > > >
> > > >  
> > > >      
> > > _______________________________________________
> > > LLVM Developers mailing list
> > > [hidden email]         http://llvm.cs.uiuc.edu
> > > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> > >    
> >
> > _______________________________________________
> > LLVM Developers mailing list
> > [hidden email]         http://llvm.cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> >  
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Problems building cfrontend 4 source on SUSE 10.1

Scott Michel
In reply to this post by Reid Spencer-2
Reid Spencer wrote:
> I've run into this too, but it doesn't come up in practice if llvm-gcc
> would just build properly :)

Or if there weren't as much political intertia within the GCC release
process to integrate llvm as part of the standard tree. (I got an
incredible amount of blowback from one of the gcc release "engineers"
when I brought that topic up...)
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Problems building cfrontend 4 source on SUSE 10.1

Robert Mykland
In reply to this post by Reid Spencer-2
Reid,

Yes, I probably built a release version of LLVM and I probably should have built a debug version.  I will make sure I'm rebuilding both for debug and report back.  It's always the simple things...

Thanks,

-- Robert.

Reid Spencer wrote:
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@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.
    
        
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
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
    
        
            
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev


  
      
          
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
    
        
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
  
      
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
    

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
  

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Problems building cfrontend 4 source on SUSE 10.1

Robert Mykland
In reply to this post by Reid Spencer-2
Reid,

Unfortunately, rebuilding everything as a debug version didn't fix the problem.  Here's the new backtrace:

(gdb) bt
#0  0x0862d65c in llvm::LiveVariables::runOnMachineFunction ()
During symbol reading, incomplete CFI data; unspecified registers (e.g., eax) at 0x862d18c.
During symbol reading, incomplete CFI data; unspecified registers (e.g., ecx) at 0x862d18c.
During symbol reading, incomplete CFI data; unspecified registers (e.g., edx) at 0x862d18c.
#1  0x083d0339 in llvm::MachineFunctionPass::runOnFunction ()
During symbol reading, incomplete CFI data; unspecified registers (e.g., eax) at 0x83d031f.
During symbol reading, incomplete CFI data; unspecified registers (e.g., ecx) at 0x83d031f.
During symbol reading, incomplete CFI data; unspecified registers (e.g., edx) at 0x83d031f.
During symbol reading, incomplete CFI data; unspecified registers (e.g., ebp) at 0x83d031f.
During symbol reading, incomplete CFI data; unspecified registers (e.g., edi) at 0x83d031f.
#2  0x086fb4d7 in llvm::FunctionPassManagerT::runPass ()
During symbol reading, incomplete CFI data; unspecified registers (e.g., eax) at 0x86fb4c3.
During symbol reading, incomplete CFI data; unspecified registers (e.g., ecx) at 0x86fb4c3.
During symbol reading, incomplete CFI data; unspecified registers (e.g., edx) at 0x86fb4c3.
During symbol reading, incomplete CFI data; unspecified registers (e.g., ebx) at 0x86fb4c3.
During symbol reading, incomplete CFI data; unspecified registers (e.g., ebp) at 0x86fb4c3.
During symbol reading, incomplete CFI data; unspecified registers (e.g., esi) at 0x86fb4c3.
During symbol reading, incomplete CFI data; unspecified registers (e.g., edi) at 0x86fb4c3.
#3  0x087033f8 in llvm::PassManagerT<llvm::FTraits>::runPasses ()
During symbol reading, incomplete CFI data; unspecified registers (e.g., eax) at 0x870312c.
During symbol reading, incomplete CFI data; unspecified registers (e.g., ecx) at 0x870312c.
During symbol reading, incomplete CFI data; unspecified registers (e.g., edx) at 0x870312c.
#4  0x0870412f in llvm::PassManagerT<llvm::FTraits>::runOnUnit ()
During symbol reading, incomplete CFI data; unspecified registers (e.g., eax) at 0x8703daa.
During symbol reading, incomplete CFI data; unspecified registers (e.g., ecx) at 0x8703daa.
#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=46, argv=0xbf874104)
    at ../../llvm-gcc4-1.8-source/gcc/toplev.c:1171
#14 0x08096ad2 in main (argc=-1210384110, argv=0xb7db0112)
    at ../../llvm-gcc4-1.8-source/gcc/llvm-main.cpp:37

Other answers to your questions:

1. Did you configure llvm-gcc with the --enable-checking option?

No.  Here is my llvm-gcc configure command line:

 ../llvm-gcc4-1.8-source/configure --prefix=`pwd`/../install/ --enable-llvm=/home/mykland/llvm --enable-languages=c,c++ --disable-threads

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?

For llvm-gcc, I didn't supply this option.  It wasn't in the README.LLVM directions to use it.

3. Can you build an llvm Debug version and link llvm-gcc against it?

Yes -- built the debug version tools-only just fine.  After editing my Makefile.config to have it be a debug build, I went through the whole "make clean; make reconfigure; make tools-only" thing again.  Then I wiped out the llvm-gcc/obj file and reconfigured and remade llvm-gcc.

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.

Dunno.  Now looking unconnected to the mismatch between debug and release versions, unless this is a different problem with the same command.  Unlikely.

-- Robert.


Reid Spencer wrote:
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@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.
    
        
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
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
    
        
            
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev


  
      
          
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
    
        
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
  
      
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
    

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
  

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev