From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13814 invoked by alias); 27 Jun 2002 17:48:44 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 13756 invoked from network); 27 Jun 2002 17:48:42 -0000 Received: from unknown (HELO tigress.cdcgy.com) (209.167.52.146) by sources.redhat.com with SMTP; 27 Jun 2002 17:48:42 -0000 Received: from mail.cdcgy.com by tigress.cdcgy.com via smtpd (for sources.redhat.com [209.249.29.67]) with SMTP; 27 Jun 2002 17:48:42 UT Received: by CSDNT99.cdcgy.com with Internet Mail Service (5.5.2653.19) id ; Thu, 27 Jun 2002 11:47:39 -0600 Message-ID: <83E3831A88E65844B01DB1A73FB66F9301684637@CSDNT99.cdcgy.com> From: "Rude, Randy [Cont]" To: 'Andrew Cagney' Cc: gdb@sources.redhat.com Subject: RE: Problem building 5.2 for m68k-elf on Solaris Date: Thu, 27 Jun 2002 10:48:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-SW-Source: 2002-06/txt/msg00301.txt.bz2 > > $ ../gdb-5.2/configure --target=m68k-elf > >> [snip] > >> > >> $ make > >> [snip] > >> gcc -c -g -O2 -I/usr/include/v9 -I. -I../../gdb-5.2/gdb > >> -I../../gdb-5.2/gdb/config -DHAVE_CONFIG_H > >> -I../../gdb-5.2/gdb/../include/opcode > >> -I../../gdb-5.2/gdb/../readline/.. > >> -I../bfd -I../../gdb-5.2/gdb/../bfd -I../../gdb-5.2/gdb/../include > >> -I../intl -I../../gdb-5.2/gdb/../intl -DMI_OUT=1 -DUI_OUT=1 > >> -Wimplicit > >> -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses > >> -Wpointer-arith > >> -Wuninitialized ../../gdb-5.2/gdb/ser-unix.c > >> In file included from /usr/include/netinet/in.h:41, > >> from /usr/include/sys/socket.h:200, > >> from ../../gdb-5.2/gdb/ser-unix.c:29: > >> /usr/include/sys/stream.h:327: redefinition of `struct bcache' > >> gmake[1]: *** [ser-unix.o] Error 1 > >> > >> Randy > >> > > > > > > This is a namespace conflict. The Solaris stream.h defines > struct bcache > > which is also defined by GDB in bcache.h; the latter is > being included > > unnecessarily in the files ser-unix.c, ser-pipe.c, and ser-tcp.c. > > > > I was able to get the m68k-elf target to build by adding: > > > > #define BCACHE_H 1 > > > > at the top of each of these files. Not that I'd submit > that as a patch ;-) > > but this allows me to build native Solaris and m68k-elf targets. > > > > Hopefully someone more familiar with the code can come up > with a more > > elegant solution? > > Would you be able to determine/explain exactly how "bcache.h" > came to be > included? Looking at ser-*.c, nothing obvious jumped out. > bcache.h is: included from ../../work/gdb/symtab.h:31, from ../../work/gdb/value.h:270, from ../../work/gdb/gdbarch.h:41, from ../../work/gdb/defs.h:1035, from ../../work/gdb/ser-unix.c:22: Hope that helps. Randy