Home page logo

nmap-dev logo Nmap Development mailing list archives

Re: Nmap 4.23RC1 released
From: David Fifield <david () bamsoftware com>
Date: Sun, 11 Nov 2007 13:27:30 -0700

On Sat, Nov 10, 2007 at 11:05:42PM -0700, David Fifield wrote:
On Sat, Nov 10, 2007 at 05:48:38PM -0500, Matt Selsky wrote:
Solaris 9/gcc 4 build failure:

make[1]: Entering directory `/src/nmap-4.23RC1/nbase'
gcc -g -O2 -Wall    -DHAVE_CONFIG_H -DNCRACK_VERSION=\"\" 
-DHAVE_CONFIG_H=1    -c -o snprintf.o snprintf.c
In file included from nbase.h:431,
                 from snprintf.c:66:
nbase_ipv6.h:214: error: redefinition of `struct addrinfo'
nbase_ipv6.h:239: error: conflicting types for `?gai_strerro'
/usr/include/netdb.h:311: error: previous declaration of `gai_strerror' was here
make[1]: *** [snprintf.o] Error 1
make[1]: Leaving directory `/src/nmap-4.23RC1/nbase'
make: *** [nbase/libnbase.a] Error 2

I did not try to configure with --enable-ipv6 or anything.

I can confirm this on Solaris 9. I have access to such a machine that I
can test this on.

I committed a fix for this and a bunch of other issues on Solaris. One
issue remains:

Compiling nmap
rm -f nmap
g++ -Llibpcap  -Lnbase -Lnsock/src/   -o nmap main.o nmap.o targets.o tcpip.o nmap_error.o utils.o idle_scan.o osscan.o 
osscan2.o output.o scan_engine.o timing.o charpool.o services.o protocols.o nmap_rpc.o portlist.o NmapOps.o 
TargetGroup.o Target.o FingerPrintResults.o service_scan.o NmapOutputTable.o MACLookup.o nmap_tty.o nmap_dns.o  
traceroute.o portreasons.o nse_main.o nse_auxiliar.o nse_nsock.o nse_init.o nse_nmaplib.o nse_debug.o nse_pcrelib.o 
nse_string.o  -lnbase -lnsock libpcre/libpcre.a -lpcap  libdnet-stripped/src/.libs/libdnet.a liblua/liblua.a -lnsl 
Undefined                       first referenced
 symbol                             in file
dlsym                               liblua/liblua.a(loadlib.o)  (symbol belongs to implicit dependency 
_mcount                             main.o
dlopen                              liblua/liblua.a(loadlib.o)  (symbol belongs to implicit dependency 
dlclose                             liblua/liblua.a(loadlib.o)  (symbol belongs to implicit dependency 
dlerror                             liblua/liblua.a(loadlib.o)  (symbol belongs to implicit dependency 
ld: fatal: Symbol referencing errors. No output written to nmap
collect2: ld returned 1 exit status
make[1]: *** [nmap] Error 1

I can make the problem go away by adding -ldl to LIBS in Makefile. But
isn't this the same thing as


Is solving this as simple as adding

AC_SEARCH_LIBS(dlopen, dl)

to configure.ac when liblua is built? That works for me in this case.

David Fifield

Sent through the nmap-dev mailing list
Archived at http://SecLists.Org

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]