Bug 243172 - sysutils/lsof: Build fails on 13-CURRENT after base r356432
Summary: sysutils/lsof: Build fails on 13-CURRENT after base r356432
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Larry Rosenman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-08 03:22 UTC by Yasuhiro KIMURA
Modified: 2020-01-10 00:03 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yasuhiro KIMURA 2020-01-08 03:22:50 UTC
Build fails on 13-CURRENT after base r356432.

cc   -pipe -fstack-protector-strong -fno-strict-aliasing -DNEEDS_BOOL_TYPEDEF -DHASTASKS -DHAS_PAUSE_SBT -DHAS_DUP2 -DHAS_CLOSEFROM -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_ZFS -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 -c dnode.c -o dnode.o
dnode.c:563:9: error: no member named 'v_tag' in 'struct vnode'
        if (v->v_tag && !kread((KA_T)v->v_tag, (char *)&vtbuf, sizeof(vtbuf)))
            ~  ^
dnode.c:563:34: error: no member named 'v_tag' in 'struct vnode'
        if (v->v_tag && !kread((KA_T)v->v_tag, (char *)&vtbuf, sizeof(vtbuf)))
                                     ~  ^
2 errors generated.
*** Error code 1

Stop.
make[1]: stopped in /usr0/freebsd/ports/work/usr0/freebsd/ports/head/sysutils/lsof/work/lsof-4.93.2
*** Error code 1

Stop.
make: stopped in /usr0/freebsd/ports/head/sysutils/lsof
yasu@rolling-vm-freebsd1[2022]%
Comment 1 Larry Rosenman freebsd_committer 2020-01-09 22:09:01 UTC
@mjg can you look at this?

Thanks.
Comment 2 Mateusz Guzik freebsd_committer 2020-01-09 22:57:26 UTC
This will do the trick.

@@ -560,7 +560,7 @@
  * Get the pseudo vnode tag type for FreeBSD >= 5.
  */
        vtag = VT_UNKNOWN;
-       if (v->v_tag && !kread((KA_T)v->v_tag, (char *)&vtbuf, sizeof(vtbuf)))
+       if (!kread((KA_T)v->v_lock.lock_object.lo_name, (char *)&vtbuf, sizeof(vtbuf)))
        {
            vtbuf[sizeof(vtbuf) - 1] = '\0';
            vtbp = vtbuf;
Comment 3 Larry Rosenman freebsd_committer 2020-01-09 23:06:46 UTC
Will that also work on earlier versions or do I need to make it conditional?
Comment 4 Mateusz Guzik freebsd_committer 2020-01-09 23:13:37 UTC
I did not check how far this goes, but should work at least since stuff released after 2005.
Comment 5 Mateusz Guzik freebsd_committer 2020-01-09 23:16:14 UTC
So I just checked, this will work at least since FreeBSD 5.0 which also happens to match the version check. iow you can just apply this.
Comment 6 commit-hook freebsd_committer 2020-01-10 00:02:53 UTC
A commit references this bug:

Author: ler
Date: Fri Jan 10 00:02:33 UTC 2020
New revision: 522545
URL: https://svnweb.freebsd.org/changeset/ports/522545

Log:
  sysutils/lsof: fix after  base r356432.

  PR:		243172
  Submitted by:	mjg
  Reported by:	yasu@utahime.org

Changes:
  head/sysutils/lsof/Makefile
  head/sysutils/lsof/files/patch-dialects_freebsd_dnode.c
  head/sysutils/lsof/files/patch-dialects_freebsd_dnode2.c
Comment 7 Larry Rosenman freebsd_committer 2020-01-10 00:03:14 UTC
Committed.  Thanks!