dot11decrypt icon indicating copy to clipboard operation
dot11decrypt copied to clipboard

libpcap needs to be declared as dependency

Open tve opened this issue 10 years ago • 5 comments

After a successful ./configure:

# make
g++ -c -Wall -g -O2 -std=c++11 -DFUZZER_VERSION=0.1 -Iinclude main.cpp -o main.o
In file included from /usr/include/tins/tins.h:49:0,
                 from main.cpp:25:
/usr/include/tins/packet_writer.h:35:18: fatal error: pcap.h: No such file or directory
 #include <pcap.h>
                  ^
compilation terminated.
make: *** [main.o] Error 1

tve avatar Apr 09 '15 06:04 tve

After installing libpcap, the linking is failing due to missing -lpcap:

root@oc1:~/dot11decrypt# make
g++ main.o -lpthread -ltins  -o dot11decrypt
/usr/bin/ld: main.o: undefined reference to symbol 'pcap_breakloop'
//usr/lib/arm-linux-gnueabihf/libpcap.so.0.8: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [dot11decrypt] Error 1
root@oc1:~/dot11decrypt# g++ main.o -lpthread -ltins -lpcap -o dot11decrypt
root@oc1:~/dot11decrypt# 

tve avatar Apr 09 '15 06:04 tve

Which version of libtins are you using? That pcap_breakloop reference was removed a lot of time ago.

mfontanini avatar Apr 09 '15 06:04 mfontanini

I updated and installed today on an ARM Ubuntu 14.04 system:

# apt-cache show libtins-dev
Package: libtins-dev
Priority: extra
Section: universe/libdevel
Installed-Size: 625
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Raúl Benencia <[email protected]>
Architecture: armhf
Source: libtins
Version: 1.1-1
Depends: libtins1 (= 1.1-1)
Filename: pool/universe/libt/libtins/libtins-dev_1.1-1_armhf.deb
Size: 98956
MD5sum: 56105babf181657de2c5aabc90532bc8
SHA1: aed77e7791020dc00e858b9cc75127211ccd2002
SHA256: 660be90fab4d346ea1da661d2ddfc32d195057d9987547fff113f26249b45389
Description-en: C++ library for manipulating raw network packets (development files)
 The library's main purpose is to provide the C++ developer an easy,
 efficient, platform and endianess-independent way to create tools which
 need to send, receive and manipulate specially crafted packets.
 .
 This package contains the development files of libtins.
Description-md5: 9ca59abf5e610d392def2d7191b35dd3
Homepage: http://libtins.sourceforge.net/
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

tve avatar Apr 09 '15 15:04 tve

BTW, the program worked great for me, I'm just trying to provide feedback to make it easier to install for the next person. Basically on my Ubuntu 14.04 system I had to do:

apt-get install libtins-dev libtins1 libpcap-dev libpcap0.8
./configure
make
g++ main.o -lpthread -ltins -lpcap -o dot11decrypt

tve avatar Apr 09 '15 16:04 tve

Okay, cool. That libtins version is really old, the current version is 3.2. You might want to install it, as there were several bug fixes in between.

mfontanini avatar Apr 09 '15 16:04 mfontanini