Bug 244764

Summary: sysutils/lsof: Fails to build on CURRENT (dproc.c:144:13: error: variable has incomplete type 'struct pwd')
Product: Ports & Packages Reporter: Francis Little <oggy>
Component: Individual Port(s)Assignee: Larry Rosenman <ler>
Status: Closed FIXED    
Severity: Affects Only Me CC: powerpc
Priority: --- Flags: bugzilla: maintainer-feedback? (ler)
Version: Latest   
Hardware: powerpc   
OS: Any   

Description Francis Little 2020-03-12 17:06:04 UTC
Building lsof-4.93.2 on FreeBSD 13-CURRENT r358095M PPC64 seems to fail with the following:


--- dnode2.o ---
In file included from dnode2.c:62:
In file included from /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h:33:
In file included from /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h:48:
In file included from /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h:73:
In file included from /usr/src/sys/cddl/compat/opensolaris/sys/vfs.h:37:
/usr/src/sys/cddl/compat/opensolaris/sys/vnode.h:243:10: warning: implicit declaration of function 'VOP_FSYNC' is invalid in C99 [-Wimplicit-function-declaration]
        error = VOP_FSYNC(vp, MNT_WAIT, curthread);
                ^
--- dproc.o ---
dproc.c:144:13: error: variable has incomplete type 'struct pwd'
        struct pwd pwd;
                   ^
dproc.c:144:9: note: forward declaration of 'struct pwd'
        struct pwd pwd;
               ^
dproc.c:334:23: warning: implicit declaration of function 'FILEDESC_KVM_LOAD_PWD' is invalid in C99 [-Wimplicit-function-declaration]
            pwd_addr = (KA_T)FILEDESC_KVM_LOAD_PWD(&fd);
                             ^
1 warning and 1 error generated.
*** [dproc.o] Error code 1

make[2]: stopped in /usr/ports/sysutils/lsof/work/lsof-4.93.2
--- dnode2.o ---
1 warning generated.
A failure has been detected in another branch of the parallel make

make[3]: stopped in /usr/ports/sysutils/lsof/work/lsof-4.93.2
*** [dnode2.o] Error code 2

make[2]: stopped in /usr/ports/sysutils/lsof/work/lsof-4.93.2
--- lib/liblsof.a ---
A failure has been detected in another branch of the parallel make

make[3]: stopped in /usr/ports/sysutils/lsof/work/lsof-4.93.2/lib
*** [lib/liblsof.a] Error code 2

make[2]: stopped in /usr/ports/sysutils/lsof/work/lsof-4.93.2
3 errors

make[2]: stopped in /usr/ports/sysutils/lsof/work/lsof-4.93.2
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/sysutils/lsof
*** Error code 1
Comment 1 Larry Rosenman freebsd_committer 2020-03-12 17:12:16 UTC
is this 4.93.2_10,8?
Comment 2 Francis Little 2020-03-12 17:18:39 UTC
(In reply to Larry Rosenman from comment #1)

I just updated my ports to head as of about an hour ago....

root@PowerMacG5:/usr/ports/sysutils/lsof # svnlite info
Path: .
Working Copy Root Path: /usr/ports
URL: svn://svn.freebsd.org/ports/head/sysutils/lsof
Relative URL: ^/head/sysutils/lsof
Repository Root: svn://svn.freebsd.org/ports
Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
Revision: 528296
Node Kind: directory
Schedule: normal
Last Changed Author: ler
Last Changed Rev: 527995
Last Changed Date: 2020-03-08 02:55:04 +0000 (Sun, 08 Mar 2020)
Comment 3 Larry Rosenman freebsd_committer 2020-03-12 17:22:46 UTC
please update your /usr/src to r358734+
Comment 4 Larry Rosenman freebsd_committer 2020-03-12 17:25:13 UTC
see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244601 as for why.
Comment 5 Francis Little 2020-03-12 17:44:31 UTC
(In reply to Larry Rosenman from comment #3)

Thanks, will update and report back.
Comment 6 Francis Little 2020-03-13 06:50:15 UTC
(In reply to Larry Rosenman from comment #3)

Just to confirm this now builds for me on Current r358734+ (I'm on r358915).

Regards
Comment 7 Larry Rosenman freebsd_committer 2020-03-13 15:08:57 UTC
Great, Closing this then.