Subject: Problem building COMPAT_LINUX code natively on alpha
To: None <port-alpha@NetBSD.org>
From: Lars Nordlund <lars.nordlund@hem.utfors.se>
List: port-alpha
Date: 05/08/2005 23:07:15
Hello

Building a kernel (from -current sources) containing 'options
COMPAT_LINUX' fails on my NetBSD/alpha 3.99.3. Cross-building
(i386->alpha) the same kernel config on my i386 succeeds. Anyone else
seeing this?

#   compile  ARDBEG/linux_signal.o
/home/lars/tmp/obj_alpha/tools/tools.NetBSD-alpha/bin/alpha--netbsd-gcc -pi=
pe -mno-fp-regs -ffreestanding -mcpu=3D21164a -O2 -pipe -Werror -Wall -Wno-=
main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-=
prototypes -Wno-sign-compare -fno-zero-initialized-in-bss -Dalpha -I.-I/usr=
/src/sys/arch -I/usr/src/sys -nostdinc -DDIAGNOSTIC -DUFS_DIRHASH -DLKM -DM=
AXUSERS=3D64 -D_KERNEL -D_KERNEL_OPT -I/usr/src/sys/dist/ipf -c/usr/src/sys=
/compat/linux/common/linux_signal.c
/usr/src/sys/compat/linux/common/linux_signal.c:610: warning: function decl=
aration isn't a prototype
/usr/src/sys/compat/linux/common/linux_signal.c: In function `linux_sys_sig=
altstack':
/usr/src/sys/compat/linux/common/linux_signal.c:623: error: dereferencing p=
ointer to incomplete type
/usr/src/sys/compat/linux/common/linux_signal.c:624: error: dereferencing p=
ointer to incomplete type
/usr/src/sys/compat/linux/common/linux_signal.c:626: warning: implicit decl=
aration of function `linux_to_native_sigaltstack'
/usr/src/sys/compat/linux/common/linux_signal.c:630: error: dereferencing p=
ointer to incomplete type
/usr/src/sys/compat/linux/common/linux_signal.c:630: error: dereferencing p=
ointer to incomplete type
/usr/src/sys/compat/linux/common/linux_signal.c:634: error: dereferencing p=
ointer to incomplete type
/usr/src/sys/compat/linux/common/linux_signal.c:636: error: dereferencing p=
ointer to incomplete type

*** Failed target:  linux_signal.o
*** Failed command: echo '# ' "compile ARDBEG/linux_signal.o"; echo /home/l=
ars/tmp/obj_alpha/tools/tools.NetBSD-alpha/bin/alpha--netbsd-gcc -pipe -mno=
-fp-regs -ffreestanding -mcpu=3D21164a -O2 -pipe -Werror -Wall -Wno-main -W=
no-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototy=
pes -Wno-sign-compare -fno-zero-initialized-in-bss -Dalpha -I. -I/usr/src/s=
ys/arch -I/usr/src/sys -nostdinc -DDIAGNOSTIC -DUFS_DIRHASH -DLKM -DMAXUSER=
S=3D64 -D_KERNEL -D_KERNEL_OPT -I/usr/src/sys/dist/ipf -c /usr/src/sys/comp=
at/linux/common/linux_signal.c; /home/lars/tmp/obj_alpha/tools/tools.NetBSD=
-alpha/bin/alpha--netbsd-gcc -pipe -mno-fp-regs -ffreestanding -mcpu=3D2116=
4a -O2 -pipe -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arit=
h -Wmissing-prototypes -Wstrict-prototypes -Wno-sign-compare -fno-zero-init=
ialized-in-bss -Dalpha -I. -I/usr/src/sys/arch -I/usr/src/sys -nostdinc -DD=
IAGNOSTIC -DUFS_DIRHASH -DLKM -DMAXUSERS=3D64 -D_KERNEL -D_KERNEL_OPT -I/us=
r/src/sys/dist/ipf -c /usr/src/sys/compat/linux/common/linux_signal.c
*** Error code 1

Stop.
nbmake: stopped in /home/lars/tmp/obj_alpha/sys/arch/alpha/compile/ARDBEG

ERROR: Failed to make all in /home/lars/tmp/obj_alpha/sys/arch/alpha/compil=
e/ARDBEG
*** BUILD ABORTED ***


Commenting out options COMPAT_LINUX gets the build through on the Alpha.
Apart from the kernel native build also the native distribution target
fails. Also here cross-building a distribution will succeed. Don't have
a build log from that available though.


Best regards
	Lars Nordlund