Nmap Development mailing list archives

Re: nping -5.61TEST2 build error


From: David Fifield <david () bamsoftware com>
Date: Sat, 31 Mar 2012 01:22:30 -0700

On Tue, Oct 11, 2011 at 10:07:10AM +0200, Mario Brandt wrote:
Hi,
on my NSLU2 with debian arm-el. nping does not build.

Build log from nping
http://pastebin.com/u1qxEZDs#

Are you using the normal Nmap makefile or something else? The build line
is very strange; it's compiling nping/nping.cc into nping/nping. Usually
our build enters the nping subdirectory and builds from there. The
undefined symbols that you are getting is because the link does not
include almost all of the object files needed. It's also using NMAP
defines instead of NPING defines.

Your build has this step:

g++ -g -O2 -Wall -fno-strict-aliasing   -I./liblinear -I./liblua -I./libdnet-stripped/include -I./libpcre  -I./libpcap 
-I./nbase -I./nsock/include -DHAVE_CONFIG_H -DNMAP_NAME=\"Nmap\" -DNMAP_URL=\"http://nmap.org\"; 
-DNMAP_PLATFORM=\"armv5tel-unknown-linux-gnueabi\" -DNMAPDATADIR=\"/usr/local/share/nmap\" -D_FORTIFY_SOURCE=2 -Wl,-E  
-Lnbase -Lnsock/src/    nping/nping.cc   -o nping/nping

When it really should be two steps like this:

g++ -c -I../libdnet-stripped/include  -I../nbase -I../nsock/include -g -O2 -Wall  -fno-strict-aliasing   
-DHAVE_CONFIG_H -DNPING_NAME=\"Nping\" -DNPING_URL=\"http://nmap.org/nping\"; 
-DNPING_PLATFORM=\"x86_64-unknown-linux-gnu\" -D_FORTIFY_SOURCE=2 nping.cc -o nping.o
g++   -o nping ArgParser.o common.o common_modified.o nping.o NpingOps.o utils.o utils_net.o output.o stats.o 
NpingTargets.o NpingTarget.o EchoHeader.o EchoServer.o EchoClient.o ProbeMode.o NEPContext.o Crypto.o PacketDiff.o  
../nbase/libnbase.a ../nsock/src/libnsock.a ../libnetutil/libnetutil.a -lssl -lcrypto -lpcap 
../libdnet-stripped/src/.libs/libdnet.a -ldl

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


Current thread: