Bug 196934 - sysutils/lsof: does not compile when /etc/make.conf is missing [/usr/src/sys/sys/proc.h:909:46: error: unknown type name 'bool']
Summary: sysutils/lsof: does not compile when /etc/make.conf is missing [/usr/src/sys/...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-20 15:30 UTC by Frank Reppin
Modified: 2015-02-02 15:56 UTC (History)
2 users (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 Frank Reppin 2015-01-20 15:30:05 UTC
OS:
====
FreeBSD amazone.undermydesk.org 10.1-STABLE FreeBSD 10.1-STABLE #0 r277236: Fri Jan 16 14:00:15 CET 2015     frank@undermydesk.org:/usr/obj/usr/src/sys/AMAZONE  amd64

problem description:
====================
lsof simply refuses to compile at all when /etc/make.conf is missing
(see make output at bottom) at all.
A simple 'touch /etc/make.conf' is enough to make it happily compile (weird).

lsof version:
===============

lsof-4.89.b,8
Name           : lsof
Version        : 4.89.b,8
Installed on   : Tue Jan 20 16:26:02 CET 2015
Origin         : sysutils/lsof
Architecture   : freebsd:10:x86:64
Prefix         : /usr/local
Categories     : sysutils
Licenses       : 
Maintainer     : ler@lerctr.org
WWW            : http://people.freebsd.org/~abe/
Comment        : Lists information about open files (similar to fstat(1))
Annotations    :
Flat size      : 224KiB
Description    :
Lsof (LiSt Open Files) lists information about files that are open by the
running processes.  An open file may be a regular file, a directory, a block
special file, a character special file, an executing text reference, a
library, a stream or a network file (Internet socket, NFS file or Unix domain
socket).

See also fstat(1) in the base system.

WWW: http://people.freebsd.org/~abe/


'make' gives:
===============
[root@amazone]/usr/ports/sysutils/lsof: make
===>   lsof-4.89.b,8 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by lsof-4.89.b,8 for building
===>  Extracting for lsof-4.89.b,8
=> SHA256 Checksum OK for lsof_4.89B.freebsd.tar.bz2.
===>  Patching for lsof-4.89.b,8
===>  Configuring for lsof-4.89.b,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.b,8
--- version.h ---
--- lib/liblsof.a ---
--- dmnt.o ---
--- dnode.o ---
Constructing version.h
--- lib/liblsof.a ---
(cd lib; /usr/bin/make DEBUG="-O" CFGF="-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\"")
--- dmnt.o ---
cc  -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 -O -c dmnt.c
--- dnode.o ---
cc  -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 -O -c dnode.c
--- lib/liblsof.a ---
--- ckkv.o ---
cc  -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 -O -c ckkv.c
--- cvfs.o ---
cc  -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 -O -c cvfs.c
--- dnode1.o ---
cc  -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 -O -c dnode1.c
--- dmnt.o ---
In file included from dmnt.c:39:
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:909:46: error: unknown type name 'bool'
void    reaper_abandon_children(struct proc *p, bool exiting);
--- dnode.o ---
In file included from dnode.c:39:
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:909:46: error: unknown type name 'bool'
void    reaper_abandon_children(struct proc *p, bool exiting);
                                                ^
--- dmnt.o ---
                                                ^
--- dnode.o ---
/usr/src/sys/sys/proc.h:962:1: error: unknown type name 'bool'
--- dmnt.o ---
/usr/src/sys/sys/proc.h:962:1: error: unknown type name 'bool'
bool    thread_suspend_check_needed(void);
^
--- dnode.o ---
bool    thread_suspend_check_needed(void);
^
--- lib/liblsof.a ---
--- ckkv.o ---
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:909:46: error: unknown type name 'bool'
void    reaper_abandon_children(struct proc *p, bool exiting);
                                                ^
/usr/src/sys/sys/proc.h:962:1: error: unknown type name 'bool'
bool    thread_suspend_check_needed(void);
^
--- dnode1.o ---
In file included from dnode1.c:42:
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:909:46: error: unknown type name 'bool'
void    reaper_abandon_children(struct proc *p, bool exiting);
                                                ^
/usr/src/sys/sys/proc.h:962:1: error: unknown type name 'bool'
bool    thread_suspend_check_needed(void);
^
--- dmnt.o ---
2 errors generated.
*** [dmnt.o] Error code 1

make[1]: stopped in /usr/ports/sysutils/lsof/work/lsof_4.89B.freebsd
--- lib/liblsof.a ---
2 errors generated.
*** [ckkv.o] Error code 1

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

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

make[1]: stopped in /usr/ports/sysutils/lsof/work/lsof_4.89B.freebsd
--- dnode.o ---
2 errors generated.
*** [dnode.o] Error code 1

make[1]: stopped in /usr/ports/sysutils/lsof/work/lsof_4.89B.freebsd
--- dnode1.o ---
2 errors generated.
*** [dnode1.o] Error code 1

make[1]: stopped in /usr/ports/sysutils/lsof/work/lsof_4.89B.freebsd
4 errors

make[1]: stopped in /usr/ports/sysutils/lsof/work/lsof_4.89B.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/ports/sysutils/lsof
[root@amazone]/usr/ports/sysutils/lsof:
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2015-01-20 15:30:05 UTC
Maintainer CC'd
Comment 2 Larry Rosenman freebsd_committer freebsd_triage 2015-01-20 15:32:45 UTC
Do you have any ports configuration?  This is missing a BUNCH of the STANDARD CFLAGS that the infrastructure supplies.
Comment 3 Frank Reppin 2015-01-20 16:50:34 UTC
Nope - nothing special at all.

Additionally noteworthy might be the fact that it used
to compile fine all the time (up to and until at least 10.1-PRERELEASE-r271417 iirc).
It suddenly failed to compile back when 10.1 got officially released
(my build back then was 10.1-STABLE-r274698 iirc).

At first I thought that sth else might have been broken and eagerly
awaited patches to sysutils/lsof - which ofcourse arrived as:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195679
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196142

but since especially PR196142 didn't work for me I've started investigating
things by myself and came across this comment:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196142#c9

... which pointed me to /etc/make.conf - but I didn't even had one.
I then tried compiling again with an emtpy (but present) /etc/make.conf
and it suddenly worked.

Can't you reproduce it with _no_ /etc/make.conf at all?
Comment 4 Larry Rosenman freebsd_committer freebsd_triage 2015-01-20 16:51:47 UTC
I will try it tonight when I get home from work --
Comment 5 Larry Rosenman freebsd_committer freebsd_triage 2015-01-20 20:26:32 UTC
I can reproduce the failure if I move my normal /etc/make.conf to /etc/make.conf.keep

Ports Guys:
    I need some help here.
Comment 6 Larry Rosenman freebsd_committer freebsd_triage 2015-02-01 22:10:36 UTC
SVN r378245 should fix this.
Comment 7 Frank Reppin 2015-02-02 09:24:05 UTC
Ack - works for me now too.
Thanks to you and to those in #197241.
Comment 8 John Marino freebsd_committer freebsd_triage 2015-02-02 15:56:33 UTC
fixed with closed bug 197241 I think.