Can't build gdb CVS sources for {sparc64,sparc}-linux, redefinition of structs in reg.h

Christian Jönsson <[email protected]>
Newsgroups gmane.linux.aurora.devel,gmane.comp.gdb.devel
Message-ID <[email protected]>
I've tried to build both gdb-5.3 and gdb cvs trunk for sparc64-linux
and sparc-linux on Aurora SPARC Linux 1.0 (based on Red Hat Linux 7.X)
both on sun4u and sun4m respectively:

This was on a Aurora SPARC Linux 1.0 (Ansel) Ultra1 single UltraSparc I
sun4u system with these packages:

binutils 2.13.90 20030202 sparc64-linux
bison-1.35-1
dejagnu-1.4.2-10 (ftp://ftp.redhat.com/pub/redhat/linux/rawhide/SRPMS/SRPMS)
expect-5.32.2-67
gcc-2.96-113
glibc-2.2.5-42
glibc-kernheaders-2.4-7.16sparc
glibc64-2.2.5-42
kernel-2.4.19-1.2sparc (from Aurora SPARC Linux 0.42)
tcl-8.3.3-67

In-tree joined gcc, binutils and gdb cvs trunks.

gcc -m64 -c -g -O2    -I. -I/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb -I/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/config -DLOCALEDIR="\"/usr/local/gcc-binutils/share/locale\"" -DHAVE_CONFIG_H -I/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/../include/opcode -I/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/../readline/.. -I../bfd -I/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/../bfd  -I/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/../include -I../intl -I/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/../intl  -DMI_OUT=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized  /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c
In file included from /usr/include/asm/reg.h:4,
                 from /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:36:
/usr/include/asm-sparc64/reg.h:49: redefinition of `struct fpu'
/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c: In function `fetch_inferior_registers':
/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:99: warning: cast from pointer to integer of different size
/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:103: warning: implicit declaration of function `memcpy'
/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:106: structure has no member named `r_ps'
/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:108: structure has no member named `r_pc'
/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:110: structure has no member named `r_npc'
/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:111: `registers' undeclared (first use in this function)
/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:111: (Each undeclared identifier is reported only once
/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:111: for each function it appears in.)
/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:132: warning: cast from pointer to integer of different size
/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c: In function `store_inferior_registers':
/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:257: structure has no member named `r_ps'
/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:259: structure has no member named `r_pc'
/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:261: structure has no member named `r_npc'
/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:267: warning: cast from pointer to integer of different size
/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:283: warning: cast from pointer to integer of different size
/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c: In function `fetch_core_registers':
/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:317: structure has no member named `r_ps'
/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:318: structure has no member named `r_pc'
/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:319: structure has no member named `r_npc'
make[2]: *** [sparc-nat.o] Error 1
make[2]: Leaving directory `/usr/local/src/gcc-binutils/trunk/objdir/gdb'
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory `/usr/local/src/gcc-binutils/trunk/objdir'
make: *** [bootstrap-lean] Error 2

This was on a Aurora SPARC Linux 1.0 (Ansel) SS20 dual SuperSparc-(II)
sun4m system with these packages:

binutils 2.13.90 20030122 sparc-linux
bison-1.35-1
dejagnu-1.4.2-10 (ftp://ftp.redhat.com/pub/redhat/linux/rawhide/SRPMS/SRPMS)
expect-5.32.2-67
gcc 3.4 20030122 (experimental) sparc-linux
glibc-2.2.5-42
kernel-2.4.19-1.2sparc (from Aurora SPARC Linux 0.42)
glibc64-2.2.5-42
kernel-2.4.20-2.3sparcsmp
tcl-8.3.3-67

In-tree joined gcc, binutils and gdb cvs trunks.


gcc -c -g -O2    -I. -I/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb -I/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/config -DLOCALEDIR="\"/usr/local/gcc-binutils/share/locale\"" -DHAVE_CONFIG_H -I/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/../include/opcode -I/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/../readline/.. -I../bfd -I/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/../bfd  -I/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/../include -I../intl -I/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/../intl  -DMI_OUT=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized  /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c
In file included from /usr/include/asm/reg.h:6,
                 from /usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:36:
/usr/include/asm-sparc/reg.h:40: error: redefinition of `struct fpq'
/usr/include/asm-sparc/reg.h:45: error: redefinition of `struct fq'
/usr/include/asm-sparc/reg.h:75: error: redefinition of `struct fpu'
/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c: In function `fetch_inferior_registers':
/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:103: warning: implicit declaration of function `memcpy'
/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:111: error: `registers' undeclared (first use in this function)
/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:111: error: (Each undeclared identifier is reported only once
/usr/local/src/gcc-binutils/trunk/gcc-binutils-gdb/gdb/sparc-nat.c:111: error: for each function it appears in.)
make[2]: *** [sparc-nat.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/usr/local/src/gcc-binutils/trunk/objdir/gdb'
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory `/usr/local/src/gcc-binutils/trunk/objdir'
make: *** [bootstrap-lean] Error 2


Any ideas of what goes wrong?

Cheers,

/ChJ
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.