Bug 268279

Summary: sysutils/lsof: Fails to build with "field has incomplete type 'struct callout'" on src/main
Product: Ports & Packages Reporter: Tomoaki AOKI <junchoon>
Component: Individual Port(s)Assignee: Larry Rosenman <ler>
Status: Closed FIXED    
Severity: Affects Some People CC: cy, grahamperrin, vishwin, yasu
Priority: --- Flags: bugzilla: maintainer-feedback? (ler)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Full build log with MAKE_JOBS_UNSAFE=yes
none
Patch file
none
Updated patch file none

Description Tomoaki AOKI 2022-12-09 18:23:30 UTC
sysutils/lsof fails to build on recent main, at least on amd64.

In file included from ./../dlsof.h:159:
/usr/src/sys/netinet/tcp_var.h:149:17: error: field has incomplete type 'struct callout'
        struct callout t_callout;
                       ^
/usr/src/sys/netinet/tcp_var.h:149:9: note: forward declaration of 'struct callout'
        struct callout t_callout;
               ^
1 error generated.
*** Error code 1


Known-to-be-OK: commit e92d69234579395a79807fe303a75ba3c614c90f
Failed: commit 0ca90ed42a495074392a8316ae58a9bbf4eda01a


Maybe caused by any of commits between:

author	Gleb Smirnoff <glebius@FreeBSD.org>	2022-12-07 17:00:48 +0000
committer	Gleb Smirnoff <glebius@FreeBSD.org>	2022-12-07 17:00:48 +0000
commit	e68b3792440cac248347afe08ba5881a00ba6523 (patch)
tree	b06ea64de5ac8911963b6fcabe8d0f98c6ee710e /sys/netinet
parent	f4a176fbaf76902a9b1c46e6c752e1f33eaebd8d (diff)
download	src-e68b3792440cac248347afe08ba5881a00ba6523.tar.gz
src-e68b3792440cac248347afe08ba5881a00ba6523.zip
tcp: embed inpcb into tcpcb

through

Smirnoff <glebius@FreeBSD.org>	2022-12-07 17:00:48 +0000
committer	Gleb Smirnoff <glebius@FreeBSD.org>	2022-12-07 17:00:48 +0000
commit	446ccdd08e2a9f704f6348cd7f679e59183b99b3 (patch)
tree	3277033fbacdea499e0673d6cf413556d9ade39a /sys/netinet
parent	918fa4227d5bb74e882649785284c76e24e8f259 (diff)
download	src-446ccdd08e2a9f704f6348cd7f679e59183b99b3.tar.gz
src-446ccdd08e2a9f704f6348cd7f679e59183b99b3.zip
tcp: use single locked callout per tcpcb for the TCP timers
Comment 1 Tomoaki AOKI 2022-12-09 18:25:38 UTC
Created attachment 238671 [details]
Full build log with MAKE_JOBS_UNSAFE=yes

Uploading full build log with `make MAKE_JOBS_UNSAFE=yes`
Comment 2 Cy Schubert freebsd_committer freebsd_triage 2022-12-09 23:55:29 UTC
sys/callout.h should probably be included before tcp_var.h.
Comment 3 Yasuhiro Kimura freebsd_committer freebsd_triage 2022-12-10 00:50:51 UTC
Created attachment 238677 [details]
Patch file

(In reply to Cy Schubert from comment #2)

With attached patch build succeeds with

- latest 14.0-CURRENT amd64
- 13.1-RELEASE amd64
- 12.4-RELEASE amd64
- 12.3-RELEASE amd64
Comment 4 Yasuhiro Kimura freebsd_committer freebsd_triage 2022-12-10 03:49:53 UTC
Created attachment 238680 [details]
Updated patch file

Don't bump PORTREVISION. Unnecessary as it just fixes build error.
Comment 5 Cy Schubert freebsd_committer freebsd_triage 2022-12-10 05:13:14 UTC
(In reply to Yasuhiro Kimura from comment #4)
LGTM
Comment 6 Tomoaki AOKI 2022-12-10 07:33:17 UTC
(In reply to Yasuhiro Kimura from comment #4)

Thanks!
With your 2nd patch, builds fine
  main at commit 0ca90ed42a495074392a8316ae58a9bbf4eda01a
  stable/13 at commit 09072186eec1854f2a66cd1be441adcbe331c357
both on amd64.
Comment 7 Charlie Li freebsd_committer freebsd_triage 2022-12-26 14:37:05 UTC
May want to submit this upstream.
Comment 8 commit-hook freebsd_committer freebsd_triage 2022-12-26 15:02:02 UTC
A commit in branch main references this bug:

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

commit ec41e402547473a7e28e38fc719ed1fde17f38de
Author:     Larry Rosenman <ler@FreeBSD.org>
AuthorDate: 2022-12-26 15:00:03 +0000
Commit:     Larry Rosenman <ler@FreeBSD.org>
CommitDate: 2022-12-26 15:01:40 +0000

    sysutils/lsof: update to 4.96.5

    - add <sys/callout.h> include

    PR: 268279
    Patch From: yasu@freebsd.org

 sysutils/lsof/Makefile | 2 +-
 sysutils/lsof/distinfo | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
Comment 9 Larry Rosenman freebsd_committer freebsd_triage 2022-12-26 15:02:44 UTC
fixed upstream (I (ler) am upstream)
Committed.