Cross compile libpcap for Arm


This has been tested on Ubuntu 16.04.1 Desktop (64-bit), and assumes that arm-linux-gnuabi-gcc has already been installed, e.g. sudo apt-get install -y gcc-arm-linux-gnueabi

  1. Download the latest libpcap source tar ball from [http://www.tcpdump.org/#latest-releases], e.g. libpcap-1.8.1.tar.gz
  2. tar zxvf libpcap-1.8.1.tar.gz
  3. apt-get install flex bison byacc
  4. export CC = arm-linux-gnueabi-gcc
  5. ./configure –host=arm-linux –with-pcap=linux
  6. make

Once the library has been compiled, it may be linked to other code, using the -L gcc flag and the location of the library. e.g. -lpcap -L/home/nkush/development/libpcap-1.8.1

See also