Nmap Development mailing list archives
Issues on compiling nmap 5.59BETA1 on Solaris
From: Dagobert Michelsen <dam () opencsw org>
Date: Thu, 25 Aug 2011 17:48:20 +0200
Hi,
I am currently working on a Solaris compile of nmap 5.59BETA1 and found
the following issues:
* Two python files use inconsistent spacing:
zenmapCore/ScriptMetadata.py: inconsistent use of tabs and spaces in indentation
zenmapGUI/FileChoosers.py: inconsistent use of tabs and spaces in indentation
* ncat/ncat.c needs an inclusion of limits.h for INT_MAX
My trivial patch is not portable, a autoconf-check may be better:
http://sourceforge.net/apps/trac/gar/browser/csw/mgar/pkg/nmap/trunk/files/0001-Add-definition-for-INT_MAX.patch
* Solaris needs definitions for CMSG_ALIGN, CMSG_SPACE and CMSG_LEN
This patch adds the definitions if any of them is missing:
http://sourceforge.net/apps/trac/gar/browser/csw/mgar/pkg/nmap/trunk/files/0002-Add-definitions-for-CMSG_ALIGN-CMSG_SPACE-and-CMSG_L.patch
* The Sun Studio compiler does not honour __attribute__
In libpcal a proper check is used and a definition of _U_ is done during configure
time to either __attribute__ or nothing if the compiler does not support it.
This detection could either be propagated to main configure and according definitions.
My non-portable patch disables it for the relevant files with
http://sourceforge.net/apps/trac/gar/browser/csw/mgar/pkg/nmap/trunk/files/0003-Do-not-use-__attribute__.patch
* The defintion of lt_sockaddr_storage::operator is missing a const or compilation fails.
The patch should resolve the issue for all platforms:
http://sourceforge.net/apps/trac/gar/browser/csw/mgar/pkg/nmap/trunk/files/0004-Make-lt_sockaddr_storage-operator-const-or-compiler-.patch
* A similar issue occurs in libnetutil.cc for route_dst which is fixed for all platforms by this patch:
http://sourceforge.net/apps/trac/gar/browser/csw/mgar/pkg/nmap/trunk/files/0005-Fix-const-definition-of-route_dst-or-c-linkage-fails.patch
* The following flags must be set when compiling with the Sun Studio 12 compiler on Solaris 9:
CPPFLAGS += -features=extensions -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__
CXXFLAGS += -features=extensions -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__ -library=stlport4
On build time this additional variable helps building a sane binary (just use VAR_STATIC as
it was at the right place, I have not found a usable variable with a better name):
VAR_STATIC = -library=stlport4 -norunpath
The full mGAR build recipe is available here:
http://sourceforge.net/apps/trac/gar/browser/csw/mgar/pkg/nmap/trunk/Makefile
I have build experimental packages of 5.59BETA1 available at
http://buildfarm.opencsw.org/experimental.html#nmap
Maybe there are some Solaris users around to test it.
As you see I had quite some issues building it and would think that this statement is
an exaggeration:
http://nmap.org/book/inst-solaris.html
I would be glad to offer an account on our solaris packaging projects buildfarm for an
nmap maintainer to do regular testing or even continuous integration:
http://www.opencsw.org/extend-it/signup/to-upstream-maintainers/
Best regards
-- Dago
--
"You don't become great by trying to be great, you become great by wanting to do something,
and then doing it so hard that you become great in the process." - xkcd #896
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/
Current thread:
- Issues on compiling nmap 5.59BETA1 on Solaris Dagobert Michelsen (Aug 25)
- Re: Issues on compiling nmap 5.59BETA1 on Solaris David Fifield (Sep 05)
