The formal OpenSolaris offering of nmap
is out of date. I used the following to compile nmap 5.30BETA1 on OpenSolaris build 134.
$ ac_cv_dnet_linux_pf_packet=no CPPFLAGS="-I/usr/include/pcre" \\
$ pfexec make install
This assumes you already have the libpcap and libpcre packages installed. You can check with:
$ pkg list |egrep "pcap|pcre"
library/pcre (opensolaris.org) 7.8-0.134 installed -----
system/library/libpcap (opensolaris.org) 1.0.0-0.134 installed -----
And repeating from my last nmap blog:
Alas, there are still issues lingering with later versions of nmap on OpenSolaris. See this networking-discuss thread as well as this (yet unanswered) nmap-dev posting. In the latter, it's suggested that non-root scans have better success - that's been my experience thus far. The obvious downside being scans needing raw Ethernet access can't be used (or use the --unprivileged option to nmap).