Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > make: Compilations problems (nmap)

make: Compilations problems (nmap)
Thread Tools
Dedicated MacNNer
Join Date: Mar 2002
Status: Offline
Reply With Quote
Mar 23, 2003, 05:27 PM
 
I'm compiling nmap 3.20 under Jaguar with the latest developer tools.First I have a problem with the ./configure script not finding cpp which was sorted by using
env CPP=/usr/bin/cpp ./configure

However now when I attempt to do a make I get the following error.I believe it doesn't like the MacosX libraries ? Am I correct ? Any suggestions ? Thanks in advance.

% make
Compiling libpcap
gcc -I. -O -DHAVE_CONFIG_H -c ./pcap-bpf.c
gcc -I. -O -DHAVE_CONFIG_H -c ./pcap.c
gcc -I. -O -DHAVE_CONFIG_H -c ./inet.c
gcc -I. -O -DHAVE_CONFIG_H -c ./gencode.c
gcc -I. -O -DHAVE_CONFIG_H -c ./optimize.c
gcc -I. -O -DHAVE_CONFIG_H -c ./nametoaddr.c
gcc -I. -O -DHAVE_CONFIG_H -c ./etherent.c
gcc -I. -O -DHAVE_CONFIG_H -c ./savefile.c
gcc -I. -O -DHAVE_CONFIG_H -c bpf_filter.c
gcc -I. -O -DHAVE_CONFIG_H -c ./bpf_image.c
gcc -I. -O -DHAVE_CONFIG_H -c ./bpf_dump.c
gcc -I. -O -DHAVE_CONFIG_H -c scanner.c
gcc -I. -O -DHAVE_CONFIG_H -Dyylval=pcap_lval -c grammar.c
y.tab.c:119: warning: redefinition of macro MASK
/usr/include/ppc/param.h:120: warning: this is the location of the previous definition
sed -e 's/.*/char pcap_version[] = "&";/' ./VERSION > version.c
gcc -I. -O -DHAVE_CONFIG_H -c version.c
ar rc libpcap.a pcap-bpf.o pcap.o inet.o gencode.o optimize.o nametoaddr.o etherent.o savefile.o bpf_filter.o bpf_image.o bpf_dump.o scanner.o grammar.o version.o
ranlib libpcap.a
Compiling libnbase
cd nbase; make
gcc -g -O2 -Wall -g -DHAVE_CONFIG_H -DNCRACK_VERSION=\"\" -DHAVE_CONFIG_H=1 -c -o snprintf.o snprintf.c
gcc -g -O2 -Wall -g -DHAVE_CONFIG_H -DNCRACK_VERSION=\"\" -DHAVE_CONFIG_H=1 -c -o getopt.o getopt.c
gcc -g -O2 -Wall -g -DHAVE_CONFIG_H -DNCRACK_VERSION=\"\" -DHAVE_CONFIG_H=1 -c -o getopt1.o getopt1.c
gcc -g -O2 -Wall -g -DHAVE_CONFIG_H -DNCRACK_VERSION=\"\" -DHAVE_CONFIG_H=1 -c -o nbase_str.o nbase_str.c
gcc -g -O2 -Wall -g -DHAVE_CONFIG_H -DNCRACK_VERSION=\"\" -DHAVE_CONFIG_H=1 -c -o nbase_misc.o nbase_misc.c
Compiling libnbase
rm -f libnbase.a
ar cr libnbase.a snprintf.o getopt.o getopt1.o nbase_str.o nbase_misc.o
ranlib libnbase.a
g++ -c -g -Wall -no-cpp-precomp -g -O2 -Ilibpcap-possiblymodified -Inbase -DHAVE_CONFIG_H -DNMAP_VERSION=\"3.20\" -DNMAP_NAME=\"nmap\" -DNMAP_URL=\"www.insecure.org/nmap/\" -DNMAP_PLATFORM=\"powerpc-apple-darwin6.2\" -DNMAPDATADIR=\"/usr/local/share/nmap\" -Ilibpcap-possiblymodified main.cc -o main.o
In file included from output.h:67,
from nmap.h:369,
from main.cc:48:
tcpip.h:247: redefinition of `struct ip'
/usr/include/netinet/ip.h:71: previous definition of `struct ip'
tcpip.h:291: redefinition of `struct icmp_ra_addr'
/usr/include/netinet/ip_icmp.h:70: previous definition of `struct icmp_ra_addr'
tcpip.h:297: redefinition of `struct icmp'
/usr/include/netinet/ip_icmp.h:78: previous definition of `struct icmp'
make: *** [main.o] Error 1
%

     
Mac Elite
Join Date: May 2001
Location: Earth
Status: Offline
Reply With Quote
Mar 23, 2003, 06:36 PM
 
Not sure what your problem is... but ... why don't you install or compile nmap with fink ? it would be much straight forward. You can directly install the binairy, or compile it from sources.
     
DevNine  (op)
Dedicated MacNNer
Join Date: Mar 2002
Status: Offline
Reply With Quote
Mar 24, 2003, 12:31 PM
 
But fink will only deliver me the binary.I was to go through the compilation process etc..
     
Dedicated MacNNer
Join Date: Nov 2002
Location: Rouge River
Status: Offline
Reply With Quote
Mar 24, 2003, 06:28 PM
 
Originally posted by DevNine:
But fink will only deliver me the binary.I was to go through the compilation process etc..
Actually, no. If you type 'apt-get install nmap' then you'll get the binary. If you type 'fink install nmap', it will download the source, apply the appropriate patches and then compile it for you. You also have the added advantage of having the compiled binary in a nice .deb package which makes removing it really easy.
Swimming upstream since 1994.
     
Junior Member
Join Date: Nov 2000
Location: Manhattan
Status: Offline
Reply With Quote
Mar 29, 2003, 01:29 PM
 
Currently, Fink cvs archives only has 3.00 of nmap. 3.20 was recently released, with some substantial improvements. Unfortunately, it doesnt seem to want to compile on OSX.

FWIW, I am getting the exact same problem on 3.20, tried on a few different Macs with the same issue. Google searching isn't turning anything up. I've tried a few things with no success.

I'm anxiously waiting on this to be resolved actually, so I can release the new version of NmapFE for OSX (I am the developer). If you come up with anything from another source please post it in this thread.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:36 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2