Subject: pkg/25940: Package sysutils/lsof won't build on amd64
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <lhicks@nc.rr.com>
List: pkgsrc-bugs
Date: 06/16/2004 04:44:44
>Number:         25940
>Category:       pkg
>Synopsis:       Package sysutils/lsof won't build on amd64
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 16 04:45:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     C. Linus Hicks
>Release:        NetBSD 2.0F, system snapshot: June 9, 2004, pkg: June 11, 2004
>Organization:
>Environment:
System: NetBSD lh4 2.0F NetBSD 2.0F (LH4KERNEL) #1: Fri Jun 11 12:47:19 EDT 2004 root@lh4:/usr/usrc/src/sys/arch/amd64/compile/LH4KERNEL amd64
Architecture: x86_64
Machine: amd64

>Description:
When I run "make" in pkgsrc/sysutils/lsof I get this:

# make
===> Checking for vulnerabilities in lsof-4.71nb1
=> lsof_4.71.tar.bz2 doesn't seem to exist on this system.
=> Attempting to fetch lsof_4.71.tar.bz2 from ftp://ftp.fi.NetBSD.org/pub/NetBSD/packages/distfiles/.
=> [701281 bytes]

... Stuff deleted for brevity ...

226-File successfully transferred
226 5.015 seconds (measured here), 136.55 Kbytes per second
701281 bytes received in 00:05 (132.19 KB/s)
221-Goodbye. You uploaded 0 and downloaded 685 kbytes.
221 Logout.
=> Checksum OK for lsof_4.71.tar.bz2.
===> Extracting for lsof-4.71nb1

This configuration step (the Inventory script) takes inventory of
the lsof distribution.  The script runs for a minute or two while
it checks that all the subdirectories, information files, scripts,
header files and source files that should be present really are.

It's not absolutely necessary that you take inventory, but it's a
good idea to do it right after the lsof distribution has been
unpacked.  Once the inventory has been taken, this script creates
the file ./.ck00MAN as a signal that the inventory step has been
done.

You can call the Inventory script directly at any time to take
inventory.  You can inhibit the inventory step permanently by
creating the file ./.neverInv, and you can tell the Configure script
to skip the inventory and customization steps with the -n option.

Do you want to take inventory (y|n) [y]? 
Conducting an inventory of the lsof distribution; this will take a while.

Examining /usr/usrc/pkgsrc/sysutils/lsof/work/lsof_4.71/lsof_4.71_src: OK
Examining .: OK
Examining ./dialects: OK
Examining ./dialects/aix: OK
Examining ./dialects/aix/aix5: OK
Examining ./dialects/aix/aix5/j2: OK
Examining ./dialects/bsdi: OK
Examining ./dialects/darwin: OK
Examining ./dialects/du: OK
Examining ./dialects/freebsd: OK
Examining ./dialects/freebsd/include: OK
Examining ./dialects/freebsd/include/procfs: OK
Examining ./dialects/hpux: OK
Examining ./dialects/hpux/kmem: OK
Examining ./dialects/hpux/kmem/hpux11: OK
Examining ./dialects/hpux/pstat: OK
Examining ./dialects/linux: OK
Examining ./dialects/n+obsd: OK
Examining ./dialects/n+os: OK
Examining ./dialects/osr: OK
Examining ./dialects/osr/include: OK
Examining ./dialects/osr/include/sys: OK
Examining ./dialects/ou: OK
Examining ./dialects/ou/ou8: OK
Examining ./dialects/ou/ou8/sys: OK
Examining ./dialects/ou/ou8/sys/fs: OK
Examining ./dialects/ou/ou8/vm: OK
Examining ./dialects/sun: OK
Examining ./dialects/sun/include: OK
Examining ./dialects/sun/include/sys: OK
Examining ./dialects/uw: OK
Examining ./dialects/uw/uw21: OK
Examining ./dialects/uw/uw21/fs: OK
Examining ./dialects/uw/uw21/fs/proc: OK
Examining ./dialects/uw/uw21/fs/procfs: OK
Examining ./dialects/uw/uw21/sys: OK
Examining ./dialects/uw/uw21/sys/fs: OK
Examining ./dialects/uw/uw21/vm: OK
Examining ./dialects/uw/uw7: OK
Examining ./dialects/uw/uw7/fs: OK
Examining ./dialects/uw/uw7/fs/nsc_cfs: OK
Examining ./dialects/uw/uw7/fs/procfs: OK
Examining ./dialects/uw/uw7/sys: OK
Examining ./dialects/uw/uw7/sys/fs: OK
Examining ./dialects/uw/uw7/vm: OK
Examining ./lib: OK
Examining ./scripts: OK
Examining ./tests: OK

This lsof distribution seems to be complete.

===> Patching for lsof-4.71nb1
===> Applying pkgsrc patches for lsof-4.71nb1
===> Overriding tools for lsof-4.71nb1
===> Buildlinking for lsof-4.71nb1
===> Configuring for lsof-4.71nb1
rm -f ddev.c dfile.c dlsof.h dmnt.c dnode*.c dproc.c dproto.h dsock.c dstore.c kernelbase.h machine.h machine.h.old new_machine.h __lseek.s Makefile ./tests/config.cflags
rm -f ./tests/config.cc ./tests/config.xobj ./tests/config.ldflags
ln -s dialects/n+obsd/dlsof.h dlsof.h
ln -s dialects/n+obsd/dmnt.c dmnt.c
ln -s dialects/n+obsd/dnode.c dnode.c
ln -s dialects/n+obsd/dnode1.c dnode1.c
ln -s dialects/n+obsd/dproc.c dproc.c
ln -s dialects/n+obsd/dproto.h dproto.h
ln -s dialects/n+obsd/dsock.c dsock.c
ln -s dialects/n+obsd/dstore.c dstore.c
ln -s dialects/n+obsd/machine.h machine.h
Makefile and lib/Makefile created.
./tests/config.cc created
./tests/config.cflags created
./tests/config.ldflags created
./tests/config.xobj created
===> Building for lsof-4.71nb1
(cd lib; /usr/bin/make DEBUG="-O" CFGF="-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/usrc/pkgsrc/sysutils/lsof/work/lsof_4.71/lsof_4.71_src/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\"")
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/usrc/pkgsrc/sysutils/lsof/work/lsof_4.71/lsof_4.71_src/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 ckkv.c
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/usrc/pkgsrc/sysutils/lsof/work/lsof_4.71/lsof_4.71_src/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 cvfs.c
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/usrc/pkgsrc/sysutils/lsof/work/lsof_4.71/lsof_4.71_src/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/usrc/pkgsrc/sysutils/lsof/work/lsof_4.71/lsof_4.71_src/lib
*** Error code 1

Stop.
make: stopped in /usr/usrc/pkgsrc/sysutils/lsof/work/lsof_4.71/lsof_4.71_src
*** Error code 1

Stop.
make: stopped in /usr/usrc/pkgsrc/sysutils/lsof
*** Error code 1

Stop.
make: stopped in /usr/usrc/pkgsrc/sysutils/lsof

>How-To-Repeat:
I don't know if this is specific to amd64; I have only tried it there.

cd pkgsrc/sysutils/lsof
make

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted: