This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gcc 2.95.2 failes to compile
- To: gcc-bugs at gcc dot gnu dot org
- Subject: gcc 2.95.2 failes to compile
- From: "David C. M. Bilsby" <bilsby at signal dot dera dot gov dot uk>
- Date: Tue, 9 Nov 1999 09:41:51 +0000 (GMT)
- Reply-To: "David C. M. Bilsby" <bilsby at signal dot dera dot gov dot uk>
Hi,
I am having problems compiling the gcc-2.95.2 distribution on a SUN
UltraSPARC Solaris 2.6 system.
I obtained the source and extracted it into /opt/src/gnu/gcc-2.95.2. I
then proceeded to configure the source, and as suggested did so from a different
object directory. The configuration was as follows:
% gzcat gcc-2.95.2.tar.gx | tar -xvf -
% mkdir gcc-object
% cd gcc-object
% ../gcc-2.95.2/configure --prefix=/opt/gnu --with-cpu=ultrasparc --enable-haifa
% gmake bootstrap MAKE=gmake
During configuration, a previous installation of gcc (2.8.1) was
detected and used for the first stage compiler. I have however tried the SUN
v4.2 compiler with no success.
An initial problem encountered was that the make stopped claiming it
could not find fixinc.sh.
TARGET_MACHINE=sparc-sun-solaris2.6; srcdir=`cd ../../gcc-2.95.2/gcc; pwd`; \
INSTALL_ASSERT_H=install-assert-h; SHELL=/bin/sh ;\
export TARGET_MACHINE srcdir INSTALL_ASSERT_H SHELL ; \
/bin/sh ./fixinc.sh `pwd`/include /usr/include
./fixinc.sh: ./fixinc.sh: cannot open
gmake[2]: *** [stmp-fixinc] Error 1
gmake[2]: Leaving directory `/opt/src/gnu/gcc-object/gcc'
gmake[1]: *** [bootstrap] Error 2
gmake[1]: Leaving directory `/opt/src/gnu/gcc-object/gcc'
gmake: *** [bootstrap] Error 2
I solved this by copying the ../gcc-2.95.2/gcc/fixinc.sh to
gcc-object/gcc/fixinc.sh.
This fixed the compilation continued OK ultil it tried to execute
gengenrtl which failed with a segmentation fault.
(cd intl && gmake all)
gmake[3]: Entering directory `/opt/src/gnu/gcc-object/gcc/intl'
gmake[3]: Nothing to be done for `all'.
gmake[3]: Leaving directory `/opt/src/gnu/gcc-object/gcc/intl'
stage1/xgcc -Bstage1/ -B/opt/gnu/sparc-sun-solaris2.6/bin/ -c -DIN_GCC -DHAIFA
-DSVR4 -O2 -g -O2 -DHAVE_CONFIG_H -I. -I../../gcc-2.95.2/gcc
-I../../gcc-2.95.2/gcc/config -I../../gcc-2.95.2/gcc/../include \
../../gcc-2.95.2/gcc/gencheck.c
stage1/xgcc -Bstage1/ -B/opt/gnu/sparc-sun-solaris2.6/bin/ -DIN_GCC -DHAIFA
-DSVR4 -O2 -g -O2 -DHAVE_CONFIG_H -o gencheck \
gencheck.o ` case "obstack.o" in ?*) echo obstack.o ;; esac ` ` case "alloca.o"
in ?*) echo alloca.o ;; esac ` ` case "" in ?*) echo ;; esac ` ` case "" in
?*) echo ;; esac ` ` case "" in ?*) echo ;; esac `
./gencheck > tmp-check.h
../../gcc-2.95.2/gcc/move-if-change tmp-check.h tree-check.h
touch s-check
stage1/xgcc -Bstage1/ -B/opt/gnu/sparc-sun-solaris2.6/bin/ -c -DIN_GCC -DHAIFA
-DSVR4 -O2 -g -O2 -DHAVE_CONFIG_H -I. -I../../gcc-2.95.2/gcc
-I../../gcc-2.95.2/gcc/config -I../../gcc-2.95.2/gcc/../include
../../gcc-2.95.2/gcc/gengenrtl.c
stage1/xgcc -Bstage1/ -B/opt/gnu/sparc-sun-solaris2.6/bin/ -DIN_GCC -DHAIFA
-DSVR4 -O2 -g -O2 -DHAVE_CONFIG_H -o gengenrtl \
gengenrtl.o ` case "obstack.o" in ?*) echo obstack.o ;; esac ` ` case
"alloca.o" in ?*) echo alloca.o ;; esac ` ` case "" in ?*) echo ;; esac ` `
case "" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac `
./gengenrtl tmp-genrtl.h tmp-genrtl.c
gmake[2]: *** [s-genrtl] Segmentation Fault
gmake[2]: Leaving directory `/opt/src/gnu/gcc-object/gcc'
gmake[1]: *** [bootstrap] Error 2
gmake[1]: Leaving directory `/opt/src/gnu/gcc-object/gcc'
gmake: *** [bootstrap] Error 2
Running gengenrtl through gdb showed the following :
[/opt/src/gnu/gcc-object] cd gcc
[/opt/src/gnu/gcc-object/gcc] gdb gengenrtl
GNU gdb 4.17
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.6"...
Breakpoint 1 at 0x230f0
.gdbinit:8: Error in sourced command file:
../../gcc-2.95.2/gcc/.gdbinit:92: Error in sourced command file:
Function "fancy_abort" not defined.
(gdb) run tmp-genrtl.h tmp-genrtl.c
Starting program: /opt/src/gnu/gcc-object/gcc/gengenrtl tmp-genrtl.h
tmp-genrtl.c
Solaris 5.6 setup
Breakpoint 1 at 0xef7080a4
Program received signal SIGSEGV, Segmentation fault.
0x9de3bf90 in ?? ()
(gdb) bt
#0 0x9de3bf90 in ?? ()
#1 0x10b6c in gendecl (f=0x23240, format=0x12581 "e") at
../../gcc-2.95.2/gcc/gengenrtl.c:179
#2 0x10f44 in genheader (f=0x23240) at ../../gcc-2.95.2/gcc/gengenrtl.c:266
#3 0x11120 in main (argc=143936, argv=0xefffe354) at
../../gcc-2.95.2/gcc/gengenrtl.c:339
(gdb) up
#1 0x10b6c in gendecl (f=0x23240, format=0x12581 "e") at
../../gcc-2.95.2/gcc/gengenrtl.c:179
179 fprintf (f, ", %s arg%d", type_from_format (*p), i++);
(gdb) print *p
$1 = 101 'e'
(gdb) print i
$2 = 0
I hope I have included all the info required. Please don't hesitate to
contact me if you require more.
David.
-----------------------------------------------------------------------------
| Image Processing & Interpretation | David Bilsby (Senior Engineer) |
| email: d.bilsby@signal.dera.gov.uk | Defence Evaluation & Research Agency |
| Tel: +44 (1684) 896158 | Room E306, St Andrews Road, |
| Fax: +44 (1684) 894952 | Malvern, Worcs, WR14 3PS, ENGLAND |
-----------------------------------------------------------------------------
The Information contained in this e-mail and any subsequent correspondence
is private and is intended solely for the intended recipient(s). For those
other than the intended recipient any disclosure, copying, distribution, or
any action taken or omitted to be taken in reliance on such information is
prohibited and may be unlawful.
The views expressed herein are entirely those of the author and do not
represent the views, policy or understanding of any other person or
official body.