The pre-compiled packages of lsof for Solaris (e.g. from Blastwave or sunfreeware) do not show the ports open, such as when using the options : "-Pni". The wisdom of the creator of lsof is that we should compile lsof ourselves. The tar bundle, configuration, etc., are very different than most open source packages one can compile from source. I'm running low on clues within the package to learn what is wrong with my build attempt.
I have Sun Studio 11 to provide C compiler. Also installed Gcc 3.4.5
The system is sparc, with ZFS on all file systems. OS is Solaris 10, U7.
uname -a SunOS myhostname 5.10 Generic_141444-09 sun4u sparc SUNW,Sun-Fire-280R
lsof source is for 4.82. I configure with default options and ZFS support on.
With either cc or gcc, the failure when running make is similar:
gcc -Dsolaris=100000 -DHASPR_GWINDOWS -m64 -DHASIPv6 -DHASSOUXSOUA -DHAS_IPCLASSIFIER_H -DHAS_CRED_IMPL_H -DHAS_V_PATH -DHASZONES -DHAS_ZFS=1 -DZFS_VERS=15 -DHASUTMPX -DHAS_VSOCK -DHAS_STRFTIME -DLSOF_VSTR=\"5.10\" -O -c dnode.c dnode.c: In function `process_node': dnode.c:2082: error: structure has no member named `pcfs_entps' *** Error code 1 make: Fatal error: Command failed for target `dnode.o'
I did get this to compile on a non-ZFS system with 4.77 many months ago, but I can't remember how.