Go thru the ./Configure process required by the package and after
it's finished edit dialects/sun/machine.h and comment out HASPROFS & HASPINFO
as shown in the example bellow. Points to pay attention at: 1) although doing
this will lead to a clean compilation, I don't know what one will miss in
funcionality from the binary due to the lack of /proc support - nevertheless
the binary works nicely; 2) a question remains to be answered - why is that
some SUN installations have a sys/proc/prdata.h and some (mine included) NOT?
I'm 100% sure I have a full installation and when I looked into Solaris CDs I
found no prdata.h stored in them! Go figure :-((
Excerpt from Lsof 3.72's dialects/sun/machine.h:
/*
* HASPROCFS is defined for those dialects that have a proc file system --
* usually /proc and usually in SYSV4 derivatives.
*
* HASFSTYPE is defined for those systems that have a file system type
* string, st_fstype, in the stat() buffer.
*
* The defined value is the string that names the file system type.
*
* The HASPROCFS definition usually must be accompanied by the HASFSTYPE
* definition and the providing of an fstype element in the local mounts
* structure (defined in dlsof.h).
*
* The HASPROCFS definition may be accompanied by the HASPINFO definition.
* HASPINFO names the subdirectory of HASPROCFS that contains read-only
* information (typically /pinfo).
*/
#if defined(solaris)
/* #define HASPROCFS "proc" */
#define HASFSTYPE 1
/* #define HASPINFO "/pinfo" */
#endif
=============================================================================
WHO REPLIED: 3 messages - Thanks!
=============================================================================
>Date: 30 Mar 1997 17:49:52 -0800
>From: "Lau, Victoria H" <vlau@msmail2.hac.com>
The last time I had problem compiling lsof, I directly contacted
Victor Abell, the author of lsof. He practically worked day AND
night with me to get my problem solved. His email address is
abe@purdue.edu.
By the way, the last version I installed on Solaris 2.5.1 was
lsof v3.77 and that was in October. This can be downloaded from
ftp://vic.cc.purdue.edu/pub/tools/unix/lsof.
=============================================================================
>Date: Sun, 30 Mar 1997 18:56:35 -0700 (MST)
>From: Ric Anderson <ric@rtd.com>
I had no problem with
ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/lsof_3.81_W.tar.gz
under solaris with gcc. Just ran
./Configure
follwoed by
make
=============================================================================
>Date: Tue, 1 Apr 1997 16:12:40 -0400 (AST)
>From: Harvey Wamboldt <harvey@iotek.ns.ca>
Hi, I've been meaning to compile lsof, so I just sat down and did it.
lsof -v reports:
lsof version information:
revision: 3.84 -- find the latest revision at:
ftp://vic.cc.purdue.edu/pub/tools/unix/lsof
constructed: Tue Apr 1 14:57:44 AST 1997
constructed by and on: src@orbiter
compiler: gcc
compiler version: 2.7.2
compiler flags: -O -Dsolaris 500
loader flags: -lkvm -lelf -lsocket -lnsl
system info: SunOS orbiter 5.5 Generic_103093-02 sun4m sparc
SUNW,SPARCs
gcc -v reports:
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.5/2.7.2/specs
gcc version 2.7.2
mymachine% uname -a
SunOS mymachine 5.5 Generic_103093-02 sun4m sparc SUNW,SPARCstation-20
I did a "Configure solaris" first, then did a manual install following
(roughly) the recommendation printed on the screen when I did "make
install".
> ... make barfs at a sys/proc/prdata.h not found
My 2.5 has /usr/include/sys/proc/prdata.h, I did a full installation,
perhaps your machine has a partial OS installation? Maybe you can get
a copy off of your OS CD?
If you look at the Configure script (version 3.84) you can see that
"solaris" is set to a value, you should check that this value is set
correctly, I notice it is used in some of the sources.
=============================================================================
...
. . . -(o o)-
_.,-*b'`-`'d*-,._.,-*b'`-`'d*-,._.,-*b'`-`'d*-,._/----oOO--(_)--OOo-----
=
UNIVERSIDADE ESTADUAL DE LONDRINA - UEL .:. assis @ npd.uel.br
Nucleo de Processamento de Dados - NPD <*> Marcos Assis Silva
Gerencia de Software Basico - GSB ":" Analista de Suporte
Parana - Brasil o
. . . = .
_.,-*b'`-`'d*-,._.,-*b'`-`'d*-,._.,-*b'`-`'d*-,._.,-*b'`-`'d*-,._.,-*b'`