Can't build gdb-5.3: redefinition of `struct fpq', `struct fq', and `struct fpu'
Christian Joensson <[email protected]>
| Newsgroups | gmane.linux.aurora.devel |
|---|---|
| Message-ID | <[email protected]> |
Aurora SPARC Linux 1.0 (Ansel) SS20 dual SuperSparc-(II) sun4m:
binutils-2.11.93.0.2-11sparc
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
kernel-2.4.20-2.3sparcsmp
tcl-8.3.3-67
When trying to build gdb-5.3 on Aurora SPARC Linux 1.0 I get the
following problem:
gcc -v -save-temps -c -g -O2 -I. -I/home/chj/gdb-5.3/gdb -I/home/chj/gdb-5.3/gdb/config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I/home/chj/gdb-5.3/gdb/../include/opcode -I/home/chj/gdb-5.3/gdb/../readline/.. -I../bfd -I/home/chj/gdb-5.3/gdb/../bfd -I/home/chj/gdb-5.3/gdb/../include -I../intl -I/home/chj/gdb-5.3/gdb/../intl -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE -DMI_OUT=1 -DUI_OUT=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized /home/chj/gdb-5.3/gdb/sparc-nat.c
Reading specs from /usr/lib/gcc-lib/sparc64-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-113)
/usr/lib/gcc-lib/sparc64-redhat-linux/2.96/cpp0 -lang-c -v -I. -I/home/chj/gdb-5.3/gdb -I/home/chj/gdb-5.3/gdb/config -I/home/chj/gdb-5.3/gdb/../include/opcode -I/home/chj/gdb-5.3/gdb/../readline/.. -I../bfd -I/home/chj/gdb-5.3/gdb/../bfd -I/home/chj/gdb-5.3/gdb/../include -I../intl -I/home/chj/gdb-5.3/gdb/../intl -D__GNUC__=2 -D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -D_LONGLONG -D__sparc__ -Dlinux -D__ELF__ -D__unix__ -D_LONGLONG -D__sparc__ -D__linux__ -D__unix -D__linux -Asystem(unix) -Asystem(posix) -D__OPTIMIZE__ -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized -D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int -D__GCC_NEW_VARARGS__ -Acpu(sparc) -Amachine(sparc) -DLOCALEDIR="/usr/local/share/locale" -DHAVE_CONFIG_H -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE -DMI_OUT=1 -DUI_OUT=1 /home/chj/gdb-5.3/gdb/sparc-nat.c sparc-nat.i
GNU CPP version 2.96 20000731 (Red Hat Linux 7.3 2.96-113) (cpplib) (sparc64 GNU/Linux with ELF)
ignoring nonexistent directory "/usr/sparc64-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
.
/home/chj/gdb-5.3/gdb
/home/chj/gdb-5.3/gdb/config
/home/chj/gdb-5.3/include/opcode
/home/chj/gdb-5.3/
../bfd
/home/chj/gdb-5.3/bfd
/home/chj/gdb-5.3/include
../intl
/home/chj/gdb-5.3/intl
/usr/local/include
/usr/lib/gcc-lib/sparc64-redhat-linux/2.96/include
/usr/include
End of search list.
/usr/lib/gcc-lib/sparc-redhat-linux/2.96/cc1 sparc-nat.i -gstabs+ -quiet -dumpbase sparc-nat.c -g -O2 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized -version -o sparc-nat.s
GNU C version 2.96 20000731 (Red Hat Linux 7.3 2.96-113) (sparc-redhat-linux) compiled by GNU C version 2.96 20000731 (Red Hat Linux 7.3 2.96-113).
In file included from /usr/include/asm/reg.h:6,
from /home/chj/gdb-5.3/gdb/sparc-nat.c:36:
/usr/include/asm-sparc/reg.h:40: redefinition of `struct fpq'
/usr/include/asm-sparc/reg.h:45: redefinition of `struct fq'
/usr/include/asm-sparc/reg.h:75: redefinition of `struct fpu'
/home/chj/gdb-5.3/gdb/sparc-nat.c: In function `fetch_inferior_registers':
/home/chj/gdb-5.3/gdb/sparc-nat.c:103: warning: implicit declaration of function `memcpy'
make[1]: *** [sparc-nat.o] Error 1
make[1]: Target `all' not remade because of errors.
make[1]: Leaving directory `/home/chj/objdir-gdb-5.3/gdb'
make: *** [all-gdb] Error 2
make: Target `all' not remade because of errors.
Compilation exited abnormally with code 2 at Thu Feb 27 13:17:46
A similar situation occurs for gdb cvs trunk and also for target
sparc64-linux.
As can be seen from the attached file, all these structs are first
defined in /usr/include/sys/ucontext.h, and then again (the same
definitions though) in /usr/include/asm-sparc/reg.h.
I haven't checked yet, but I'm sure the same is happening for target
sparc64 and for cvs trunk of gdb.
Now, this might be a matter of syncing glibc-devel-2.2.5-42, which is
the package that has /usr/include/sys/ucontext.h in it, and
glibc-kernheaders-2.4-7.16sparc, which is the package having
/usr/include/asm-sparc/reg.h in it. Or, this might be a problem of gdb
and then we're out of luck right now...
Cheers,
/ChJ
sparc-nat.i.gz
(application/x-gzip, 53.7 KB) - not displayed