Subject: bin/14639: usr.bin/kdump/setemul.c doesn't compile on a.out systems
To: None <gnats-bugs@gnats.netbsd.org>
From: Ben Harris <bjh21@netbsd.org>
List: netbsd-bugs
Date: 11/19/2001 12:00:25
>Number:         14639
>Category:       bin
>Synopsis:       usr.bin/kdump/setemul.c doesn't compile on a.out systems
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 19 04:01:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Ben Harris
>Release:        2001-11-17
>Organization:
>Environment:
Compiling NetBSD/acorn32 natively.

>Description:
When building usr.bin/kdump/setemul.c, the following happens:

--------8<--------
dependall ===> usr.bin/kdump
CC="cc" DESTDIR= /bin/sh /usr/src/usr.bin/kdump/../kdump/mkioctls  /usr/include/sys/ioctl.h  /usr/include/sys/ioctl_compat.h > ioctl.c
mkdep -a  -I/usr/src/usr.bin/kdump/../ktrace -I/usr/src/usr.bin/kdump/../../sys   /usr/src/usr.bin/kdump/kdump.c ioctl.c /usr/src/usr.bin/kdump/../ktrace/subr.c /usr/src/usr.bin/kdump/setemul.c
cc -O2  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Werror   -I/usr/src/usr.bin/kdump/../ktrace -I/usr/src/usr.bin/kdump/../../sys   -c /usr/src/usr.bin/kdump/kdump.c
cc -O2  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Werror   -I/usr/src/usr.bin/kdump/../ktrace -I/usr/src/usr.bin/kdump/../../sys   -c ioctl.c
cc -O2  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Werror   -I/usr/src/usr.bin/kdump/../ktrace -I/usr/src/usr.bin/kdump/../../sys   -c /usr/src/usr.bin/kdump/../ktrace/subr.c
cc -O2  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Werror   -I/usr/src/usr.bin/kdump/../ktrace -I/usr/src/usr.bin/kdump/../../sys   -c /usr/src/usr.bin/kdump/setemul.c
In file included from /usr/src/usr.bin/kdump/setemul.c:109:
/usr/src/usr.bin/kdump/../../sys/compat/netbsd32/netbsd32_syscalls.c:11: redefinition of `rcsid0'
/usr/src/usr.bin/kdump/../../sys/kern/syscalls.c:11: `rcsid0' previously defined here
cc1: warnings being treated as errors
/usr/src/usr.bin/kdump/../../sys/compat/netbsd32/netbsd32_syscalls.c:11: warning: initializer-string for array of chars is too long
In file included from /usr/src/usr.bin/kdump/setemul.c:110:
/usr/src/usr.bin/kdump/../../sys/compat/freebsd/freebsd_syscalls.c:11: redefinition of `rcsid0'
/usr/src/usr.bin/kdump/../../sys/compat/netbsd32/netbsd32_syscalls.c:11: `rcsid0' previously defined here
/usr/src/usr.bin/kdump/../../sys/compat/freebsd/freebsd_syscalls.c:11: warning: initializer-string for array of chars is too long
In file included from /usr/src/usr.bin/kdump/setemul.c:111:
/usr/src/usr.bin/kdump/../../sys/compat/hpux/hpux_syscalls.c:11: redefinition of `rcsid0'
/usr/src/usr.bin/kdump/../../sys/compat/freebsd/freebsd_syscalls.c:11: `rcsid0' previously defined here
/usr/src/usr.bin/kdump/../../sys/compat/hpux/hpux_syscalls.c:11: warning: initializer-string for array of chars is too long
In file included from /usr/src/usr.bin/kdump/setemul.c:112:
/usr/src/usr.bin/kdump/../../sys/compat/ibcs2/ibcs2_syscalls.c:11: redefinition of `rcsid0'
/usr/src/usr.bin/kdump/../../sys/compat/hpux/hpux_syscalls.c:11: `rcsid0' previously defined here
/usr/src/usr.bin/kdump/../../sys/compat/ibcs2/ibcs2_syscalls.c:11: warning: initializer-string for array of chars is too long
In file included from /usr/src/usr.bin/kdump/setemul.c:114:
/usr/src/usr.bin/kdump/../../sys/compat/osf1/osf1_syscalls.c:11: redefinition of `rcsid0'
/usr/src/usr.bin/kdump/../../sys/compat/ibcs2/ibcs2_syscalls.c:11: `rcsid0' previously defined here
/usr/src/usr.bin/kdump/../../sys/compat/osf1/osf1_syscalls.c:11: warning: initializer-string for array of chars is too long
In file included from /usr/src/usr.bin/kdump/setemul.c:115:
/usr/src/usr.bin/kdump/../../sys/compat/sunos/sunos_syscalls.c:11: redefinition of `rcsid0'
/usr/src/usr.bin/kdump/../../sys/compat/osf1/osf1_syscalls.c:11: `rcsid0' previously defined here
/usr/src/usr.bin/kdump/../../sys/compat/sunos/sunos_syscalls.c:11: warning: initializer-string for array of chars is too long
In file included from /usr/src/usr.bin/kdump/setemul.c:116:
/usr/src/usr.bin/kdump/../../sys/compat/sunos32/sunos32_syscalls.c:11: redefinition of `rcsid0'
/usr/src/usr.bin/kdump/../../sys/compat/sunos/sunos_syscalls.c:11: `rcsid0' previously defined here
/usr/src/usr.bin/kdump/../../sys/compat/sunos32/sunos32_syscalls.c:11: warning: initializer-string for array of chars is too long
In file included from /usr/src/usr.bin/kdump/setemul.c:117:
/usr/src/usr.bin/kdump/../../sys/compat/svr4/svr4_syscalls.c:11: redefinition of `rcsid0'
/usr/src/usr.bin/kdump/../../sys/compat/sunos32/sunos32_syscalls.c:11: `rcsid0' previously defined here
/usr/src/usr.bin/kdump/../../sys/compat/svr4/svr4_syscalls.c:11: warning: initializer-string for array of chars is too long
In file included from /usr/src/usr.bin/kdump/setemul.c:118:
/usr/src/usr.bin/kdump/../../sys/compat/svr4_32/svr4_32_syscalls.c:11: redefinition of `rcsid0'
/usr/src/usr.bin/kdump/../../sys/compat/svr4/svr4_syscalls.c:11: `rcsid0' previously defined here
/usr/src/usr.bin/kdump/../../sys/compat/svr4_32/svr4_32_syscalls.c:11: warning: initializer-string for array of chars is too long
In file included from /usr/src/usr.bin/kdump/setemul.c:119:
/usr/src/usr.bin/kdump/../../sys/compat/ultrix/ultrix_syscalls.c:11: redefinition of `rcsid0'
/usr/src/usr.bin/kdump/../../sys/compat/svr4_32/svr4_32_syscalls.c:11: `rcsid0' previously defined here
/usr/src/usr.bin/kdump/../../sys/compat/ultrix/ultrix_syscalls.c:11: warning: initializer-string for array of chars is too long
In file included from /usr/src/usr.bin/kdump/setemul.c:121:
/usr/src/usr.bin/kdump/../../sys/compat/hpux/hpux_errno.c:46: redefinition of `rcsid0'
/usr/src/usr.bin/kdump/../../sys/compat/ultrix/ultrix_syscalls.c:11: `rcsid0' previously defined here
In file included from /usr/src/usr.bin/kdump/setemul.c:122:
/usr/src/usr.bin/kdump/../../sys/compat/svr4/svr4_errno.c:44: redefinition of `rcsid0'
/usr/src/usr.bin/kdump/../../sys/compat/hpux/hpux_errno.c:46: `rcsid0' previously defined here
In file included from /usr/src/usr.bin/kdump/setemul.c:123:
/usr/src/usr.bin/kdump/../../sys/compat/ibcs2/ibcs2_errno.c:35: redefinition of `rcsid0'
/usr/src/usr.bin/kdump/../../sys/compat/svr4/svr4_errno.c:44: `rcsid0' previously defined here
In file included from /usr/src/usr.bin/kdump/setemul.c:124:
/usr/src/usr.bin/kdump/../../sys/compat/linux/common/linux_errno.c:40: redefinition of `rcsid0'
/usr/src/usr.bin/kdump/../../sys/compat/ibcs2/ibcs2_errno.c:35: `rcsid0' previously defined here
/usr/src/usr.bin/kdump/../../sys/compat/linux/common/linux_errno.c:40: warning: initializer-string for array of chars is too long
*** Error code 1

Stop.
make: stopped in /usr/src/usr.bin/kdump
-------->8--------

The problem is that all the *_syscalls.c files use __KERNEL_RCSID(0, ...).
The "0" needs to vary between them, which will need work on
makesyscalls.sh.  I suspect there's no reason why that parameter need be
an integer, so using (e.g.) the name of the syscallnames structure here
might be sensible.

The *_errno.c files are maintained manually, so they should be easier to
fix.

>How-To-Repeat:
Compile kdump on acorn32 (and probably any other a.out platform).

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted: