View Full Version : trying to compile tcptraceroute for macos x
macubergeek
02-03-2002, 01:53 AM
Readme for macos X tells me to merely do:
sudo make install
well that dosn't work
the compiler barfs up this error message:
jamesk @ /Users/jamesk/Desktop/tcptraceroute-1.1-1-osx@HOME-->sudo make install
Password:
cc -O2 -Wall -traditional-cpp `libnet-config --defines` \
-o tcptraceroute tcptraceroute.c \
`libnet-config --libs` -lpcap
tcptraceroute.c:64: pcap.h: No such file or directory
make: *** [tcptraceroute] Error 1
Ok does anyone know how to fix this? I tried copying a file called pcap.h from nmap.tgz and that didn't help.
Surprising how often the Readme is no help these days
:(
mervTormel
02-03-2002, 03:01 AM
i snatched tcptraceroute1.2 from a fink page reference:
http://michael.toren.net/code/tcptraceroute/
and looked at the make file, it wants some libs that i don't have, so my attempt was as expected:
% make
cc -O2 -Wall `libnet-config --defines` \
-o tcptraceroute tcptraceroute.c \
`libnet-config --libs` -lpcap
zsh: command not found: libnet-config
zsh: command not found: libnet-config
tcptraceroute.c:116: header file 'libnet.h' not found
tcptraceroute.c:220: warning: ANSI C forbids newline in string constant
tcptraceroute.c:762: warning: ANSI C forbids newline in string constant
cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
make: *** [tcptraceroute] Error 1
that the above failed is academic. but, i was able to locate your missing header file:
% locate pcap.h
/usr/local/include/pcap.h
examining pcap.h indicates that it is a header for the Darwin libpcap library
so, you've gotta ask yourself:
what OSX version am i running? what Dev Tools did i install? where is my pcap.h?
W3iRd0
02-03-2002, 11:39 AM
Why compile tcptraceroute?
Isn't Network Utility good enough, or does it lack power?
macubergeek
02-03-2002, 12:08 PM
Well I'm running the latest version of X 10.1.2 with the latest verison of devtools. When I do locate pcap.h I come up empty. It dosn't seem to be on my machine. Is this part of another package? During the install attempt, the compiler complained about not being able to find libnet-config and so I installed libnet and the error went away.
Why tcptraceroute? On a unix box, traceroute is normally done via udp packets (icmp on windows). Border routers typically filter this out. Tcptracertoute uses tcp instead of udp to avoid the filters. Well meaning router engineers put up these filters to protect their networks from hacker reconnaisance. Unfortunately the "cure" also interferes with diagnostic work by network engineers like myself.
mervTormel
02-03-2002, 12:38 PM
thanks, macubergeek
hmmm, i wonder if the darwintools.pkg dropped that header and ancillary stuff in there. probably.
http://www.darwinfo.org/news.php3?number=50
worth a look.
macubergeek,
When you say latest Developer Tools, you mean the ones released in December last year, right?
Cheers...
macubergeek
02-03-2002, 12:49 PM
Merv
thanks for pointing the Darwin tools out. I totally missed them. I assumed that DevTools would contain all the necessary compilation bits. Well you know what they say about assumptions....the road to hell is paved with them:)
I'll give this a try, and I bet your suspicions are right, the missing headers will be installed from there.
I tell ya between you and the MacosX Unleashed book, I feel like I'm finally getting some traction on this stuff. Chapters 16 and 17 have some good real-world nuts and bolts type hints about this stuff too.
macubergeek
02-03-2002, 12:54 PM
sao
yes that would be correct, I'm referring to the one released in December
macubergeek
02-03-2002, 06:28 PM
ok Merv sao
I finally got this badboy installed.
A couple things I've learned:
1. just like Merv said I instlled Darwintools and instantly the compiler could find the various header files I didn't have before. Thanks Merv....very very good catch on your part.
2. Watch out for lines in Makefile that have been broken into shorter lines like so:
yatta yatta yatta \
yatta yatta yatta \
yatta yatta yatta
evidently Ansi c compiler dosnt like this so just edit Makefile to make it one big long line:
yatta yatta yatta yatta yatta etc.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.