Bug 196103 - update to sysutils/lsof 4.89A is broken on 10.1-STABLE
Summary: update to sysutils/lsof 4.89A is broken on 10.1-STABLE
Status: Closed DUPLICATE of bug 196142
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Thomas Zander
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-18 18:53 UTC by rallenh
Modified: 2014-12-21 18:08 UTC (History)
6 users (show)

See Also:


Attachments
Quick fix patch for files/ directory (307 bytes, patch)
2014-12-19 10:26 UTC, Tomoaki AOKI
no flags Details | Diff
Updated quick fix patch for files/ directory (283 bytes, patch)
2014-12-20 04:16 UTC, Tomoaki AOKI
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description rallenh 2014-12-18 18:53:57 UTC
Looks like lsof got updated in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195679.

On 10.1-STABLE:
===>>> lsof-4.88,8 1/1

===>>> Currently installed version: lsof-4.88,8
===>>> Port directory: /usr/ports/sysutils/lsof

===>  Cleaning for lsof-4.89.a,8
===>   lsof-4.89.a,8 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by lsof-4.89.a,8 for building
===>  Extracting for lsof-4.89.a,8
=> SHA256 Checksum OK for lsof_4.89A.freebsd.tar.bz2.
===>  Patching for lsof-4.89.a,8
===>  Configuring for lsof-4.89.a,8
Creating ./lockf_owner.h from /usr/src/sys/kern/kern_lockf.c
./lockf_owner.h creation succeeded.
rm -f ddev.c dfile.c dlsof.h dmnt.c dnode*.c dproc.c dproto.h dsock.c dstore.c dzfs.h kernelbase.h machine.h machine.h.old new_machine.h __lseek.s Makefile Makefile.zfs ./tests/config.cflags
rm -f ./tests/config.cc ./tests/config.xobj ./tests/config.ldflags
Testing C library for localtime() and strftime(), using cc ... present
ln -s dialects/freebsd/dlsof.h dlsof.h
ln -s dialects/freebsd/dmnt.c dmnt.c
ln -s dialects/freebsd/dnode.c dnode.c
ln -s dialects/freebsd/dnode1.c dnode1.c
ln -s dialects/freebsd/dnode2.c dnode2.c
ln -s dialects/freebsd/dproc.c dproc.c
ln -s dialects/freebsd/dproto.h dproto.h
ln -s dialects/freebsd/dsock.c dsock.c
ln -s dialects/freebsd/dstore.c dstore.c
ln -s dialects/freebsd/dzfs.h dzfs.h
ln -s dialects/freebsd/machine.h machine.h
Makefile and lib/Makefile created.
Makefile.zfs created.
./tests/config.cc created
./tests/config.cflags created
./tests/config.ldflags created
./tests/config.xobj created
===>  Building for lsof-4.89.a,8
Constructing version.h
(cd lib; /usr/bin/make DEBUG="-O2" CFGF="-pipe -march=pentium4 -fstack-protector -fno-strict-aliasing -march=pentium4 -DHASTASKS -DHAS_PAUSE_SBT -DHASEFFNLINK=i_effnlink -DHASF_VNODE -DHAS_FILEDESCENT -DHAS_TMPFS -DHASWCTYPE_H -DHASSBSTATE -DHAS_KVM_VNODE -DHAS_UFS1_2 -DHAS_VM_MEMATTR_T -DHAS_CDEV2PRIV -DHAS_NO_SI_UDEV -DHAS_SYS_SX_H -DHAS_ZFS -DHAS_V_LOCKF -DHAS_LOCKF_ENTRY -DHAS_NO_6PORT -DHAS_NO_6PPCB -DNEEDS_BOOLEAN_T -DFREEBSDV=10000 -DHASFDESCFS=2 -DHASPSEUDOFS -DHASNULLFS -DHASIPv6 -DHASUTMPX -DHAS_STRFTIME -DLSOF_VSTR=\"10.1-STABLE\"")
cc  -pipe -march=pentium4 -fstack-protector -fno-strict-aliasing -march=pentium4 -DHASTASKS -DHAS_PAUSE_SBT -DHASEFFNLINK=i_effnlink -DHASF_VNODE -DHAS_FILEDESCENT -DHAS_TMPFS -DHASWCTYPE_H -DHASSBSTATE -DHAS_KVM_VNODE -DHAS_UFS1_2 -DHAS_VM_MEMATTR_T -DHAS_CDEV2PRIV -DHAS_NO_SI_UDEV -DHAS_SYS_SX_H -DHAS_ZFS -DHAS_V_LOCKF -DHAS_LOCKF_ENTRY -DHAS_NO_6PORT -DHAS_NO_6PPCB -DNEEDS_BOOLEAN_T -DFREEBSDV=10000 -DHASFDESCFS=2 -DHASPSEUDOFS -DHASNULLFS -DHASIPv6 -DHASUTMPX -DHAS_STRFTIME -DLSOF_VSTR="10.1-STABLE" -I/usr/src/sys -O2 -c ckkv.c
In file included from ckkv.c:43:
In file included from ./../lsof.h:195:
In file included from ./../dlsof.h:208:
In file included from /usr/src/sys/ufs/ufs/ufsmount.h:36:
In file included from /usr/src/sys/sys/buf.h:260:
/usr/src/sys/sys/proc.h:950:1: error: unknown type name 'bool'
bool    thread_suspend_check_needed(void);
^
1 error generated.
*** [ckkv.o] Error code 1

make[2]: stopped in /usr/home/ports/sysutils/lsof/work/lsof_4.89A.freebsd/lib
1 error

make[2]: stopped in /usr/home/ports/sysutils/lsof/work/lsof_4.89A.freebsd/lib
*** [lib/liblsof.a] Error code 2

make[1]: stopped in /usr/home/ports/sysutils/lsof/work/lsof_4.89A.freebsd
1 error

make[1]: stopped in /usr/home/ports/sysutils/lsof/work/lsof_4.89A.freebsd
===> 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/home/ports/sysutils/lsof

===>>> make build failed for sysutils/lsof
===>>> Aborting update

===>>> Update for lsof-4.88,8 failed
===>>> Aborting update


===>>> You can restart from the point of failure with this command line:
       portmaster <flags> sysutils/lsof sysutils/tcplist ports-mgmt/packagekit

$ svn info
Path: .
Working Copy Root Path: /usr/home/ports
URL: http://svn0.us-east.freebsd.org/ports/head
Relative URL: ^/head
Repository Root: http://svn0.us-east.freebsd.org/ports
Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
Revision: 374880
Node Kind: directory
Schedule: normal
Last Changed Author: swills
Last Changed Rev: 374880
Last Changed Date: 2014-12-17 20:22:55 -0500 (Wed, 17 Dec 2014)

$ uname -a
FreeBSD static-173-53-110-7.rcmdva.fios.verizon.net 10.1-STABLE FreeBSD 10.1-STABLE #0 r275875: Thu Dec 18 05:34:32 EST 2014     root@static-173-53-110-7.rcmdva.fios.verizon.net:/usr/obj/usr/home/src/sys/STATIC-173-53-110-7  i386
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-12-18 18:53:57 UTC
Maintainers CC'd
Comment 2 david 2014-12-18 19:07:00 UTC
I also see this, running:
FreeBSD g1-253.catwhisker.org 10.1-STABLE FreeBSD 10.1-STABLE #1416  r275898M/275898:1001504: Thu Dec 18 04:54:38 PST 2014     root@g1-253.catwhisker.org:/common/S1/obj/usr/src/sys/CANARY  i386

with a ports tree that is a working copy as of r374890.
Comment 3 Larry Rosenman freebsd_committer freebsd_triage 2014-12-18 19:29:55 UTC
Can any of the reporters or FreeBSD guys give Vic access to a i386 box?
Comment 4 Larry Rosenman freebsd_committer freebsd_triage 2014-12-18 19:32:09 UTC
This DOES appear to be i386 specific, as my amd64 box does NOT exhibit this issue.
Comment 5 rallenh 2014-12-18 19:55:58 UTC
Larry,

e-mail me his pubkey...
Comment 6 Larry Rosenman freebsd_committer freebsd_triage 2014-12-18 20:19:43 UTC
Done.
Comment 7 Tomoaki AOKI 2014-12-19 10:26:49 UTC
Created attachment 150751 [details]
Quick fix patch for files/ directory

Storing attached file in sysutils/lsof/files/ fixes build for me.
stable/10 r275900 amd64.
Possibly breaks other branch/arch.
Comment 8 Tomoaki AOKI 2014-12-19 10:28:40 UTC
(In reply to Larry Rosenman from comment #4)
> This DOES appear to be i386 specific, as my amd64 box does NOT exhibit this
> issue.

No. stable/10 r275900 amd64 is affected for me.
Comment 9 david 2014-12-19 13:26:43 UTC
Installing the patch in ports/sysutils/lsof/files also allowed lsof-4.89.a,8 to build & install for me -- today, running:

FreeBSD g1-253.catwhisker.org 10.1-STABLE FreeBSD 10.1-STABLE #1417  r275933M/275935:1001504: Fri Dec 19 05:05:40 PST 2014     root@g1-253.catwhisker.org:/common/S1/obj/usr/src/sys/CANARY  i386

with a ports working copy @374940.
Comment 10 Larry Rosenman freebsd_committer freebsd_triage 2014-12-19 14:24:00 UTC
I will point vic here, but suspect his "official" fix will be something else. 

That said, I have no problem if a committer commits this.
Comment 11 Larry Rosenman freebsd_committer freebsd_triage 2014-12-19 19:26:23 UTC
pr 196142 should fix this.
Comment 12 Tomoaki AOKI 2014-12-20 04:13:11 UTC
(In reply to Larry Rosenman from comment #11)
> pr 196142 should fix this.

Unfortunately, not fixes for me. stable/10 r275926 amd64.
(Updated base yesterday.)

Needs including stdbool.h in dialects/freebsd/dlsof.h.
Actually, looking in a bit further, including sys/types.h
in my previous patch was overkill.

Please note that possibly my patch would not be needed for
branches / archs other than stable/10 amd64.
(Not tested with other branches/archs.)

Other solution but not recommended:
 Add typedef for bool somewhere in dialects/freebsd/dlsof.h
 instead of including stdbool.h.

Reason:
 Typedef for type bool is missing. Possibly problem in base,
 as lsof was built fine before. (Cannot recall the revision.)
Comment 13 Tomoaki AOKI 2014-12-20 04:16:49 UTC
Created attachment 150793 [details]
Updated quick fix patch for files/ directory

Including sys/types.h was overkill.
Possibly need adding version check for base.
Comment 14 Thomas Zander freebsd_committer freebsd_triage 2014-12-20 16:54:26 UTC

*** This bug has been marked as a duplicate of bug 196142 ***
Comment 15 diffie 2014-12-21 18:08:16 UTC
(In reply to Tomoaki AOKI from comment #13)
> Created attachment 150793 [details]
> Updated quick fix patch for files/ directory
> 
> Including sys/types.h was overkill.
> Possibly need adding version check for base.

This patch fixes build for me on amd64. Thanks!