Re: Problem compiling lsof

2010-05-26 Thread The-IRC FreeBSD
I personally just synced my servers Kernel and Userland to current via cvsup
on a live system and still get same issue as discussed here for unknown
reasons.

FreeBSD Alpha.The-IRC.Com 8.0-STABLE FreeBSD 8.0-STABLE

===  Vulnerability check disabled, database not found
===  Extracting for lsof-4.83B,4
= MD5 Checksum OK for lsof_4.83B.freebsd.tar.bz2.
= SHA256 Checksum OK for lsof_4.83B.freebsd.tar.bz2.
===  Patching for lsof-4.83B,4
===  Configuring for lsof-4.83B,4
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.83B,4
(cd lib; make DEBUG=-O2 CFGF=-pipe -fno-strict-aliasing
-DHASEFFNLINK=i_effnlink -DHASF_VNODE -DHASSBSTATE -DHAS_KVM_VNODE
-DHAS_UFS1_2 -DHAS_CDEV2PRIV -DHAS_NO_SI_UDEV -DHAS_SYS_SX_H -DHAS_ZFS
-DHAS_V_LOCKF -DHAS_LOCKF_ENTRY -DHAS_NO_6PORT -DHAS_NO_6PPCB
-DFREEBSDV=8000 -DHASFDESCFS=2 -DHASPSEUDOFS -DHASNULLFS -DHASIPv6
-DHAS_STRFTIME -DLSOF_VSTR=\8.0-STABLE\)
cc  -pipe -fno-strict-aliasing -DHASEFFNLINK=i_effnlink -DHASF_VNODE
-DHASSBSTATE -DHAS_KVM_VNODE -DHAS_UFS1_2 -DHAS_CDEV2PRIV -DHAS_NO_SI_UDEV
-DHAS_SYS_SX_H -DHAS_ZFS -DHAS_V_LOCKF -DHAS_LOCKF_ENTRY -DHAS_NO_6PORT
-DHAS_NO_6PPCB -DFREEBSDV=8000 -DHASFDESCFS=2 -DHASPSEUDOFS -DHASNULLFS
-DHASIPv6 -DHAS_STRFTIME -DLSOF_VSTR=8.0-STABLE -I/usr/src/sys -O2 -c
ckkv.c
In file included from ../dlsof.h:81,
 from ../lsof.h:195,
 from ckkv.c:43:
/usr/src/sys/sys/conf.h:141: error: expected declaration specifiers or '...'
before 'vm_memattr_t'
*** Error code 1

Stop in /usr/ports/sysutils/lsof/work/lsof_4.83B.freebsd/lib.
*** Error code 1

Stop in /usr/ports/sysutils/lsof/work/lsof_4.83B.freebsd.
*** Error code 1



[r...@alpha /usr/ports/sysutils/lsof]# cat /etc/make.conf
IPFW2=TRUE
WITHOUT_X11_LIBS=NO
OPENSSL_OVERWRITE_PORT=yes
KERNCONF=TIHS
WITHOUT_JAVA=yes
PERL_VER=5.10.1
PERL_VERSION=5.10.1
# added by use.perl 2010-05-18 19:41:32
PERL_VERSION=5.8.9
BATCH=YES
WITHOUT_X11=YES
SKIP_DNS_CHECK=YES
CRYPT_DES=0
WITH_PORT_REPLACES_BASE_BIND8=YES
WITH_PORT_REPLACES_BASE_BIND9=YES
WITHOUT_ALT_CONFIG_PREFIX=YES
WITH_OPENSSL_PORT=YES
X11BASE=${LOCALBASE}



[r...@alpha /usr/ports/sysutils/lsof]# cat /etc/profile
if [ -f ~/README ]; then
cat ~/README
fi

export EDITOR=nano
alias nano='nano -w'
#export PATH=$PATH:/usr/local/svn/bin
CLICOLOR=YES;export CLICOLOR
LSCOLORS=ExGxFxdxCxDxDxhbadExEx;export LSCOLORS
#CFLAGS=-DBIG_SECURITY_HOLE



[r...@alpha /usr/ports/sysutils/lsof]# grep vm_memattr_t
/usr/include/sys/conf.h
 int nprot, vm_memattr_t *memattr);
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Problem compiling lsof

2010-05-25 Thread Larry Rosenman
Can you also make sure that the installed world and kernel matches the source 
tree?

Thanks,
Larry Rosenman
lsof maintainer

Charlie Kester corky1...@comcast.net wrote:

On Mon 24 May 2010 at 18:54:11 PDT Lowell Gilbert wrote:
Arthur Barlow arthurbar...@gmail.com writes:

 Sorry about the false start. Fat fingers.  I'm trying to compile the lsof
 program in FreeBSD 8.0 on an i686 machine.  There is a error referencing
 dlsof.h and it looks like there is an ugly hack in the header file.  Any
 suggestions, besides playing with the code?

As of a few minutes ago, it built just fine on my i386 build system with
the latest ports.  If you want help diagnosing your issue, you will need
to be much more specific about what happens on your particular system,
so we can figure out how it differs from a normal system.

Since we're talking about building a port, you should also involve its
maintainer. I've cc'ed him with this reply.

I just tried building lsof myself, on a 686-class 8.0-STABLE machine,
and had the same successful result as Lowell.

Can you give us a copy of the build output, beginning with the cc
command line that immediately precedes the failure?

--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Problem compiling lsof

2010-05-25 Thread Arthur Barlow
Message: 29
Date: Mon, 24 May 2010 22:14:52 -0700
From: Charlie Kester corky1...@comcast.net
Subject: Re: Problem compiling lsof
To: freebsd-questions@freebsd.org
Message-ID: 20100525051452.gi...@comcast.net
Content-Type: text/plain; charset=us-ascii; format=flowed

On Mon 24 May 2010 at 21:55:01 PDT Charlie Kester wrote:

The Configure script grep's for vm_memattr_t in
${LSOF_INCLUDE}/sys/conf.h and sets HAS_VM_MEMATTR_T if the grep
succeeds. The build failure tells us that your /usr/src/sys/conf.h uses
vm_memattr_t, so it seems the Configure is testing some other copy of
conf.h -- because LSOF_INCLUDE is set to something other than /usr/src?

Oops, some typos here. /usr/src should be /usr/src/sys throughout, and
conf.h is in /usr/src/sys/sys.

Makes no difference to the line of thought, however.

If grep vm_memattr_t /usr/include/sys/conf.h comes back empty, we need
to look at how you built your system.

Charlie,

I did this and sure enough vm_memattr_t is defined as a parameter in a
typedef as follows:

typedef int d_mmap2_t (struc cdev *dev, vm_offset_t offset, vm_paddr_t
*paddr, int nprot, vm_memattr_t *memattr);
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Problem compiling lsof

2010-05-25 Thread Charlie Kester

On Tue 25 May 2010 at 11:17:36 PDT Arthur Barlow wrote:

 I did this and sure enough vm_memattr_t is defined as a parameter
 in a typedef as follows: typedef int d_mmap2_t (struc cdev *dev,
 vm_offset_t offset, vm_paddr_t *paddr, int nprot, vm_memattr_t
 *memattr);


So the question is, why didn't the grep in the Configure script find
this line?

Your cc commandline defines symbols (e.g. HAS_NO_SI_UDEV) which are only
set in the same section of the Configure script, based on a grep of the
same conf.h file. So we can be pretty sure we haven't skipped over the
test for vm_memattr_t.  


You don't perhaps have LSOF_INCLUDE defined in your environment?  If so,
is it set to something other than /usr/include?

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


Re: Problem compiling lsof

2010-05-24 Thread Chuck Swiger
Hi--

On May 24, 2010, at 5:41 PM, Arthur Barlow wrote:
 Sorry about the false start. Fat fingers.  I'm trying to compile the lsof
 program in FreeBSD 8.0 on an i686 machine.  There is a error referencing
 dlsof.h and it looks like there is an ugly hack in the header file.  Any
 suggestions, besides playing with the code?

Sure; how about:

  cd /usr/ports/sysutils/lsof  make install

Regards,
-- 
-Chuck

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


Re: Problem compiling lsof

2010-05-24 Thread Arthur Barlow
On Mon, May 24, 2010 at 5:43 PM, Chuck Swiger cswi...@mac.com wrote:

 Hi--

 On May 24, 2010, at 5:41 PM, Arthur Barlow wrote:
  Sorry about the false start. Fat fingers.  I'm trying to compile the lsof
  program in FreeBSD 8.0 on an i686 machine.  There is a error referencing
  dlsof.h and it looks like there is an ugly hack in the header file.
  Any
  suggestions, besides playing with the code?

 Sure; how about:

  cd /usr/ports/sysutils/lsof  make install

 Regards,
 --
 -Chuck


Chuck,

That doesn't work, which was my point to begin with.  The compile process
throws an error.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Problem compiling lsof

2010-05-24 Thread Chuck Swiger
On May 24, 2010, at 5:57 PM, Arthur Barlow wrote:
 That doesn't work, which was my point to begin with.  The compile process 
 throws an error.

You're abbreviating too much.  :-)

If you want useful feedback, then you ought to provide a little more in the way 
of details-- what error?

-- 
-Chuck

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


Re: Problem compiling lsof

2010-05-24 Thread Lowell Gilbert
Arthur Barlow arthurbar...@gmail.com writes:

 Sorry about the false start. Fat fingers.  I'm trying to compile the lsof
 program in FreeBSD 8.0 on an i686 machine.  There is a error referencing
 dlsof.h and it looks like there is an ugly hack in the header file.  Any
 suggestions, besides playing with the code?

As of a few minutes ago, it built just fine on my i386 build system with
the latest ports.  If you want help diagnosing your issue, you will need
to be much more specific about what happens on your particular system,
so we can figure out how it differs from a normal system.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Problem compiling lsof

2010-05-24 Thread Charlie Kester

On Mon 24 May 2010 at 18:54:11 PDT Lowell Gilbert wrote:

Arthur Barlow arthurbar...@gmail.com writes:


Sorry about the false start. Fat fingers.  I'm trying to compile the lsof
program in FreeBSD 8.0 on an i686 machine.  There is a error referencing
dlsof.h and it looks like there is an ugly hack in the header file.  Any
suggestions, besides playing with the code?


As of a few minutes ago, it built just fine on my i386 build system with
the latest ports.  If you want help diagnosing your issue, you will need
to be much more specific about what happens on your particular system,
so we can figure out how it differs from a normal system.


Since we're talking about building a port, you should also involve its
maintainer. I've cc'ed him with this reply.

I just tried building lsof myself, on a 686-class 8.0-STABLE machine,
and had the same successful result as Lowell.

Can you give us a copy of the build output, beginning with the cc
command line that immediately precedes the failure?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Problem compiling lsof

2010-05-24 Thread Glen Barber
Hi Arthur,

On Mon, May 24, 2010 at 8:57 PM, Arthur Barlow arthurbar...@gmail.com wrote:
 On Mon, May 24, 2010 at 5:43 PM, Chuck Swiger cswi...@mac.com wrote:

 Hi--

 On May 24, 2010, at 5:41 PM, Arthur Barlow wrote:
  Sorry about the false start. Fat fingers.  I'm trying to compile the lsof
  program in FreeBSD 8.0 on an i686 machine.  There is a error referencing
  dlsof.h and it looks like there is an ugly hack in the header file.
  Any
  suggestions, besides playing with the code?

 Sure; how about:

  cd /usr/ports/sysutils/lsof  make install

 Regards,
 --
 -Chuck


 Chuck,

 That doesn't work, which was my point to begin with.  The compile process
 throws an error.


Despite not seeing the error, I'll ask if your kernel and userland are in sync.

Regards,

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


Re: Problem compiling lsof

2010-05-24 Thread Arthur Barlow
On Mon, May 24, 2010 at 7:54 PM, Glen Barber glen.j.bar...@gmail.comwrote:

 Hi Arthur,

 On Mon, May 24, 2010 at 8:57 PM, Arthur Barlow arthurbar...@gmail.com
 wrote:
  On Mon, May 24, 2010 at 5:43 PM, Chuck Swiger cswi...@mac.com wrote:
 
  Hi--
 
  On May 24, 2010, at 5:41 PM, Arthur Barlow wrote:
   Sorry about the false start. Fat fingers.  I'm trying to compile the
 lsof
   program in FreeBSD 8.0 on an i686 machine.  There is a error
 referencing
   dlsof.h and it looks like there is an ugly hack in the header
 file.
   Any
   suggestions, besides playing with the code?
 
  Sure; how about:
 
   cd /usr/ports/sysutils/lsof  make install
 
  Regards,
  --
  -Chuck
 
 
  Chuck,
 
  That doesn't work, which was my point to begin with.  The compile process
  throws an error.
 

 Despite not seeing the error, I'll ask if your kernel and userland are in
 sync.

 Regards,

 --
 Glen Barber


Glen,

The userland question is a fair one.  I last updated userland and kernel on
April, 10th.  But, I suppose things may have changed in that time.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Problem compiling lsof

2010-05-24 Thread Arthur Barlow
On Mon, May 24, 2010 at 5:58 PM, Chuck Swiger cswi...@mac.com wrote:

 On May 24, 2010, at 5:57 PM, Arthur Barlow wrote:
  That doesn't work, which was my point to begin with.  The compile process
 throws an error.

 You're abbreviating too much.  :-)

 If you want useful feedback, then you ought to provide a little more in the
 way of details-- what error?

 --
 -Chuck

Chuck,

Fair point.  Here's the error messages:

Stop in /usr/ports/sysutils/lsof.
[r...@uranus /usr/ports/sysutils/lsof]# HASPSEUDOFS -DHASNULLFS -DHASIPv6
-DHAS_STRFTIME -DLSOF_VSTR=\8.0-STABLE\)
 cc -pipe -march=athlon -fno-strict-aliasing -march=athlon
-DHASEFFNLINK=i_effnlink -DHASF_VNODE -DHASSBSTATE -DHAS_KVM_VNODE
-DHAS_UFS1_2 -DHAS_CDEV2PRIV -DHAS_NO_SI_UDEV -DHAS_SYS_SX_H -DHAS_ZFS
-DHAS_V_LOCKF -DHAS_LOCKF_ENTRY -DHAS_NO_6PORT -DHAS_NO_6PPCB
-DFREEBSDV=8000 -DHASFDESCFS=2 -DHASPSEUDOFS -DHASNULLFS -DHASIPv6
-DHAS_STRFTIME -DLSOF_VSTR=8.0-STABLE -I/usr/src/sys -O2 -c ckkv.c
 In file included from ../dlsof.h:81,
 from ../lsof.h:195,
 from ckkv.c:43:
 /usr/src/sys/sys/conf.h:141: error: expected declaration specifiers or
'...' before 'vm_memattr_t'
 *** Error code 1

 Stop in /usr/ports/sysutils/lsof/work/lsof_4.84A.freebsd/lib.
 *** Error code 1

 Stop in /usr/ports/sysutils/lsof/work/lsof_4.84A.freebsd.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Problem compiling lsof

2010-05-24 Thread Charlie Kester

On Mon 24 May 2010 at 20:24:49 PDT Arthur Barlow wrote:

[r...@uranus /usr/ports/sysutils/lsof]# HASPSEUDOFS -DHASNULLFS
-DHASIPv6 -DHAS_STRFTIME -DLSOF_VSTR=\8.0-STABLE\)

cc -pipe -march=athlon -fno-strict-aliasing -march=athlon

-DHASEFFNLINK=i_effnlink -DHASF_VNODE -DHASSBSTATE -DHAS_KVM_VNODE
-DHAS_UFS1_2 -DHAS_CDEV2PRIV -DHAS_NO_SI_UDEV -DHAS_SYS_SX_H -DHAS_ZFS
-DHAS_V_LOCKF -DHAS_LOCKF_ENTRY -DHAS_NO_6PORT -DHAS_NO_6PPCB
-DFREEBSDV=8000 -DHASFDESCFS=2 -DHASPSEUDOFS -DHASNULLFS -DHASIPv6
-DHAS_STRFTIME -DLSOF_VSTR=8.0-STABLE -I/usr/src/sys -O2 -c ckkv.c

In file included from ../dlsof.h:81,
from ../lsof.h:195,
from ckkv.c:43:
/usr/src/sys/sys/conf.h:141: error: expected declaration specifiers or

'...' before 'vm_memattr_t'


OK, now we know that the immediate cause of the error is that
-DHAS_VM_MEMATTR_T is not included on the cc commandline, so sys/conf.h
doesn't recognize vm_memattr_t as a valid type.

In other words, something's gone wrong in the configure step.

The Configure script grep's for vm_memattr_t in
${LSOF_INCLUDE}/sys/conf.h and sets HAS_VM_MEMATTR_T if the grep
succeeds.  The build failure tells us that your /usr/src/sys/conf.h uses
vm_memattr_t, so it seems the Configure is testing some other copy of
conf.h  -- because LSOF_INCLUDE is set to something other than /usr/src?

The default for LSOF_INCLUDE is /usr/include.  What do you get from the
following command?

grep vm_memattr_t /usr/include/sys/conf.h





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


Re: Problem compiling lsof

2010-05-24 Thread Charlie Kester

On Mon 24 May 2010 at 21:55:01 PDT Charlie Kester wrote:


The Configure script grep's for vm_memattr_t in
${LSOF_INCLUDE}/sys/conf.h and sets HAS_VM_MEMATTR_T if the grep
succeeds.  The build failure tells us that your /usr/src/sys/conf.h uses
vm_memattr_t, so it seems the Configure is testing some other copy of
conf.h  -- because LSOF_INCLUDE is set to something other than /usr/src?


Oops, some typos here.  /usr/src should be /usr/src/sys throughout, and
conf.h is in /usr/src/sys/sys.

Makes no difference to the line of thought, however.

If grep vm_memattr_t /usr/include/sys/conf.h comes back empty, we need
to look at how you built your system.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: problem compiling lsof

2005-10-02 Thread Matt Emmerton
 I'm trying to (re)install lsof (under -CURRENT, details below),
 and am running into:

 (cd lib; make DEBUG=-O
CFGF=-pipe -march=pentium4 -DHASEFFNLINK=i_effnlink -D

HASF_VNODE -DHASCPUMASK_T -DHASSBSTATE -DHAS_KVM_VNODE -DHAS_UFS1_2 -DHAS_NO
_SI_

UDEV -DFREEBSDV=7000 -DHASFDESCFS=2 -DHASPSEUDOFS -DHASNULLFS -DHAS9660FS -D
HAS_
 NO_ISO_DEV -DHASIPv6 -DLSOF_VSTR=\7.0-CURRENT\)

cc  -pipe -march=pentium4 -DHASEFFNLINK=i_effnlink -DHASF_VNODE -DHASCPUMASK
_T -

DHASSBSTATE -DHAS_KVM_VNODE -DHAS_UFS1_2 -DHAS_NO_SI_UDEV -DFREEBSDV=7000 -D
HASF

DESCFS=2 -DHASPSEUDOFS -DHASNULLFS -DHAS9660FS -DHAS_NO_ISO_DEV -DHASIPv6 -D
LSOF
 _VSTR=7.0-CURRENT -I/usr/src/sys -O -c ckkv.c
 In file included from ../dlsof.h:300,
  from ../lsof.h:190,
  from ckkv.c:43:
 /usr/src/sys/fs/devfs/devfs.h:153: error: field `dm_lock' has incomplete
type
 *** Error code 1

 Stop in /usr/ports/sysutils/lsof/work/lsof_4.76/lsof_4.76_src/lib.
 *** Error code 1

 Stop in /usr/ports/sysutils/lsof/work/lsof_4.76/lsof_4.76_src.
 *** Error code 1

 So I deketed /usr/src/sys/fs/devfs/devfs.h, ran cvsup, and no
 joy.  Is this broken, am I looking at the wrong thing, or have I
 bungled something?

It looks like phk changed a lot of the internals of devfs around in early
September; the lsof port has likely not kept pace.

Line 153 of devfs.h appears to be struct sx dm_lock; -- perhaps pulling in
the proper header to define struct sx might make things work again?

--
Matt Emmerton

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]