From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18190 invoked by alias); 25 Aug 2003 06:57:22 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 18155 invoked from network); 25 Aug 2003 06:57:08 -0000 Received: from unknown (HELO u1sparc.j-son.org) (213.64.105.80) by sources.redhat.com with SMTP; 25 Aug 2003 06:57:08 -0000 Received: (from chj@localhost) by u1sparc.j-son.org (8.11.6/8.11.6) id h7P6v5A17912; Mon, 25 Aug 2003 08:57:05 +0200 Date: Mon, 25 Aug 2003 06:57:00 -0000 From: Christian Joensson To: GDB list Cc: Nix , gdb-gnats@sources.redhat.com, gdb-patches@sources.redhat.com Subject: Re: build/955: build failure with GDB-5.3: sparc-nat.c structure redefinition errors with sparc64-linux, glibc-2.2.x Message-ID: <20030825085704.A14976@u1sparc.j-son.org> References: <20030427150800.19859.qmail@sources.redhat.com> <20030427153321.GA3394@nevyn.them.org> <20030510095712.A19164@u1sparc.j-son.org> <20030510153527.A5854@u1sparc.j-son.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030510153527.A5854@u1sparc.j-son.org>; from c.christian.joensson@telia.com on Sat, May 10, 2003 at 03:35:27PM +0200 X-SW-Source: 2003-08/txt/msg00430.txt.bz2 On Sat, May 10, 2003 at 03:35:27PM +0200, Christian Joensson wrote: > On Sat, May 10, 2003 at 09:57:12AM +0200, Christian Joensson wrote: > > On Sun, Apr 27, 2003 at 11:33:21AM -0400, Daniel Jacobowitz wrote: > > > On Sun, Apr 27, 2003 at 03:08:00PM -0000, Nix wrote: > > > > The following reply was made to PR build/955; it has been noted by GNATS. > > > > > > > > From: Nix > > > > To: Christian =?iso-8859-1?q?J=F6nsson?= > > > > Cc: , , > > > > , > > > > Subject: Re: build/955: build failure with GDB-5.3: sparc-nat.c structure redefinition errors with sparc64-linux, glibc-2.2.x > > > > Date: 27 Apr 2003 15:45:01 +0100 > > > > > > > > On Sun, 27 Apr 2003, Christian Jönsson spake: > > > > > http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&databas > > > > > e=gdb&pr=955 > > > > > > > > > > Is *anything* happening on this issue in gdb cvs HEAD? > > > > > > > > My apologies for not following up; this patch, abstracted from Debian > > > > (where fading memory tells me it is due to Daniel Jacobowitz), fixes it, > > > > but is probably too ugly to go in; the incompatibility test should > > > > really be done by configure: > > > > > > Right on the origin and ugliness counts, which is why I never got > > > around to doing anything about it. But it's better than nothing, since > > > it lets sparc-linux build, so I suppose it should go in... does anyone object? > > > > > > > Index: gdb/gdb/sparc-nat.c > > > > =================================================================== > > > > RCS file: /cvs/src/src/gdb/sparc-nat.c,v > > > > retrieving revision 1.13.12.1 > > > > diff -u -r1.13.12.1 sparc-nat.c > > > > --- gdb/gdb/sparc-nat.c 3 Dec 2002 22:35:49 -0000 1.13.12.1 > > > > +++ gdb/gdb/sparc-nat.c 27 Apr 2003 14:39:53 -0000 > > > > @@ -33,6 +33,13 @@ > > > > #include > > > > #include > > > > #ifdef __linux__ > > > > +/* Sadly, conflicts with on Linux. And > > > > + -D_GNU_SOURCE brings in implicitly with . > > > > + Hack around this. */ > > > > +#undef FPU_REGS_TYPE > > > > +#define fpu asm_reg_fpu > > > > +#define fq asm_reg_fq > > > > +#define fpq asm_reg_fpq > > > > #include > > > > #else > > > > #include > > > > > > > > > > > > -- > > > > `It is an unfortunate coincidence that the date locarchive.h was > > > > written (in hex) matches Ritchie's birthday (in octal).' > > > > -- Roland McGrath on the libc-alpha list > > > > > > > > > > -- > > > Daniel Jacobowitz > > > MontaVista Software Debian GNU/Linux Developer > > > > ping... how's it going? > > > > I just thougt I'd test your suggested patch... it still fails... > > This is how the compile stops with error in the current gdb cvs HEAD: > > gcc -c -g -O2 -I. -I/home/chj/src/gdb -I/home/chj/src/gdb/config -DLOCALEDIR="\"/usr/local/gcc-binutils/share/locale\"" -DHAVE_CONFIG_H -I/home/chj/src/gdb/../include/opcode -I/home/chj/src/gdb/../readline/.. -I../bfd -I/home/chj/src/gdb/../bfd -I/home/chj/src/gdb/../include -I../intl -I/home/chj/src/gdb/../intl -DMI_OUT=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized /home/chj/src/gdb/sparc-nat.c > In file included from /usr/include/asm/reg.h:4, > from /home/chj/src/gdb/sparc-nat.c:36: > /usr/include/asm-sparc64/reg.h:49: error: redefinition of `struct fpu' > /home/chj/src/gdb/sparc-nat.c: In function `fetch_inferior_registers': > /home/chj/src/gdb/sparc-nat.c:99: warning: cast from pointer to integer of different size > /home/chj/src/gdb/sparc-nat.c:103: warning: implicit declaration of function `memcpy' > /home/chj/src/gdb/sparc-nat.c:106: error: structure has no member named `r_ps' > /home/chj/src/gdb/sparc-nat.c:108: error: structure has no member named `r_pc' > /home/chj/src/gdb/sparc-nat.c:110: error: structure has no member named `r_npc' > /home/chj/src/gdb/sparc-nat.c:111: error: `registers' undeclared (first use in this function) > /home/chj/src/gdb/sparc-nat.c:111: error: (Each undeclared identifier is reported only once > /home/chj/src/gdb/sparc-nat.c:111: error: for each function it appears in.) > /home/chj/src/gdb/sparc-nat.c:132: warning: cast from pointer to integer of different size > /home/chj/src/gdb/sparc-nat.c: In function `store_inferior_registers': > /home/chj/src/gdb/sparc-nat.c:257: error: structure has no member named `r_ps' > /home/chj/src/gdb/sparc-nat.c:259: error: structure has no member named `r_pc' > /home/chj/src/gdb/sparc-nat.c:261: error: structure has no member named `r_npc' > /home/chj/src/gdb/sparc-nat.c:267: warning: cast from pointer to integer of different size > /home/chj/src/gdb/sparc-nat.c:283: warning: cast from pointer to integer of different size > /home/chj/src/gdb/sparc-nat.c: In function `fetch_core_registers': > /home/chj/src/gdb/sparc-nat.c:317: error: structure has no member named `r_ps' > /home/chj/src/gdb/sparc-nat.c:318: error: structure has no member named `r_pc' > /home/chj/src/gdb/sparc-nat.c:319: error: structure has no member named `r_npc' > make[1]: *** [sparc-nat.o] Error 1 > make[1]: Leaving directory `/usr/local/src/gcc-binutils/trunk/objdir-gdb/gdb' > make: *** [all-gdb] Error 2 > > and with your suggested patch, still we have: > > gcc -c -g -O2 -I. -I/home/chj/src/gdb -I/home/chj/src/gdb/config -DLOCALEDIR="\"/usr/local/gcc-binutils/share/locale\"" -DHAVE_CONFIG_H -I/home/chj/src/gdb/../include/opcode -I/home/chj/src/gdb/../readline/.. -I../bfd -I/home/chj/src/gdb/../bfd -I/home/chj/src/gdb/../include -I../intl -I/home/chj/src/gdb/../intl -DMI_OUT=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized /home/chj/src/gdb/sparc-nat.c > /home/chj/src/gdb/sparc-nat.c: In function `fetch_inferior_registers': > /home/chj/src/gdb/sparc-nat.c:106: warning: cast from pointer to integer of different size > /home/chj/src/gdb/sparc-nat.c:110: warning: implicit declaration of function `memcpy' > /home/chj/src/gdb/sparc-nat.c:113: error: structure has no member named `r_ps' > /home/chj/src/gdb/sparc-nat.c:115: error: structure has no member named `r_pc' > /home/chj/src/gdb/sparc-nat.c:117: error: structure has no member named `r_npc' > /home/chj/src/gdb/sparc-nat.c:118: error: `registers' undeclared (first use in this function) > /home/chj/src/gdb/sparc-nat.c:118: error: (Each undeclared identifier is reported only once > /home/chj/src/gdb/sparc-nat.c:118: error: for each function it appears in.) > /home/chj/src/gdb/sparc-nat.c:139: warning: cast from pointer to integer of different size > /home/chj/src/gdb/sparc-nat.c: In function `store_inferior_registers': > /home/chj/src/gdb/sparc-nat.c:264: error: structure has no member named `r_ps' > /home/chj/src/gdb/sparc-nat.c:266: error: structure has no member named `r_pc' > /home/chj/src/gdb/sparc-nat.c:268: error: structure has no member named `r_npc' > /home/chj/src/gdb/sparc-nat.c:274: warning: cast from pointer to integer of different size > /home/chj/src/gdb/sparc-nat.c:290: warning: cast from pointer to integer of different size > /home/chj/src/gdb/sparc-nat.c: In function `fetch_core_registers': > /home/chj/src/gdb/sparc-nat.c:324: error: structure has no member named `r_ps' > /home/chj/src/gdb/sparc-nat.c:325: error: structure has no member named `r_pc' > /home/chj/src/gdb/sparc-nat.c:326: error: structure has no member named `r_npc' > make[1]: *** [sparc-nat.o] Error 1 > make[1]: Leaving directory `/usr/local/src/gcc-binutils/trunk/objdir-gdb/gdb' > make: *** [all-gdb] Error 2 > uhm, just tried gdb cvs HEAD, as of Sun Aug 24 12:01:38 UTC 2003, same thing: gcc -c -g -O2 -I. -I/home/chj/src/gdb -I/home/chj/src/gdb/config -DLOCALEDIR="\"/usr/local/gcc-binutils/share/locale\"" -DHAVE_CONFIG_H -I/home/chj/src/gdb/../include/opcode -I/home/chj/src/gdb/../readline/.. -I../bfd -I/home/chj/src/gdb/../bfd -I/home/chj/src/gdb/../include -I../intl -I/home/chj/src/gdb/../intl -DMI_OUT=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral /home/chj/src/gdb/sparc-nat.c In file included from /usr/include/asm/reg.h:7, from /home/chj/src/gdb/sparc-nat.c:38: /usr/include/asm-sparc64/reg.h:49: error: redefinition of `struct fpu' /home/chj/src/gdb/sparc-nat.c: In function `fetch_inferior_registers': /home/chj/src/gdb/sparc-nat.c:101: warning: cast from pointer to integer of different size /home/chj/src/gdb/sparc-nat.c:105: warning: implicit declaration of function `memcpy' /home/chj/src/gdb/sparc-nat.c:108: error: structure has no member named `r_ps' /home/chj/src/gdb/sparc-nat.c:110: error: structure has no member named `r_pc' /home/chj/src/gdb/sparc-nat.c:112: error: structure has no member named `r_npc' /home/chj/src/gdb/sparc-nat.c:134: warning: cast from pointer to integer of different size /home/chj/src/gdb/sparc-nat.c: In function `store_inferior_registers': /home/chj/src/gdb/sparc-nat.c:259: error: structure has no member named `r_ps' /home/chj/src/gdb/sparc-nat.c:261: error: structure has no member named `r_pc' /home/chj/src/gdb/sparc-nat.c:263: error: structure has no member named `r_npc' /home/chj/src/gdb/sparc-nat.c:269: warning: cast from pointer to integer of different size /home/chj/src/gdb/sparc-nat.c:285: warning: cast from pointer to integer of different size /home/chj/src/gdb/sparc-nat.c: In function `fetch_core_registers': /home/chj/src/gdb/sparc-nat.c:319: error: structure has no member named `r_ps' /home/chj/src/gdb/sparc-nat.c:320: error: structure has no member named `r_pc' /home/chj/src/gdb/sparc-nat.c:321: error: structure has no member named `r_npc' make[1]: *** [sparc-nat.o] Error 1 make[1]: Leaving directory `/usr/local/src/gcc-binutils/trunk/objdir-gdb/gdb' make: *** [all-gdb] Error 2 Any help? Cheers, /ChJ