Bug 251266

Summary: [PATCH] sysutils/lsof: fix 13-CURRENT build post r367777
Product: Ports & Packages Reporter: Cy Schubert <cy>
Component: Individual Port(s)Assignee: Larry Rosenman <ler>
Status: Closed DUPLICATE    
Severity: Affects Many People CC: dch, dim, emaste, ish, junchoon, wcarson.bugzilla
Priority: --- Keywords: buildisok
Version: LatestFlags: bugzilla: maintainer-feedback? (ler)
cy: maintainer-feedback?
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch for 13-CURRENT after r367777
none
Patch using new pwddesc structure instead none

Description Cy Schubert freebsd_committer freebsd_triage 2020-11-20 05:22:20 UTC
Created attachment 219825 [details]
Patch for 13-CURRENT after r367777

--- lsof ---
cc -o lsof  -pipe -Wno-misleading-indentation -Wno-tautological-overlap-compare -fcommon -fstack-protector-strong -fno-strict-aliasing -Wno-misleading-indentation -Wno-tautological-overlap-compare -DNEEDS_BOOL_TYPEDEF -DHASTASKS -DHAS_PAUSE_SBT -DHAS_DUP2 -DHASEFFNLINK=i_effnlink -DHASF_VNODE -DHAS_FILEDESCENT -DHAS_TMPFS -DHASWCTYPE_H -DHASSBSTATE -DHAS_KVM_VNODE -DHAS_UFS1_2 -DHAS_NO_IDEV -DHAS_VM_MEMATTR_T -DNEEDS_DEVICE_T -DHAS_CDEV2PRIV -DHAS_NO_SI_UDEV -DHAS_SYS_SX_H -DHASFUSEFS -DHAS_V_LOCKF -DHAS_LOCKF_ENTRY -DHAS_NO_6PORT -DHAS_NO_6PPCB -DNEEDS_BOOLEAN_T -DHAS_SB_CCC -DHAS_FDESCENTTBL -DFREEBSDV=13000 -DHASFDESCFS=2 -DHASPSEUDOFS -DHASNULLFS -DHASIPv6 -DHASUTMPX -DHAS_STRFTIME -DLSOF_VSTR=\"13.0-CURRENT\" -I/usr/src/sys -O2 dmnt.o dnode.o dnode1.o dnode2.o dproc.o dsock.o dstore.o  arg.o main.o misc.o node.o print.o proc.o store.o usage.o  util.o -L./lib -llsof  -lkvm
ld: error: undefined symbol: FILEDESC_KVM_LOAD_PWD
>>> referenced by dproc.c
>>>               dproc.o:(gather_proc_info)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** [lsof] Error code 1

make[1]: stopped in /wrkdirs/usr/ports/sysutils/lsof/work/lsof-4.93.2
1 error

make[1]: stopped in /wrkdirs/usr/ports/sysutils/lsof/work/lsof-4.93.2
===> Compilation failed unexpectedly.

The attached patch uses the new PWDDESC_KVM_LOAD_PWD macro if it exists and falls back to FILEDESC_KVM_LOAD_PWD if it doesn't.
Comment 1 Tomoaki AOKI 2020-11-21 06:56:24 UTC
FYI, there is another PR [Bug 251096] with slightly different fix,
and with updating to 4.94. It's working for me.
Comment 2 Automation User 2020-12-06 00:11:42 UTC
Build and package info is available at https://gitlab.com/swills/freebsd-ports/pipelines/225795309
Comment 3 Dimitry Andric freebsd_committer freebsd_triage 2020-12-29 21:54:36 UTC
Created attachment 221092 [details]
Patch using new pwddesc structure instead

Here's another patch, which uses the new pwddesc struct instead.
Comment 4 Dimitry Andric freebsd_committer freebsd_triage 2021-01-30 13:04:36 UTC
Closing in favor of 251096.

*** This bug has been marked as a duplicate of bug 251096 ***