Subject: port-amd64/35166: COMPAT_LINUX on 3.1/amd64
To: None <port-amd64-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <efnbp06@bn2.maus.net>
List: netbsd-bugs
Date: 12/01/2006 18:35:00
>Number: 35166
>Category: port-amd64
>Synopsis: amd64 kernel with COMPAT_LINUX enabled fails to compile
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-amd64-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Dec 01 18:35:00 +0000 2006
>Originator: Edgar Fuß
>Release: NetBSD 3.1
>Organization:
Mathematisches Institut der Universität Bonn
>Environment:
System: NetBSD weser.math.uni-bonn.de 3.1 NetBSD 3.1 (WAP05-Server-MP) #2: Tue N
ov 14 17:32:20 CET 2006 root@weser.math.uni-bonn.de:/usr/obj/sys/arch/amd64/comp
ile.amd64/wap05serv-mp amd64
Architecture: x86_64
Machine: amd64
>Description:
I can't imagine I'm the first to spot this. However, the only PRs I could find in port-amd64 that matched COMPAT_LINUX were two closed
ones relating to -current.
We would like to run our compute server on NetBSD/amd64 with
COMPAT_LINUX so as to be able to run commercial software (mainly
Mathematica) on that machine. We have 8GB RAM, so /i386 is not an
option.
A NetBSD 3.1/amd64 kernel fails to build if COMPAT_LINUX is enabled:
./build.sh -j 4 -m amd64 -u -T tooldir.NetBSD-3.1-x86_64 kernel=test
===> build.sh command: ./build.sh -j 4 -m amd64 -u -T tooldir.NetBSD-3.1-x86_64 kernel=test
===> build.sh started: Fri Dec 1 16:37:38 CET 2006
===> MACHINE: amd64
===> MACHINE_ARCH: x86_64
===> TOOLDIR path: /usr/src/tooldir.NetBSD-3.1-x86_64
===> DESTDIR path: /usr/src/destdir.amd64
===> RELEASEDIR path: /usr/src/releasedir
===> makewrapper: /usr/src/tooldir.NetBSD-3.1-x86_64/bin/nbmake-amd64
===> Updated /usr/src/tooldir.NetBSD-3.1-x86_64/bin/nbmake-amd64
===> Building kernel without building new tools
===> Building kernel: test
===> Build directory: /usr/src/sys/arch/amd64/compile/obj.amd64/test
Build directory is /usr/src/sys/arch/amd64/compile/obj.amd64/test
Don't forget to run "make depend"
depending the kern library objects
depending the compat library objects
--- __always_make_compatlib ---
--- __always_make_kernlib ---
--- exec_conf.o ---
--- init_sysent.o ---
--- kern_acct.o ---
--- kern_clock.o ---
--- exec_conf.o ---
# compile test/exec_conf.o
/usr/src/tooldir.NetBSD-3.1-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 -fno-zero-initialized-in-bss -Damd64 -Dx86_64 -I. -I/usr/src/sys/arch -I/usr/src/sys -nostdinc -DLKM -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -I/usr/src/sys/dist/ipf -c /usr/src/sys/kern/exec_conf.c
--- init_sysent.o ---
# compile test/init_sysent.o
/usr/src/tooldir.NetBSD-3.1-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 -fno-zero-initialized-in-bss -Damd64 -Dx86_64 -I. -I/usr/src/sys/arch -I/usr/src/sys -nostdinc -DLKM -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -I/usr/src/sys/dist/ipf -c /usr/src/sys/kern/init_sysent.c
--- kern_acct.o ---
# compile test/kern_acct.o
/usr/src/tooldir.NetBSD-3.1-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 -fno-zero-initialized-in-bss -Damd64 -Dx86_64 -I. -I/usr/src/sys/arch -I/usr/src/sys -nostdinc -DLKM -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -I/usr/src/sys/dist/ipf -c /usr/src/sys/kern/kern_acct.c
--- kern_clock.o ---
# compile test/kern_clock.o
/usr/src/tooldir.NetBSD-3.1-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 -fno-zero-initialized-in-bss -Damd64 -Dx86_64 -I. -I/usr/src/sys/arch -I/usr/src/sys -nostdinc -DLKM -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -I/usr/src/sys/dist/ipf -c /usr/src/sys/kern/kern_clock.c
--- exec_conf.o ---
/usr/src/sys/kern/exec_conf.c:467: error: `LINUX_ELF_AUX_ARGSIZ' undeclared here (not in a function)
/usr/src/sys/kern/exec_conf.c:467: error: initializer element is not constant
/usr/src/sys/kern/exec_conf.c:467: error: (near initialization for `execsw_builtin[3].es_arglen')
/usr/src/sys/kern/exec_conf.c:471: error: initializer element is not constant
/usr/src/sys/kern/exec_conf.c:471: error: (near initialization for `execsw_builtin[3]')
*** [exec_conf.o] Error code 1
1 error
nbmake: stopped in /usr/obj/sys/arch/amd64/compile.amd64/test
ERROR: Failed to make all in /usr/src/sys/arch/amd64/compile/obj.amd64/test
*** BUILD ABORTED ***
>How-To-Repeat:
Make a kernel config that equals 3.1/amd64/GENERIC plus COMPAT_LINUX,
try to build that kernel.
>Fix: