Bug 251266 - [PATCH] sysutils/lsof: fix 13-CURRENT build post r367777
Summary: [PATCH] sysutils/lsof: fix 13-CURRENT build post r367777
Status: Closed DUPLICATE of bug 251096
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Larry Rosenman
Keywords: buildisok
Depends on:
Reported: 2020-11-20 05:22 UTC by Cy Schubert
Modified: 2021-01-30 13:04 UTC (History)
6 users (show)

See Also:
bugzilla: maintainer-feedback? (ler)
cy: maintainer-feedback?

Patch for 13-CURRENT after r367777 (2.22 KB, patch)
2020-11-20 05:22 UTC, Cy Schubert
no flags Details | Diff
Patch using new pwddesc structure instead (2.32 KB, patch)
2020-12-29 21:54 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cy Schubert freebsd_committer 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 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 2021-01-30 13:04:36 UTC
Closing in favor of 251096.

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