NetBSD Problem Report #10706

Received: (qmail 20659 invoked from network); 29 Jul 2000 07:16:09 -0000
Message-Id: <200007290716.e6T7G8Y09537@capsicum.wsrcc.com>
Date: Sat, 29 Jul 2000 00:16:08 -0700 (PDT)
From: Wolfgang Rupprecht <wolfgang@wsrcc.com>
Reply-To: wolfgang@wsrcc.com
To: gnats-bugs@gnats.netbsd.org
Subject: pkgsrc lsof doesn't compile after a cleanup of /usr/include
X-Send-Pr-Version: 3.95

>Number:         10706
>Category:       pkg
>Synopsis:       lsof doesn't build after a cleanup of /usr/include
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 29 07:17:00 +0000 2000
>Closed-Date:    Fri Aug 04 01:40:34 +0000 2000
>Last-Modified:  Fri Aug 04 01:40:34 +0000 2000
>Originator:     Wolfgang Rupprecht
>Release:        Jul 26 2000
>Organization:
W S Rupprecht Computer Consulting, Fremont CA
>Environment:

System: NetBSD capsicum.wsrcc.com 1.5C NetBSD 1.5C (WSRCC) #0: Wed Jul 26 23:02:08 PDT 2000 wolfgang@capsicum.wsrcc.com:/v/src/netbsd/NetBSD-current/usr/src/sys/arch/i386/compile/WSRCC i386


>Description:
	lsof doesn't build after a cleanup of /usr/include	

>How-To-Repeat:
	/bin/rm -rf /usr/include
	cd /usr/src
	make build
	<go out for half a dozen beers>
	cd /usr/pkgsrc/sysutils/lsof
	make build

	cc  -DNETBSDV=1050 -DHASNFSPROTO -DHASIPv6 -DHASFDESCFS=1 -DHASFDLINK -DHASPROCFS -DHAS9660FS -DHASKERNFS -DHASNCVPID -DHASI_FFS -DHASEXT2FS -DHASI_E2FS -DHASNFSVATTRP -DUVM -I/v/obj/pkgsrc/sysutils/lsof/work/lsof_4.50/dialects/n+obsd/uvm_include -DHASCWDINFO -DN_UNIXV=/netbsd -DLSOF_VSTR="1.5C" -I/usr/include -I/sys -O  -c dvch.c
	In file included from ../lsof.h:167,
			 from dvch.c:43:
	../dlsof.h:200: vm/vm.h: No such file or directory
	../dlsof.h:201: vm/vm_map.h: No such file or directory
	../dlsof.h:202: vm/vm_object.h: No such file or directory
	../dlsof.h:203: vm/vm_pager.h: No such file or directory
	*** Error code 1

	Stop.


I guess nobody ever tried to clean up all the accumulated crap in
their their /usr/include. ;-)


>Fix:
	I think this is all that is needed (and it certainly seems to work).

cd /usr/pkgsrc/sysutils/lsof/work/lsof_4.50/dialects/n+obsd/
diff -u /usr/pkgsrc/sysutils/lsof/work/lsof_4.50/dialects/n\+obsd/dlsof.h.\~1\~ /usr/pkgsrc/sysutils/lsof/work/lsof_4.50/dialects/n\+obsd/dlsof.h
--- /usr/pkgsrc/sysutils/lsof/work/lsof_4.50/dialects/n+obsd/dlsof.h.~1~	Thu Jun 22 05:55:29 2000
+++ /usr/pkgsrc/sysutils/lsof/work/lsof_4.50/dialects/n+obsd/dlsof.h	Fri Jul 28 23:59:59 2000
@@ -197,10 +197,10 @@
 #include <uvm/uvm.h>
 # endif	/* defined(UVM) */

-#include <vm/vm.h>
-#include <vm/vm_map.h>
-#include <vm/vm_object.h>
-#include <vm/vm_pager.h>
+#include <uvm/uvm.h>
+#include <uvm/uvm_map.h>
+#include <uvm/uvm_object.h>
+#include <uvm/uvm_pager.h>

 # if	defined(OPENBSDV)
 #  if	OPENBSDV==2030 && defined(__sparc__)

Diff finished at Sat Jul 29 00:03:30
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: jlam 
State-Changed-When: Sat Jul 29 01:52:47 PDT 2000 
State-Changed-Why:  
I just committed a change to the package which should allow it to compile 
on newer systems which don't have <vm/vm*.h> headers.  Please let me know 
if this fixes your problem.  Thanks! 

From: matthew green <mrg@eterna.com.au>
To: wolfgang@wsrcc.com
Cc: gnats-bugs@gnats.netbsd.org
Subject: re: pkg/10706: pkgsrc lsof doesn't compile after a cleanup of /usr/include 
Date: Sun, 30 Jul 2000 22:53:14 +1000


    -#include <vm/vm.h>
    -#include <vm/vm_map.h>
    -#include <vm/vm_object.h>
    -#include <vm/vm_pager.h>
    +#include <uvm/uvm.h>
    +#include <uvm/uvm_map.h>
    +#include <uvm/uvm_object.h>
    +#include <uvm/uvm_pager.h>


 not having checked this out, i'd be surprised if all these headers
 are necessary.  infact, it should almost be able to only need
 <uvm/uvm_extern.h>.  could you find out which is the smallest set?

From: Wolfgang Rupprecht <wolfgang@wsrcc.com>
To: matthew green <mrg@eterna.com.au>
Cc: gnats-bugs@gnats.netbsd.org
Subject: re: pkg/10706: pkgsrc lsof doesn't compile after a cleanup of /usr/include 
Date: Sun, 30 Jul 2000 07:28:57 -0700 (PDT)

 matthew green writes:
 >    +#include <uvm/uvm.h>
 >    +#include <uvm/uvm_map.h>
 >    +#include <uvm/uvm_object.h>
 >    +#include <uvm/uvm_pager.h>
 > not having checked this out, i'd be surprised if all these headers
 > are necessary.  infact, it should almost be able to only need
 > <uvm/uvm_extern.h>.  could you find out which is the smallest set?

 You are quite correct.  It turns out the smallest set that will allow 
 lsof to compile is the empty set. ;-)

 Both with and without these files the compilation is quite dirty with
 a few iterations of this complaint: 

 cc  -DNETBSDV=1050 -DHASNFSPROTO -DHASIPv6 -DHASFDESCFS=1 -DHASFDLINK -DHASPROCFS -DHAS9660FS -DHASKERNFS -DHASNCVPID -DHASI_FFS -DHASEXT2FS -DHASI_E2FS -DHASNFSVATTRP -DUVM -I/v/obj/pkgsrc/sysutils/lsof/work/lsof_4.50/dialects/n+obsd/uvm_include -DHASCWDINFO -DN_UNIXV=/netbsd -DLSOF_VSTR="1.5C" -I/usr/include -I/sys -O  -c dvch.c
 In file included from ../dlsof.h:186,
                  from ../lsof.h:167,
                  from dvch.c:43:
 /usr/include/sys/lockf.h:76: warning: `struct vop_advlock_args' declared inside parameter list
 /usr/include/sys/lockf.h:76: warning: its scope is only this definition or declaration,
 /usr/include/sys/lockf.h:76: warning: which is probably not what you want.

 Gcc does exit with 0, and the compilation does finish and produce a
 running lsof that at first glance look plausable.

 -wolfgang
 -- 
 Wolfgang Rupprecht    <wolfgang@wsrcc.com>     http://www.wsrcc.com/wolfgang/
 DGPS signals via the Internet  http://www.wsrcc.com/wolfgang/gps/dgps-ip.html

From: Wolfgang Rupprecht <wolfgang@wsrcc.com>
To: gnats-bugs@gnats.netbsd.org
Cc:  
Subject: pkg/10706: pkgsrc lsof doesn't compile after a cleanup of /usr/include
Date: Sat, 29 Jul 2000 00:16:08 -0700 (PDT)

 >Number:         10706
 >Category:       pkg
 >Synopsis:       lsof doesn't build after a cleanup of /usr/include
 >Confidential:   no
 >Severity:       non-critical
 >Priority:       low
 >Responsible:    pkg-manager
 >State:          open
 >Class:          sw-bug
 >Submitter-Id:   net
 >Arrival-Date:   Sat Jul 29 00:17:00 PDT 2000
 >Closed-Date:
 >Last-Modified:
 >Originator:     Wolfgang Rupprecht
 >Release:        Jul 26 2000
 >Organization:
 W S Rupprecht Computer Consulting, Fremont CA
 >Environment:

 System: NetBSD capsicum.wsrcc.com 1.5C NetBSD 1.5C (WSRCC) #0: Wed Jul 26 23:02:08 PDT 2000 wolfgang@capsicum.wsrcc.com:/v/src/netbsd/NetBSD-current/usr/src/sys/arch/i386/compile/WSRCC i386


 >Description:
         lsof doesn't build after a cleanup of /usr/include      

 >How-To-Repeat:
         /bin/rm -rf /usr/include
         cd /usr/src
         make build
         <go out for half a dozen beers>
         cd /usr/pkgsrc/sysutils/lsof
         make build

         cc  -DNETBSDV=1050 -DHASNFSPROTO -DHASIPv6 -DHASFDESCFS=1 -DHASFDLINK -DHASPROCFS -DHAS9660FS -DHASKERNFS -DHASNCVPID -DHASI_FFS -DHASEXT2FS -DHASI_E2FS -DHASNFSVATTRP -DUVM -I/v/obj/pkgsrc/sysutils/lsof/work/lsof_4.50/dialects/n+obsd/uvm_include -DHASCWDINFO -DN_UNIXV=/netbsd -DLSOF_VSTR="1.5C" -I/usr/include -I/sys -O  -c dvch.c
         In file included from ../lsof.h:167,
                          from dvch.c:43:
         ../dlsof.h:200: vm/vm.h: No such file or directory
         ../dlsof.h:201: vm/vm_map.h: No such file or directory
         ../dlsof.h:202: vm/vm_object.h: No such file or directory
         ../dlsof.h:203: vm/vm_pager.h: No such file or directory
         *** Error code 1

         Stop.


 I guess nobody ever tried to clean up all the accumulated crap in
 their their /usr/include. ;-)


 >Fix:
         I think this is all that is needed (and it certainly seems to work).

 cd /usr/pkgsrc/sysutils/lsof/work/lsof_4.50/dialects/n+obsd/
 diff -u /usr/pkgsrc/sysutils/lsof/work/lsof_4.50/dialects/n\+obsd/dlsof.h.\~1\~ /usr/pkgsrc/sysutils/lsof/work/lsof_4.50/dialects/n\+obsd/dlsof.h
 --- /usr/pkgsrc/sysutils/lsof/work/lsof_4.50/dialects/n+obsd/dlsof.h.~1~        Thu Jun 22 05:55:29 2000
 +++ /usr/pkgsrc/sysutils/lsof/work/lsof_4.50/dialects/n+obsd/dlsof.h    Fri Jul 28 23:59:59 2000
 @@ -197,10 +197,10 @@
  #include <uvm/uvm.h>
  # endif        /* defined(UVM) */

 -#include <vm/vm.h>
 -#include <vm/vm_map.h>
 -#include <vm/vm_object.h>
 -#include <vm/vm_pager.h>
 +#include <uvm/uvm.h>
 +#include <uvm/uvm_map.h>
 +#include <uvm/uvm_object.h>
 +#include <uvm/uvm_pager.h>

  # if   defined(OPENBSDV)
  #  if  OPENBSDV==2030 && defined(__sparc__)

 Diff finished at Sat Jul 29 00:03:30
 >Release-Note:
 >Audit-Trail:
 >Unformatted:


State-Changed-From-To: feedback->closed 
State-Changed-By: jlam 
State-Changed-When: Thu Aug 3 18:40:06 PDT 2000 
State-Changed-Why:  
PR author reports a working lsof binary by removing the <vm/*> headers. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.