Bug 34463

Summary: COMPAT_SVR4 enabled kernel fails to build in latest -CURRENT
Product: Base System Reporter: Vincent Poy <vince>
Component: kernAssignee: Alfred Perlstein <alfred>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   

Description Vincent Poy 2002-01-30 22:20:00 UTC
COMPAT_SVR4 enabled kernel fails to build in latest -CURRENT
but is fine without SVR4 enabled.  This seems to be caused by
version 1.11/1.12 of /usr/src/sys/compat/svr4/svr4_filio.c
committed by alfred a few weeks back.

Output is as follows....

touch hack.c
cc -elf -shared -nostdlib hack.c -o hack.So
rm -f hack.c
sh /usr/src/sys/conf/newvers.sh PELE
cc -c -O -pipe  -Wall -Wredundant-decls -Wnested-externs
-Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline
-Wcast-qual  -fformat-extensions -ansi -g -nostdinc -I-  -I.
-I/usr/src/sys -I/usr/src/sys/dev -I/usr/src/sys/contrib/dev/acpica
-I/usr/src/sys/contrib/ipfilter -I/usr/src/sys/../include  -D_KERNEL
-ffreestanding -include opt_global.h -fno-common -elf
-mpreferred-stack-boundary=2  vers.c
linking kernel.debug
svr4_filio.o: In function `svr4_fil_ioctl':
/usr/src/sys/compat/svr4/svr4_filio.c(.text+0xbd): undefined reference to
`mtx_lock'
/usr/src/sys/compat/svr4/svr4_filio.c(.text+0x118): undefined reference to
`mtx_unlock'
/usr/src/sys/compat/svr4/svr4_filio.c(.text+0x130): undefined reference to
`mtx_unlock'
/usr/src/sys/compat/svr4/svr4_filio.c(.text+0x141): undefined reference to
`mtx_unlock'
/usr/src/sys/compat/svr4/svr4_filio.c(.text+0x1ed): undefined reference to
`mtx_unlock'
*** Error code 1

Stop in /usr/obj/usr/src/sys/PELE.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
root@pele [9:08pm][/usr/src] >>

Fix: 

None
How-To-Repeat: 
have the following options in kernel config file and then try to build kernel

options         COMPAT_SVR4
options         DEBUG_SVR4
device          streams         # STREAMS network driver (required for svr4).
Comment 1 Sheldon Hearn freebsd_committer freebsd_triage 2002-01-31 09:54:30 UTC
Responsible Changed
From-To: freebsd-bugs->alfred

Over to the person responsible for the deltas suspected.
Comment 2 Alfred Perlstein freebsd_committer freebsd_triage 2002-01-31 16:57:46 UTC
State Changed
From-To: open->closed

I fixed this yesterday in rev 1.13 of svr4_filio.c.