Bug 242758 - sysutils/lsof: Fails to build on FreeBSD 12.1-RELEASE-p1 powerpc 32 bit: vm_page.h:204: error: field 'md' has incomplete type
Summary: sysutils/lsof: Fails to build on FreeBSD 12.1-RELEASE-p1 powerpc 32 bit: vm_p...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: powerpc Any
: --- Affects Only Me
Assignee: Larry Rosenman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-21 07:41 UTC by canardo
Modified: 2020-01-21 16:48 UTC (History)
3 users (show)

See Also:
ler: maintainer-feedback+
ler: merge-quarterly+


Attachments
patch (1.01 KB, patch)
2020-01-21 12:58 UTC, Piotr Kubaj
pkubaj: maintainer-approval? (ler)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description canardo 2019-12-21 07:41:35 UTC
Problem found when building sysutils/lsof on FreeBSD 12.1-RELEASE-p1 powerpc 32 bit, running on Apple Powerbook 17".

(lsof required to build sysutils/htop)


# cd /usr/ports/sysutils/lsof
# make install clean
===>  Building for lsof-4.93.2_5,8
Constructing version.h
(cd lib; /usr/bin/make DEBUG="-O2" CFGF="-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=12000 -DHASFDESCFS=2 -DHASPSEUDOFS -DHASNULLFS -DHASIPv6 -DHASUTMPX -DHAS_STRFTIME -DLSOF_VSTR=\"12.1-RELEASE-p1\"")
cc  -pipe -fstack-protector-strong -fno-strict-aliasing -DNEEDS_BOOL_TYPEDEF -DFREEBSDV=12000 -DHAS_ZFS -DHAS_CV_TIMEDWAIT_SBT -DHAS_V_LOCKF -D_SOLARIS_C_SOURCE -O2 -I/usr/src/sys/cddl/compat/opensolaris -I/usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs -I/usr/src/sys/cddl/contrib/opensolaris/uts/common/zmod -I/usr/src/sys/cddl/contrib/opensolaris/uts/common -I/usr/src/sys/cddl/contrib/opensolaris/common/zfs -I/usr/src/sys/cddl/contrib/opensolaris/common -I/usr/ports/sysutils/lsof/work/lsof-4.93.2/usr/src/include -I`pwd` -c dnode2.c -o dnode2.o
In file included from /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h:103,
                 from /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h:47,
                 from /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h:33,
                 from dnode2.c:56:
/usr/include/vm/vm_page.h:204: error: field 'md' has incomplete type
*** [dnode2.o] Error code 1

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

make[2]: stopped in /usr/ports/sysutils/lsof/work/lsof-4.93.2
*** [dnode2.o] Error code 2

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

make[1]: stopped in /usr/ports/sysutils/lsof/work/lsof-4.93.2
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/lsof
Comment 1 Larry Rosenman freebsd_committer freebsd_triage 2019-12-21 14:03:51 UTC
I'm asking for some powerpc32 folks to chime in on our (FreeBSD Project) internal developers list.

Thanks for the report.
Comment 2 Piotr Kubaj freebsd_committer freebsd_triage 2020-01-21 12:58:05 UTC
Created attachment 210914 [details]
patch

The following patch fixes build on powerpc64, powerpc and pleases portlint. powerpc64 users need to either define AIM or BOOKE, this is dependent on the hardware they have (99% of users have AIM). powerpc is all AIM AFAIK, powerpcspe is all BOOKE AFAIK.

powerpc needs also -lzpool workaround, I'm not sure about powerpcspe.

Also remove whitespace after "can" and empty line after -lzpool's if.

Tabify CONFIGURE_ENV.

Please also MFH since this is a build fix.
Comment 3 commit-hook freebsd_committer freebsd_triage 2020-01-21 15:41:23 UTC
A commit references this bug:

Author: ler
Date: Tue Jan 21 15:41:15 UTC 2020
New revision: 523727
URL: https://svnweb.freebsd.org/changeset/ports/523727

Log:
  sysutils/lsof: fix build on powerpc, powerpc64, powerpcse

  PR:		242758
  Submitted by:	pkubaj
  MFH:		2020Q1

Changes:
  head/sysutils/lsof/Makefile
Comment 4 commit-hook freebsd_committer freebsd_triage 2020-01-21 16:47:35 UTC
A commit references this bug:

Author: ler
Date: Tue Jan 21 16:46:44 UTC 2020
New revision: 523728
URL: https://svnweb.freebsd.org/changeset/ports/523728

Log:
  MFH: r522273 r522545 r522582 r523727

  sysutils/lsof: fix build following base r356337.

  I took the patch from 243122 as it was more correct.

  PR:		243122, 243083
  Submitted by:	cy, yasu@utahime.org

  sysutils/lsof: fix after  base r356432.

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

  sysutils/lsof: add a PPC64 work around for needing -lzpool

  PR:		242833
  Submitted by:	luciano@vespaperitivo.it

  sysutils/lsof: fix build on powerpc, powerpc64, powerpcse

  PR:		242758
  Submitted by:	pkubaj

  Approved by:	ports-secteam (joneum)

Changes:
_U  branches/2020Q1/
  branches/2020Q1/sysutils/lsof/Makefile
  branches/2020Q1/sysutils/lsof/files/patch-dialects_freebsd_dnode.c
  branches/2020Q1/sysutils/lsof/files/patch-dialects_freebsd_dnode2.c
Comment 5 Larry Rosenman freebsd_committer freebsd_triage 2020-01-21 16:48:36 UTC
Committed and MFH'd. 

Thanks.