Re: 9.0 Stable unable to buildworld, missing KERN_PROC_ENV in kvm_proc.c

2012-02-05 Thread Mikolaj Golub

On Sun, 5 Feb 2012 20:09:08 +1100 Dewayne wrote:

 D Unfortunately 9.0 Stable fails to compile due to missing declaration of
 D KERN_PROC_ENV in /usr/src/lib/libkvm/kvm_proc.c.  csup'ed from today.

 D Please refer to the following changes on 30-Jan-2012: 
 D 
http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libkvm/kvm_proc.c.diff?r1=1.106.2.1;r2=1.106.2.2;f=h

 D Compile error reads:
 D cc -O2 -pipe -pipe -O2 -g0 -DSTRIP_FBSDID -UDEBUGGING -march=prescott 
-mtune=prescott  -DLIBC_SCCS -I/usr/src/lib/libkvm
 D -DNDEBUG -std=gnu99 -fstack-protector -Wsystem-headers -Wall 
-Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes
 D -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign 
-c /usr/src/lib/libkvm/kvm_proc.c
 D /usr/src/lib/libkvm/kvm_proc.c: In function 'kvm_argv':
 D /usr/src/lib/libkvm/kvm_proc.c:663: error: 'KERN_PROC_ENV' undeclared 
(first use in this function)
 D /usr/src/lib/libkvm/kvm_proc.c:663: error: (Each undeclared identifier is 
reported only once
 D /usr/src/lib/libkvm/kvm_proc.c:663: error: for each function it appears in.)

 D Am I the last person using i386 architecture?  ;) I'm half joking. The
 D buildworld completes successfully for architecture=amd64.

And there should not be problems with i386 too. The error does not look like
architecture specific. Could you please recheck your sources and building
procedure and give more details if the error still exists.

KERN_PROC_ENV is declared in sys/sys/sysctl.h, and this was MFCed in r230754,
before the MFC lib/libkvm (r230780) you are referring to.

-- 
Mikolaj Golub
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


RE: 9.0 Stable unable to buildworld, missing KERN_PROC_ENV in kvm_proc.c

2012-02-05 Thread Dewayne Geraghty
Hi Mikolaj,

As part of the process, I delete all logs, audit trails of the build, 
/usr/obj/* and the various DESTDIR's that have been set.
The build process is from a single /usr/src but I do modify MAKEOBJDIRPREFIX, 
DESTDIR and various WITHOUT_ statements through
variable switches in {make,src}.conf.

And you're right, in the sources, KERN_PROC_ENV is defined.
# ls -lrth /usr/src/sys/sys/sysctl.h
-rw-r--r--  1 root  wheel30k Jan 30 19:56 /usr/src/sys/sys/sysctl.h
# grep KERN_PROC_ENV /usr/src/sys/sys/sysctl.h
#define KERN_PROC_ENV   35  /* get environment */

The clue seems to be in here
# ls -lrth /usr/src/sys/sys/ |tail -n 12
-rw-r--r--  1 root  wheel   4.2k Jan 16 19:10 mchain.h
-rw-r--r--  1 root  wheel   8.2k Jan 16 19:10 iconv.h
-rw-r--r--  1 root  wheel   6.2k Jan 23 22:24 umtx.h
-rw-r--r--  1 root  wheel31k Jan 23 22:24 pmc.h
-rw-r--r--  1 root  wheel11k Jan 23 22:24 param.h  # The following aren't 
copied into /usr/include
-rw-r--r--  1 root  wheel30k Jan 30 06:24 mount.h
-rw-r--r--  1 root  wheel30k Jan 30 19:56 sysctl.h
-rw-r--r--  1 root  wheel   5.6k Jan 30 19:56 resourcevar.h
-rw-r--r--  1 root  wheel39k Jan 30 19:56 proc.h
-rw-r--r--  1 root  wheel15k Feb  4 15:19 mutex.h
-rw-r--r--  1 root  wheel40k Feb  4 15:19 elf_common.h
-rw-r--r--  1 root  wheel11k Feb  4 15:19 sx.h
# ls -lrth /usr/include/sys/ | tail -n 12
-r--r--r--  1 root  wheel11k Jan  9 00:05 syscallsubr.h
-r--r--r--  1 root  wheel11k Jan  9 00:05 syscall.h   
-r--r--r--  1 root  wheel   5.0k Jan  9 00:05 resource.h
-r--r--r--  1 root  wheel10k Jan  9 00:05 file.h
-r--r--r--  1 root  wheel10k Jan  9 00:05 fcntl.h
-r--r--r--  1 root  wheel   6.4k Jan 13 10:32 taskqueue.h
-r--r--r--  1 root  wheel28k Jan 14 17:54 vnode.h
-r--r--r--  1 root  wheel   8.2k Jan 16 19:38 iconv.h
-r--r--r--  1 root  wheel   4.2k Jan 16 19:38 mchain.h
-r--r--r--  1 root  wheel   6.2k Jan 23 23:09 umtx.h
-r--r--r--  1 root  wheel31k Jan 23 23:09 pmc.h
-r--r--r--  1 root  wheel11k Jan 23 23:09 param.h  # I'm looking into why 
this is the last file copied.

I'm reviewing my build logs to ascertain why files after param.h aren't being 
copied from /usr/src/sys into /usr/include

Its after midnight so I'll continue investigating tomorrow, clearly its going 
to take some time. The buildworld succeeding only
for amd64/K8-sse is the really confusing part.  So far, I note that log files 
each contain:
...
if [ -L /usr/obj/prod/900/P/PRESCOTT/usr/src/tmp/usr/include/sys ]; then  rm -f
/usr/obj/prod/900/P/PRESCOTT/usr/src/tmp/usr/include/sys;  fi
...

cd /usr/src/include/../sys/sys;  for h in *.h; do  ln -fs ../../../sys/sys/$h
/usr/obj/prod/900/P/PRESCOTT/usr/src/tmp/usr/include/sys;  done
...
Which seems normal.  

And yes, grep KERN_PROC_ENV  
/usr/obj/prod/900/P/PRESCOTT/usr/src/tmp/usr/include/sys/sysctl.h is defined 

Kind regards, Dewayne.

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org