Nmap Development mailing list archives

Re: error compiling 5.21


From: Mike Calmus <mcalmus () nyx net>
Date: Tue, 23 Feb 2010 22:59:21 -0500

On Feb 22, 2010, at 5:05 PM, David Fifield wrote:
On Sat, Feb 20, 2010 at 07:14:29PM -0500, Mike Calmus wrote:
Hello all. I finally got around to getting all my dependencies in order and trying to compile Nmap 5.21. This is on 
MacOS X 10.6 Snow Leopard.

Compiling nmap
rm -f nmap
g++ -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 payload.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   -lnbase -lnsock -lpcre -lpcap -lssl -lcrypto 
libdnet-stripped/src/.libs/libdnet.a  -lm  
Undefined symbols:
 "ScriptResult::get_id() const", referenced from:
     formatScriptOutput(ScriptResult)       in output.o
     printportoutput(Target*, PortList*)    in output.o
     printhostscriptresults(Target*)     in output.o
 "ScriptResult::get_output() const", referenced from:
     formatScriptOutput(ScriptResult)       in output.o
     printportoutput(Target*, PortList*)    in output.o
     printhostscriptresults(Target*)     in output.o
 "open_nse()", referenced from:
     nmap_main(int, char**)in nmap.o
 "close_nse()", referenced from:
     nmap_free_mem()     in nmap.o
 "script_updatedb()", referenced from:
     nmap_main(int, char**)in nmap.o
 "script_scan(std::vector<Target*, std::allocator<Target*> >&)", referenced from:
     nmap_main(int, char**)in nmap.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [nmap] Error 1
make: *** [all] Error 2

It looks to me like you have some configuration mismatch--the code is
including NSE function but the final link isn't linking with liblua. Try
a "make distclean" and try again. If it doesn't work, look for messages
referring to liblua or NOLUA.

David Fifield



It turned out my installation of lua was messed up. So even though configure didn't think lua.h was usable it seemed to 
try to do so:

checking lua.h usability... yes
checking lua.h presence... yes
checking for lua.h... yes
checking for lua_call in -llua... no
checking for lua_call in -llua5.1... no
checking lua/lua.h usability... no
checking lua/lua.h presence... no
checking for lua/lua.h... no
checking lua5.1/lua.h usability... no
checking lua5.1/lua.h presence... no
checking for lua5.1/lua.h... no
checking for lua version >= 501... yes

Fixing lua fixed my issue, but it seems the configure script needs a bit of tweaking when it decides lua.h isn't usable.

--
Mike

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: