Subject: pkg/25920: pkgsrc/sysutils/lsof build problems with NetBSD-current
To: None <gnats-bugs@gnats.NetBSD.org>
From: Andreas Wiese <awiese@despammed.com>
List: pkgsrc-bugs
Date: 06/13/2004 21:59:49
>Number: 25920
>Category: pkg
>Synopsis: lsof-4.71nb1 doesn't build on NetBSD-current
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jun 13 20:03:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: Andreas Wiese
>Release: NetBSD 2.0F
>Organization:
Linux User Group Halberstadt
>Environment:
System: NetBSD schroeder.singeklub.invalid 2.0F NetBSD 2.0F (SCHROEDER) #5: Mon Jun 7 21:29:04 CEST 2004 root@schroeder.singeklub.invalid:/sys/arch/i386/compile/SCHROEDER i386
Architecture: i386
Machine: i386
>Description:
pkgsrc/sysutils/lsof doesn't build on a fresh installed NetBSD-current
because of missing includes (yes, this time it isn't statvfs ;)
#v+
gcc -O2 -DNETBSDV=2000 -DHASGETBOOTFILE -DHASNFSPROTO -DHASIPv6 -DHASFDESCFS=1
-DHASFDLINK -DHASLFS -DHASNULLFS -DHASPROCFS -DHASPROCFS_PFSROOT -DHAS9660FS=1 -
DHASMSDOSFS=1 -DHASKERNFS -DHASKERNFS_KFS_KT -DHASI_FFS1 -DHASEXT2FS -DHASI_E2FS
_PTR -DHASNFSVATTRP -DUVM -I/usr/pkgsrc/sysutils/lsof/work/lsof_4.71/lsof_4.71_s
rc/dialects/n+obsd/include -DHAS_UVM_INCL -DHAS_ADVLOCK_ARGS -DHAS_LF_LWP -DHAS_
LWP_H -DHASCWDINFO -DHAS_SYS_PIPEH -DHASSTATVFS -DHASKVMGETPROC2 -DLSOF_VSTR="2.
0F" -O -DLSOF_MORE_SECURE=0 -DLSOF_LESS_SECURE_SOCKETS=0 -c dvch.c
In file included from ../dlsof.h:53,
from ../lsof.h:181,
from dvch.c:43:
/usr/include/sys/filedesc.h:79: error: field `fd_slock' has incomplete type
/usr/include/sys/filedesc.h:91: error: field `cwdi_slock' has incomplete type
*** Error code 1
Stop.
make: stopped in /usr/pkgsrc/sysutils/lsof/work/lsof_4.71/lsof_4.71_src/lib
*** Error code 1
[...]
#v-
That's caused by the new member fd_slock in `struct filedesc', because its
type (`struct simplelock') isn't known in <sys/filedesc.h>. With cwdi_slock
it's the same.
>How-To-Repeat:
Compile lsof on NetBSD-current.
>Fix:
<sys/lock.h> should be included either in all files which use <sys/filedesc.h>
(here lsof/work/lsof_4.71/lsof_4.71_src/dlsof.h should be enough) or in
<sys/filedesc.h> itself (the latter would be the better solution IMHO,
because I think that lsof isn't the only program including <sys/filedesc.h>
without the knowledge that <sys/lock.h> is also needed now).
>Release-Note:
>Audit-Trail:
>Unformatted: