lsof

I'm unable to upgrade to the latest version of lsof.

Code:
ckkv.c:58: error: old-style parameter declarations in prototyped function definition
/usr/include/xlocale/_time.h:45: error: parameter name omitted
/usr/include/xlocale/_time.h:45: error: parameter name omitted
/usr/include/xlocale/_time.h:45: error: parameter name omitted
/usr/include/xlocale/_time.h:46: error: parameter name omitted
/usr/include/xlocale/_time.h:46: error: parameter name omitted
ckkv.c:61: error: storage size of 'u' isn't known
ckkv.c:63: error: 'Fwarn' undeclared (first use in this function)
ckkv.c:70: error: 'Pn' undeclared (first use in this function)
ckkv.c:73: error: 'er' undeclared (first use in this function)
ckkv.c:76: error: 'd' undeclared (first use in this function)
ckkv.c:78: error: 'ev' undeclared (first use in this function)
ckkv.c:83: error: 'ea' undeclared (first use in this function)
*** [ckkv.o] Error code 1

Stop in /usr/ports/sysutils/lsof/work/lsof_4.87/lsof_4.87_src/lib.
*** [lib/liblsof.a] Error code 1

Stop in /usr/ports/sysutils/lsof/work/lsof_4.87/lsof_4.87_src.
*** [do-build] Error code 1

Stop in /usr/ports/sysutils/lsof.
[8]root@test:/usr/ports/sysutils/lsof #

I've uninstalled and reinstalled to no avail. What am I doing wrong?

Running FreeBSD 9.0-STABLE #6.

~Doug
 
dougs said:
Code:
ckkv.c:58: error: old-style parameter declarations in prototyped function definition
I portsnapped, fetched the source and had a look at this file. It does indeed contain a K&R-style function header which is pretty much antiquated by now. A quick fix would be to change it into the current function format: instead of
Code:
void
ckkv(d, er, ev, ea)
  char *d;
  char *er;
  char *ev;
  char *ea;
{
  [i]...[/i]
}
make it
Code:
void
ckkv(char *d, char *er, char *ev, char *ea)
{
  [i]...[/i]
}

Or alternatively, there's probably a compiler option somewhere that tells gcc (assuming that's the compiler you use) to accept old-style K&R function headers.

If you cannot program in C and/or there are several more of these old-style definitions, post the contents of /etc/make.conf if there's anything in there. If not, I suggest you notify the port maintainer of the problem because in that case (s)he should probably update the port so that others don't run into the same problem.

Hope this helps,

Fonz
 
To followup: the port in question compiles just fine on the 8.2-RELEASE/amd64 system I'm on at the moment, so I strongly suspect there's a compiler option issue somewhere in all of this.

Fonz
 
Code:
[11]root@test:/usr/ports/sysutils/lsof # less /etc/make.conf
WITHOUT_X11=yes
#  
# Keep ruby 1.8 as default version.  
#  
RUBY_DEFAULT_VER=1.8  
# added by use.perl 2012-03-09 14:05:39
PERL_VERSION=5.14.2

Can someone walk me through the compiler options? I'm not versed in compiling at all. I just follow what the handbook tells me in upgrading ports. :(

I'm on 9.0-STABLE x86.

~Doug
 
It should just be
Code:
# cd /usr/ports/sysutils/lsof
# make install clean

It's hard to tell what's causing that error. If some odd compiler flags were set, they would usually be in /etc/make.conf. What customizations have you done to the system? 9.0-STABLE as of what date? Has the system been compiled since /usr/src was last updated?
 
Um, it's possible that I may have run svn and then decided not to build world/kernel.

Code:
[14]root@test:/usr/src # svn info
Path: .
Working Copy Root Path: /usr/src
URL: http://svn0.us-west.freebsd.org/base/releng/9.0
Repository Root: http://svn0.us-west.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 243633
Node Kind: directory
Schedule: normal
Last Changed Author: simon
Last Changed Rev: 243417
Last Changed Date: 2012-11-22 14:52:15 -0800 (Thu, 22 Nov 2012)

[14]root@test:/usr/src #

This machine is one of two 9.0-STABLE machines here at work-- the rest are 9.0-RELEASE.

I will do another svn and rebuild after this weekend. I'll report how it turns out.

Oh, and yes, the ports are up-to-date. I run portsnap fetch/update once a week.

~Doug
 
If I remember rightly lsof actually uses files found in /usr/src during compilation. I suspect if these files are different to the actual files installed in the base system then there might be some conflict there. You suggest you svn'd without installing a new world/kernel so I guess that's the case.
 
Yes, I believe lsof requires the kernel source files to be in accordance with the actual kernel.
 
Back
Top