Subject: kern/24162: Cannot build kernel for AMD64; compat32 problem?
To: None <gnats-bugs@gnats.netbsd.org>
From: None <rkr@olib.org>
List: netbsd-bugs
Date: 01/19/2004 23:06:36
>Number: 24162
>Category: kern
>Synopsis: Cannot build kernel for AMD64; compat32 problem?
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jan 20 05:07:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: Richard Rauch
>Release: NetBSD 1.6ZG
>Organization:
"I probably don't know what I'm talking about." http://www.olib.org/~rkr/
>Environment:
System: NetBSD socrates 1.6ZG NetBSD 1.6ZG (socrates) #1: Wed Dec 31 15:24:34 CST 2003 root@socrates:/usr/netbsd/current/src/sys/arch/amd64/compile/obj.amd64/socrates amd64
Architecture: x86_64
Machine: amd64
>Description:
I tried to update my system last night, and again tonight, with the
same results. So, I am assuming that it's not a transient problem
or such.
The build fails when building a very-nearly-GENERIC kernel:
# compile socrates/exec_conf.o
/usr/netbsd/current/src/obj/tooldir.NetBSD-1.6ZG-x86_64/bin/x86_64--netbsd-gcc -mcmodel=kernel -mno-red-zone -ffreestanding -O2 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wno-sign-compare -Damd64 -Dx86_64 -I. -I/usr/netbsd/current/src/sys/arch -I/usr/netbsd/current/src/sys -nostdinc -DLKM -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -c /usr/netbsd/current/src/sys/kern/exec_conf.c
In file included from /usr/netbsd/current/src/sys/compat/netbsd32/netbsd32_exec.h:34,
from /usr/netbsd/current/src/sys/kern/exec_conf.c:157:
/usr/netbsd/current/src/sys/compat/netbsd32/netbsd32.h:556: error: parse error before "register64_t"
/usr/netbsd/current/src/sys/compat/netbsd32/netbsd32.h:556: warning: function declaration isn't a prototype
*** Failed target: exec_conf.o
*** Failed command: echo '# ' "compile socrates/exec_conf.o"; echo /usr/netbsd/current/src/obj/tooldir.NetBSD-1.6ZG-x86_64/bin/x86_64--netbsd-gcc -mcmodel=kernel -mno-red-zone -ffreestanding -O2 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wno-sign-compare -Damd64 -Dx86_64 -I. -I/usr/netbsd/current/src/sys/arch -I/usr/netbsd/current/src/sys -nostdinc -DLKM -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -c /usr/netbsd/current/src/sys/kern/exec_conf.c; /usr/netbsd/current/src/obj/tooldir.NetBSD-1.6ZG-x86_64/bin/x86_64--netbsd-gcc -mcmodel=kernel -mno-red-zone -ffreestanding -O2 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wno-sign-compare -Damd64 -Dx86_64 -I. -I/usr/netbsd/current/src/sys/arch -I/usr/netbsd/current/src/sys -nostdinc -DLKM -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -c /usr/netbsd/current/src/sys/kern/exec_conf.c
*** Error code 1
Stop.
nbmake: stopped in /usr/netbsd/current/src/sys/arch/amd64/compile/obj.amd64/socrates
ERROR: Failed to make all in /usr/netbsd/current/src/sys/arch/amd64/compile/obj.amd64/socrates
*** BUILD ABORTED ***
As near as I can tell, {register64_t} is defined ONLY for the SPARC
port.
>How-To-Repeat:
On NetBSD/amd64, attempt to build a kernel from recent sources.
(The line causing the error was committed about 3 or 4 days
ago, I believe.)
>Fix:
Probably just putting a
typedef long register64_t;
...in the amd64 types.h file will take care of that. (In fact,
I intend to do exactly that after I send this report, so that
I can continue the build.)
If you are not trying to build a distribution, as I am, it
would probably be enough to just not ask for 32-bit
compatibility in your kernel config.
>Release-Note:
>Audit-Trail:
>Unformatted: