ggreer / dsniff

Dug Song seems to have abandoned dsniff. I got it to work with the latest OS X & Homebrew libraries.
Other
339 stars 83 forks source link

Will not build on osx 10.10 #1

Closed Stsosz closed 9 years ago

Stsosz commented 9 years ago

I followed all instructions. Macports and Homebrew are both installed. Macbook pro, 13 inch late 2010. Core 2 duo.

Output of ./configure

./configure \

--with-libpcap=/usr/local/opt/libpcap \ --with-openssl=/usr/local/opt/openssl \ --with-libnet=/usr/local/opt/libnet \ --with-libnids=/usr/local/opt/libnids \ --without-x checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for a BSD-compatible install... /usr/bin/install -c checking for ranlib... ranlib checking how to run the C preprocessor... gcc -E checking for X... disabled checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking err.h usability... yes checking err.h presence... yes checking for err.h... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/ioctl.h usability... yes checking sys/ioctl.h presence... yes checking for sys/ioctl.h... yes checking sys/queue.h usability... yes checking sys/queue.h presence... yes checking for sys/queue.h... yes checking for unistd.h... (cached) yes checking libgen.h usability... yes checking libgen.h presence... yes checking for libgen.h... yes checking net/if_tun.h usability... no checking net/if_tun.h presence... no checking for net/if_tun.h... no checking for MIN and MAX in sys/param.h... yes checking for an ANSI C-conforming const... yes checking for size_t... yes checking whether struct tm is in sys/time.h or time.h... time.h checking for u_int32_t... yes checking for u_int64_t... yes checking for in_addr_t... yes checking whether gcc needs -traditional... no checking for working memcmp... yes checking return type of signal handlers... void checking for strftime... yes checking for gethostname... yes checking for socket... yes checking for strdup... yes checking for strstr... yes checking for ether_ntoa... yes checking for xdr_fhstatus in -lrpcsvc... no checking for socket in -lsocket... no checking for gethostbyname in -lnsl... no checking for dn_expand in -lresolv... yes checking for __dn_expand in -lresolv... no checking for dirname... yes checking for strlcpy... yes checking for strlcat... yes checking for strsep... yes checking for MD5Update... no checking for warnx... yes checking for ether_ntoa... (cached) yes checking for Berkeley DB with 1.85 compatibility... yes checking for libpcap... /usr/local/opt/libpcap ./configure: line 410: test: pcap-bpf.h: integer expression expected configure: error: pcap.h ./configure: line 299: return: pcap-bpf.h: numeric argument required ./configure: line 309: exit: pcap-bpf.h: numeric argument required

when make is executed....

make: *\ No targets specified and no makefile found. Stop.

ggreer commented 9 years ago

This is odd. I'm also using 10.10 (with homebrew, but without macports) and dsniff builds fine for me. Maybe you have an old version of libpcap? Have you run brew update and brew upgrade recently?

Stsosz commented 9 years ago

Yep, tried again today, brew update and brew upgrade also, with same results. I ended up just downloading a precompiled version.

EDIT: Just checked my hdd with disk utility and i'm getting a load of errors. I tried on another mac and it compiled perfectly.

ggreer commented 9 years ago

I'm curious: Did the other mac have homebrew + macports installed or just homebrew?

ggreer commented 9 years ago

For now I guess I'll chalk this up to cosmic rays or angry computer spirits. I'm still a little suspicious of macports.

electronicboy commented 9 years ago

Came across this issue just now, removing the ''--with-libpcap=/usr/local/opt/libpcap" flag fixed the issue, said folder is actually inexistent which is probably what causes the issue.

$ brew install libpcap Error: No available formula for libpcap Apple distributes libpcap with OS X, you can find it in /usr/lib.

Probably related to that, fairly new to OSx, but seems like a potential case of 'we used to have a libpcap brew, but now we don't need it', and potential remnants exist of that folder on your machine or something?