--- store.o --- In file included from store.c:31: In file included from lib/common.h:253: In file included from ./dlsof.h:171: In file included from /usr/src/sys/rpc/rpc.h:68: /usr/src/sys/rpc/svc.h:341:25: error: field has incomplete type 'struct sysctl_ctx_list' --- util.o --- In file included from util.c:37: In file included from lib/common.h:253: In file included from ./dlsof.h:171: In file included from /usr/src/sys/rpc/rpc.h:68: /usr/src/sys/rpc/svc.h:341:25: error: field has incomplete type 'struct sysctl_ctx_list' 341 | struct sysctl_ctx_list sp_sysctl; | ^ /usr/src/sys/rpc/svc.h:341:9: note: forward declaration of 'struct sysctl_ctx_list' 341 | struct sysctl_ctx_list sp_sysctl; | ^ --- dmnt.o --- In file included from dmnt.c:36: In file included from lib/common.h:253: In file included from ./dlsof.h:171: In file included from /usr/src/sys/rpc/rpc.h:68: /usr/src/sys/rpc/svc.h:341:25: error: field has incomplete type 'struct sysctl_ctx_list' 341 | struct sysctl_ctx_list sp_sysctl; | ^ /usr/src/sys/rpc/svc.h:341:9: note: forward declaration of 'struct sysctl_ctx_list' 341 | struct sysctl_ctx_list sp_sysctl; | ^
Created attachment 256625 [details] poudriere bulk -j FreeBSD:15:amd64 -p latest =>> Building sysutils/lsof build started at Sat Jan 11 16:04:53 UTC 2025 port directory: /usr/ports/sysutils/lsof package name: lsof-4.99.4,8 building for: FreeBSD pkg1.a9development.com 15.0-CURRENT FreeBSD 15.0-CURRENT 1500030 amd64 maintained by: ler@FreeBSD.org Makefile datestamp: -rw-r--r-- 1 root wheel 1625 Dec 25 19:33 /usr/ports/sysutils/lsof/Makefile Ports top last git commit: 51acd11ed5 Ports top unclean checkout: no Port dir last git commit: 4821043f88 Port dir unclean checkout: no Poudriere version: poudriere-git-3.4.2 Host OSVERSION: 1500030 Jail OSVERSION: 1500030 Job Id: 01
@glebius: I think you broke this?
On Sat Jan 11 18:02:15 2025 UTC, ler@FreeBSD.org wrote: > @glebius: I think you broke this? It was broken before me (as always with lsof). I exposed it. It includes $SRC_BASE/rpc/rpc.h instead of /usr/include/rpc/rpc.h. Before it was compilable, although it picked up declarations that aren't used anywhere. Now it is not compilable. I'll see if I can quickly find a solution. But in general it should be task of authors/maintainers of the software that violates all possible API conventions both during build time and run time.
On Sat Jan 11 18:15:51 2025 UTC, glebius@FreeBSD.org wrote: > It includes $SRC_BASE/rpc/rpc.h instead of /usr/include/rpc/rpc.h. I tried to change '-I $SRC_BASE/sys' in the all Makefiles into '-idirafter $SRC_BASE/sys', so that includes from /usr/include are preferred over includes from the kernel sources. This worked! Hope this hint will help you to fix lsof.
What did you change and where? I'm having a hard time finding it :)
On Sat Jan 11 20:09:04 2025 UTC, ler@FreeBSD.org wrote: > What did you change and where? I'm having a hard time finding it :) After configure every Makefile has: DINC= -I/usr/src (or whatever SRC_BASE you told the port) If you change at least the ./Makefile and ./lib/Makefile to: DINC= -idirafter /usr/src then it will prefer /usr/include/sys over /usr/src/sys/sys and it will successfully build. Of course better to fix all Makefiles. I failed to quickly figure out how to fix that before configure stage, but you got the idea.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=e16a8f7d71053d0074d26ce16593a8c284b22a82 commit e16a8f7d71053d0074d26ce16593a8c284b22a82 Author: Larry Rosenman <ler@FreeBSD.org> AuthorDate: 2025-01-11 20:56:33 +0000 Commit: Larry Rosenman <ler@FreeBSD.org> CommitDate: 2025-01-11 20:56:33 +0000 sysutils/lsof: add PR PR: 284004 sysutils/lsof/Makefile | 1 + 1 file changed, 1 insertion(+)
Fix Committed -- Thanks!
On Sat Jan 11 20:59:23 2025 UTC, ler@FreeBSD.org wrote: > Fix Committed -- Thanks! But e16a8f7d71053d0074d26ce16593a8c284b22a82 didn't do any meaningful change to the port.
see https://cgit.freebsd.org/ports/commit/?id=0654456e061181e74fd0eb06f9b966a4e759769d
Fix Failed -- Looking.
*** Bug 284015 has been marked as a duplicate of this bug. ***
The patch does not fix the bug. Building with a recent (as of today) ports and src still fails to build.
This seems to have worked for me, at least it builds now..: --- a/sysutils/lsof/Makefile +++ b/sysutils/lsof/Makefile @@ -40,7 +40,8 @@ BOOKE_CFLAGS= -DBOOKE CONFIGURE_SCRIPT= Configure CONFIGURE_ARGS= -n freebsd CONFIGURE_ENV= FREEBSD_SYS="${SRC_BASE}/sys" \ - LSOF_CC="${CC}" + LSOF_CC="${CC}" \ + LSOF_OPINC="-idirafter ${SRC_BASE}/sys"
(In reply to Brad Davis from comment #15) Confirmed. This is the correct patch. There should also be a warning by the port to say that the sources (/usr/src), /usr/include, installed libraries and the running kernel must all be the same, i.e. the sources cannot be updated (git pull) ahead of the installed system: Make sure to do installworld before building lsof. This of course wasn't my problem but considering src/ commit and this patch it stands to reason that any mismatch will be a source of breakage.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=efbb151650721f0dff7a761e08f7970951954ffa commit efbb151650721f0dff7a761e08f7970951954ffa Author: Larry Rosenman <ler@FreeBSD.org> AuthorDate: 2025-01-13 23:51:28 +0000 Commit: Larry Rosenman <ler@FreeBSD.org> CommitDate: 2025-01-13 23:52:23 +0000 sysutils/lsof: fix after recent breakage PR: 284004 Patch By: brd, cy sysutils/lsof/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
Committed for real. Thanks brd and cy!
Thanks! BTW, 'Submitted by' (or Patch by) has been deprecated by setting the author: https://docs.freebsd.org/en/articles/committers-guide/#_include_appropriate_metadata_in_a_footer
(In reply to Brad Davis from comment #19) Typically I git-am any patch that is submitted with a commit log message, either from git-format-patch or the person provides me with a commit log message. Otherwise, if I have to write the commit log message for the person I use the old standard.