Bug 266441 - sysutils/lsof: fails to build on recent main (aka 14-current)
Summary: sysutils/lsof: fails to build on recent main (aka 14-current)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Larry Rosenman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-16 09:04 UTC by Tomoaki AOKI
Modified: 2022-10-19 00:11 UTC (History)
1 user (show)

See Also:


Attachments
Patch to store into files/ directory. (372 bytes, patch)
2022-10-18 06:12 UTC, Tomoaki AOKI
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomoaki AOKI 2022-09-16 09:04:28 UTC
sysutils/lsof fails to build on recent src main.
Would be affected by src main git 7ea1cac248574ed06c7823ffbfb9a60157240e57. [1]

[1] https://cgit.freebsd.org/src/commit/sys/sys?id=7ea1cac248574ed06c7823ffbfb9a60157240e57


===== Error log below =====

--- dstore.o ---
In file included from dstore.c:38:
In file included from ./lsof.h:250:
--- dmnt.o ---
In file included from dmnt.c:38:
In file included from ./lsof.h:250:
In file included from ./dlsof.h:324:
In file included from /usr/src/sys/sys/file.h:44:
In file included from /usr/src/sys/sys/refcount.h:36:
/usr/src/sys/sys/systm.h:452:1: error: static declaration of 'pause' follows non-static declaration
pause(const char *wmesg, int timo)
^
/usr/include/unistd.h:357:6: note: previous declaration is here
int      pause(void);
         ^
In file included from dmnt.c:38:
In file included from ./lsof.h:250:
In file included from ./dlsof.h:324:
In file included from /usr/src/sys/sys/file.h:44:
In file included from /usr/src/sys/sys/refcount.h:36:
/usr/src/sys/sys/systm.h:454:27: error: use of undeclared identifier 'tick_sbt'
        return (pause_sbt(wmesg, tick_sbt * timo, 0, C_HARDCLOCK));
                                 ^
--- dnode.o ---
In file included from dnode.c:38:
In file included from ./lsof.h:250:
In file included from ./dlsof.h:324:
In file included from /usr/src/sys/sys/file.h:44:
In file included from /usr/src/sys/sys/refcount.h:36:
/usr/src/sys/sys/systm.h:452:1: error: static declaration of 'pause' follows non-static declaration
pause(const char *wmesg, int timo)
^
/usr/include/unistd.h:357:6: note: previous declaration is here
int      pause(void);
         ^
In file included from dnode.c:38:
In file included from ./lsof.h:250:
In file included from ./dlsof.h:324:
In file included from /usr/src/sys/sys/file.h:44:
In file included from /usr/src/sys/sys/refcount.h:36:
/usr/src/sys/sys/systm.h:454:27: error: use of undeclared identifier 'tick_sbt'
        return (pause_sbt(wmesg, tick_sbt * timo, 0, C_HARDCLOCK));
                                 ^
--- dnode1.o ---
In file included from dnode1.c:41:
In file included from ./lsof.h:250:
In file included from ./dlsof.h:324:
In file included from /usr/src/sys/sys/file.h:44:
In file included from /usr/src/sys/sys/refcount.h:36:
/usr/src/sys/sys/systm.h:452:1: error: static declaration of 'pause' follows non-static declaration
pause(const char *wmesg, int timo)
^
/usr/include/unistd.h:357:6: note: previous declaration is here
int      pause(void);
         ^
In file included from dnode1.c:41:
In file included from ./lsof.h:250:
In file included from ./dlsof.h:324:
In file included from /usr/src/sys/sys/file.h:44:
In file included from /usr/src/sys/sys/refcount.h:36:
/usr/src/sys/sys/systm.h:454:27: error: use of undeclared identifier 'tick_sbt'
        return (pause_sbt(wmesg, tick_sbt * timo, 0, C_HARDCLOCK));
                                 ^
--- main.o ---
In file included from main.c:40:
In file included from ./lsof.h:250:
In file included from ./dlsof.h:324:
In file included from /usr/src/sys/sys/file.h:44:
In file included from /usr/src/sys/sys/refcount.h:36:
/usr/src/sys/sys/systm.h:452:1: error: static declaration of 'pause' follows non-static declaration
pause(const char *wmesg, int timo)
^
/usr/include/unistd.h:357:6: note: previous declaration is here
int      pause(void);
         ^
In file included from main.c:40:
In file included from ./lsof.h:250:
In file included from ./dlsof.h:324:
In file included from /usr/src/sys/sys/file.h:44:
In file included from /usr/src/sys/sys/refcount.h:36:
/usr/src/sys/sys/systm.h:454:27: error: use of undeclared identifier 'tick_sbt'
        return (pause_sbt(wmesg, tick_sbt * timo, 0, C_HARDCLOCK));
                                 ^
--- dproc.o ---
In file included from dproc.c:37:
In file included from ./lsof.h:250:
In file included from ./dlsof.h:324:
In file included from /usr/src/sys/sys/file.h:44:
In file included from /usr/src/sys/sys/refcount.h:36:
/usr/src/sys/sys/systm.h:452:1: error: static declaration of 'pause' follows non-static declaration
pause(const char *wmesg, int timo)
^
/usr/include/unistd.h:357:6: note: previous declaration is here
int      pause(void);
         ^
In file included from dproc.c:37:
In file included from ./lsof.h:250:
In file included from ./dlsof.h:324:
In file included from /usr/src/sys/sys/file.h:44:
In file included from /usr/src/sys/sys/refcount.h:36:
/usr/src/sys/sys/systm.h:454:27: error: use of undeclared identifier 'tick_sbt'
        return (pause_sbt(wmesg, tick_sbt * timo, 0, C_HARDCLOCK));
                                 ^
--- dsock.o ---
In file included from dsock.c:38:
In file included from ./lsof.h:250:
In file included from ./dlsof.h:324:
In file included from /usr/src/sys/sys/file.h:44:
In file included from /usr/src/sys/sys/refcount.h:36:
/usr/src/sys/sys/systm.h:452:1: error: static declaration of 'pause' follows non-static declaration
pause(const char *wmesg, int timo)
^
/usr/include/unistd.h:357:6: note: previous declaration is here
int      pause(void);
         ^
In file included from dsock.c:38:
In file included from ./lsof.h:250:
In file included from ./dlsof.h:324:
In file included from /usr/src/sys/sys/file.h:44:
In file included from /usr/src/sys/sys/refcount.h:36:
/usr/src/sys/sys/systm.h:454:27: error: use of undeclared identifier 'tick_sbt'
        return (pause_sbt(wmesg, tick_sbt * timo, 0, C_HARDCLOCK));
                                 ^
--- dstore.o ---
In file included from ./dlsof.h:324:
In file included from /usr/src/sys/sys/file.h:44:
In file included from /usr/src/sys/sys/refcount.h:36:
/usr/src/sys/sys/systm.h:452:1: error: static declaration of 'pause' follows non-static declaration
pause(const char *wmesg, int timo)
^
/usr/include/unistd.h:357:6: note: previous declaration is here
int      pause(void);
         ^
In file included from dstore.c:38:
In file included from ./lsof.h:250:
In file included from ./dlsof.h:324:
In file included from /usr/src/sys/sys/file.h:44:
In file included from /usr/src/sys/sys/refcount.h:36:
/usr/src/sys/sys/systm.h:454:27: error: use of undeclared identifier 'tick_sbt'
        return (pause_sbt(wmesg, tick_sbt * timo, 0, C_HARDCLOCK));
                                 ^
--- arg.o ---
In file included from arg.c:38:
In file included from ./lsof.h:250:
In file included from ./dlsof.h:324:
In file included from /usr/src/sys/sys/file.h:44:
In file included from /usr/src/sys/sys/refcount.h:36:
/usr/src/sys/sys/systm.h:452:1: error: static declaration of 'pause' follows non-static declaration
pause(const char *wmesg, int timo)
^
/usr/include/unistd.h:357:6: note: previous declaration is here
int      pause(void);
         ^
In file included from arg.c:38:
In file included from ./lsof.h:250:
In file included from ./dlsof.h:324:
In file included from /usr/src/sys/sys/file.h:44:
In file included from /usr/src/sys/sys/refcount.h:36:
/usr/src/sys/sys/systm.h:454:27: error: use of undeclared identifier 'tick_sbt'
        return (pause_sbt(wmesg, tick_sbt * timo, 0, C_HARDCLOCK));
                                 ^
--- misc.o ---
In file included from misc.c:38:
In file included from ./lsof.h:250:
In file included from ./dlsof.h:324:
In file included from /usr/src/sys/sys/file.h:44:
In file included from /usr/src/sys/sys/refcount.h:36:
/usr/src/sys/sys/systm.h:452:1: error: static declaration of 'pause' follows non-static declaration
pause(const char *wmesg, int timo)
^
/usr/include/unistd.h:357:6: note: previous declaration is here
int      pause(void);
         ^
In file included from misc.c:38:
In file included from ./lsof.h:250:
In file included from ./dlsof.h:324:
In file included from /usr/src/sys/sys/file.h:44:
In file included from /usr/src/sys/sys/refcount.h:36:
/usr/src/sys/sys/systm.h:454:27: error: use of undeclared identifier 'tick_sbt'
        return (pause_sbt(wmesg, tick_sbt * timo, 0, C_HARDCLOCK));
                                 ^
--- lib/liblsof.a ---
--- dvch.o ---
In file included from dvch.c:42:
--- ckkv.o ---
In file included from ckkv.c:42:
In file included from ./../lsof.h:250:
In file included from ./../dlsof.h:324:
In file included from /usr/src/sys/sys/file.h:44:
In file included from /usr/src/sys/sys/refcount.h:36:
/usr/src/sys/sys/systm.h:452:1: error: static declaration of 'pause' follows non-static declaration
pause(const char *wmesg, int timo)
^
/usr/include/unistd.h:357:6: note: previous declaration is here
int      pause(void);
         ^
In file included from ckkv.c:42:
In file included from ./../lsof.h:250:
In file included from ./../dlsof.h:324:
In file included from /usr/src/sys/sys/file.h:44:
In file included from /usr/src/sys/sys/refcount.h:36:
/usr/src/sys/sys/systm.h:454:27: error: use of undeclared identifier 'tick_sbt'
        return (pause_sbt(wmesg, tick_sbt * timo, 0, C_HARDCLOCK));
                                 ^
--- dvch.o ---
In file included from ./../lsof.h:250:
In file included from ./../dlsof.h:324:
In file included from /usr/src/sys/sys/file.h:44:
In file included from /usr/src/sys/sys/refcount.h:36:
/usr/src/sys/sys/systm.h:452:1: error: static declaration of 'pause' follows non-static declaration
pause(const char *wmesg, int timo)
^
/usr/include/unistd.h:357:6: note: previous declaration is here
int      pause(void);
         ^
In file included from dvch.c:42:
In file included from ./../lsof.h:250:
In file included from ./../dlsof.h:324:
In file included from /usr/src/sys/sys/file.h:44:
In file included from /usr/src/sys/sys/refcount.h:36:
/usr/src/sys/sys/systm.h:454:27: error: use of undeclared identifier 'tick_sbt'
        return (pause_sbt(wmesg, tick_sbt * timo, 0, C_HARDCLOCK));
                                 ^
--- fino.o ---
In file included from fino.c:51:
In file included from ./../lsof.h:250:
In file included from ./../dlsof.h:324:
In file included from /usr/src/sys/sys/file.h:44:
In file included from /usr/src/sys/sys/refcount.h:36:
/usr/src/sys/sys/systm.h:452:1: error: static declaration of 'pause' follows non-static declaration
pause(const char *wmesg, int timo)
^
/usr/include/unistd.h:357:6: note: previous declaration is here
int      pause(void);
         ^
In file included from fino.c:51:
In file included from ./../lsof.h:250:
In file included from ./../dlsof.h:324:
In file included from /usr/src/sys/sys/file.h:44:
In file included from /usr/src/sys/sys/refcount.h:36:
/usr/src/sys/sys/systm.h:454:27: error: use of undeclared identifier 'tick_sbt'
        return (pause_sbt(wmesg, tick_sbt * timo, 0, C_HARDCLOCK));
                                 ^
--- dstore.o ---
2 errors generated.
--- lib/liblsof.a ---
--- ckkv.o ---
2 errors generated.
--- dstore.o ---
*** [dstore.o] Error code 1

make[1]: stopped in /usr/ports/sysutils/lsof/work/lsof-4.95.0
--- lib/liblsof.a ---
*** [lib/liblsof.a] Error code 6

make[1]: stopped in /usr/ports/sysutils/lsof/work/lsof-4.95.0
--- dnode1.o ---
In file included from dnode1.c:63:
--- dmnt.o ---
2 errors generated.
--- dnode1.o ---
./cd9660_node.h:79:9: warning: 'VTOI' macro redefined [-Wmacro-redefined]
#define VTOI(vp) ((struct iso_node *)(vp)->v_data)
        ^
/usr/src/sys/ufs/ufs/inode.h:262:9: note: previous definition is here
#define VTOI(vp)        ((struct inode *)(vp)->v_data)
        ^
--- dproc.o ---
2 errors generated.
--- arg.o ---
arg.c:481:14: warning: & has lower precedence than ==; == will be evaluated first [-Wparentheses]
            if (!ss & ErrStat == 0)
                    ^~~~~~~~~~~~~~
arg.c:481:14: note: place parentheses around the '==' expression to silence this warning
            if (!ss & ErrStat == 0)
                    ^
                      (           )
arg.c:481:14: note: place parentheses around the & expression to evaluate it first
            if (!ss & ErrStat == 0)
                    ^
                (            )
--- dmnt.o ---
*** [dmnt.o] Error code 1

make[1]: stopped in /usr/ports/sysutils/lsof/work/lsof-4.95.0
--- dsock.o ---
2 errors generated.
--- dnode1.o ---
In file included from dnode1.c:128:
In file included from /usr/src/sys/fs/fuse/fuse_node.h:73:
/usr/src/sys/fs/fuse/fuse_file.h:215:19: warning: declaration of 'struct fuse_open_out' will not be visible outside of this function [-Wvisibility]
--- dproc.o ---
*** [dproc.o] Error code 1

make[1]: stopped in /usr/ports/sysutils/lsof/work/lsof-4.95.0
--- dnode1.o ---
                          const struct fuse_open_out *foo);
                                       ^
In file included from dnode1.c:128:
/usr/src/sys/fs/fuse/fuse_node.h:151:2: warning: implicit declaration of function 'getbinuptime' is invalid in C99 [-Wimplicit-function-declaration]
        getbinuptime(&now);
        ^
/usr/src/sys/fs/fuse/fuse_node.h:202:45: warning: declaration of 'struct fuse_entry_out' will not be visible outside of this function [-Wvisibility]
int fuse_vnode_get(struct mount *mp, struct fuse_entry_out *feo,
                                            ^
--- dsock.o ---
*** [dsock.o] Error code 1

make[1]: stopped in /usr/ports/sysutils/lsof/work/lsof-4.95.0
--- main.o ---
2 errors generated.
*** [main.o] Error code 1

make[1]: stopped in /usr/ports/sysutils/lsof/work/lsof-4.95.0
--- dnode1.o ---
4 warnings and 2 errors generated.
*** [dnode1.o] Error code 1

make[1]: stopped in /usr/ports/sysutils/lsof/work/lsof-4.95.0
--- misc.o ---
2 errors generated.
*** [misc.o] Error code 1

make[1]: stopped in /usr/ports/sysutils/lsof/work/lsof-4.95.0
--- dnode.o ---
2 errors generated.
*** [dnode.o] Error code 1

make[1]: stopped in /usr/ports/sysutils/lsof/work/lsof-4.95.0
--- arg.o ---
1 warning and 2 errors generated.
*** [arg.o] Error code 1

make[1]: stopped in /usr/ports/sysutils/lsof/work/lsof-4.95.0
10 errors

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

Stop.
make: stopped in /usr/ports/sysutils/lsof
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2022-09-16 19:22:03 UTC
(In reply to Tomoaki AOKI from comment #0)

> ... sysutils/lsof fails to build on recent src main. ...

Worth mentioning: a flurry of very recent activity upstream. Revision 4.96.0 builds on more recent c9baa974717a. <https://bsd.to/yVYQ/raw>
Comment 2 Larry Rosenman freebsd_committer freebsd_triage 2022-09-16 19:47:15 UTC
Actually, there was another release after 4.96.0 (4.96.1-freebsd)

It now builds on 14.
Comment 3 Tomoaki AOKI 2022-09-17 01:21:31 UTC
Confirmed built OK at ports main git 7b1f2990ffa9651a98b1c9f91e20f0b1a591ce66.
Thanks!
Comment 4 Tomoaki AOKI 2022-10-18 06:08:36 UTC
Reopen.
The offending commit is now MFC'ed to stable/13.
Needs fixing it. I'll upload a temporary patch shortly.
Comment 5 Tomoaki AOKI 2022-10-18 06:12:20 UTC
Created attachment 237427 [details]
Patch to store into files/ directory.

Patch for temporary fix after src stable/13 fe9e99ff9c9d9028dccb1bb1537af46beabcb691.
(MFC of main 7ea1cac248574ed06c7823ffbfb9a60157240e57)
Comment 6 Larry Rosenman freebsd_committer freebsd_triage 2022-10-18 15:59:17 UTC
are you on Quarterly?
Comment 7 Larry Rosenman freebsd_committer freebsd_triage 2022-10-18 16:01:50 UTC
that code no longer exists in upstream:
ler in 🌐 borg in lsof/dialects/freebsd on  master via C v14.0.5-clang on ☁️  (us-east-1)
❯ grep kernel_pause *
grep: include: Is a directory
grep: tests: Is a directory

ler in 🌐 borg in lsof/dialects/freebsd on  master via C v14.0.5-clang on ☁️  (us-east-1)
❯
Comment 8 commit-hook freebsd_committer freebsd_triage 2022-10-18 16:50:48 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7a902c8910c3e3b0416ea97e1007792c0d482662

commit 7a902c8910c3e3b0416ea97e1007792c0d482662
Author:     Larry Rosenman <ler@FreeBSD.org>
AuthorDate: 2022-10-18 16:48:50 +0000
Commit:     Larry Rosenman <ler@FreeBSD.org>
CommitDate: 2022-10-18 16:50:03 +0000

    sysutils/lsof: upgrade to 4.96.4

    fix build on 13.

    PR: 266441

 sysutils/lsof/Makefile | 2 +-
 sysutils/lsof/distinfo | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
Comment 9 Larry Rosenman freebsd_committer freebsd_triage 2022-10-18 16:51:38 UTC
I see what happened, we updated the source upstream after 4.96.3 to remove that code, and never pushed a release.

I've pushed a new release upstream and upgraded the port.
Comment 10 Graham Perrin freebsd_committer freebsd_triage 2022-10-18 19:11:28 UTC
(In reply to Larry Rosenman from comment #9)

Thank you. 

(In reply to Tomoaki AOKI from comment #5)

Side note, re: bug 267176 comment 0 it's now known that the 'patch' keyword is deprecated.
Comment 11 Tomoaki AOKI 2022-10-18 21:19:35 UTC
(In reply to Larry Rosenman from comment #9)

Confirmed. Thanks!
Comment 12 Tomoaki AOKI 2022-10-18 21:28:18 UTC
(In reply to Graham Perrin from comment #10)

> Side note, re: bug 267176 comment 0 it's now known that the 'patch' keyword is  deprecated.

Why?
Article on docs.freebsd.org looks reasonable for me about patch keyword.

I have no objection to deprecate patch-ready keyword, and deprecating [patch] on summary. But why deprecating patch keyword, too?
I cannot find about the reason of deprecation documented.

P.S.
I have no objection to get back [patch] on summary instead of patch keyword.
It makes it easy to attract subscribers on MLs the bug is delivered to.
Comment 13 commit-hook freebsd_committer freebsd_triage 2022-10-18 22:00:30 UTC
A commit in branch 2022Q4 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ed4519fbc55c5049dc464286c665f5b8f672d69d

commit ed4519fbc55c5049dc464286c665f5b8f672d69d
Author:     Larry Rosenman <ler@FreeBSD.org>
AuthorDate: 2022-10-18 16:48:50 +0000
Commit:     Larry Rosenman <ler@FreeBSD.org>
CommitDate: 2022-10-18 21:59:39 +0000

    sysutils/lsof: upgrade to 4.96.4

    fix build on 13.

    PR: 266441
    (cherry picked from commit 7a902c8910c3e3b0416ea97e1007792c0d482662)

 sysutils/lsof/Makefile | 2 +-
 sysutils/lsof/distinfo | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
Comment 14 Graham Perrin freebsd_committer freebsd_triage 2022-10-19 00:11:51 UTC
(In reply to Tomoaki AOKI from comment #12)

267176 has a 'See also' bug 227147. 

I think, better to ask in 227147 – for answers to have greater visibility/relevance. 

Thanks