shadowbq/pcaprub — Issue #9: Can't build gem on fresh install of Ubuntu 10.04
Author: todb
Created: 2011-11-14 02:39:53+00:00
State: open

Relevant info:

todb@ubuntu:~$ gem install pcaprub
Building native extensions. This could take a while...
ERROR: Error installing pcaprub:
ERROR: Failed to build gem native extension.

/home/todb/.rvm/rubies/ruby-1.9.1-p378/bin/ruby extconf.rb

[*] Running checks for pcaprub code...
platform is i686-linux
checking for pcap_open_live() in -lpcap... yes
checking for pcap_setnonblock() in -lpcap... yes
creating Makefile

make
gcc -I. -I/home/todb/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1/i686-linux -I/home/todb/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1/ruby/backward -I/home/todb/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64 -fPIC -O2 -g -Wall -Wno-parentheses -fPIC -o pcaprub.o -c pcaprub.c
pcaprub.c: In function ‘Init_pcaprub’:
pcaprub.c:965: error: ‘PCAP_NETMASK_UNKNOWN’ undeclared (first use in this function)
pcaprub.c:965: error: (Each undeclared identifier is reported only once
pcaprub.c:965: error: for each function it appears in.)
make: *** [pcaprub.o] Error 1

Gem files will remain installed in /home/todb/.rvm/gems/ruby-1.9.1-p378/gems/pcaprub-0.11.0 for inspection.
Results logged to /home/todb/.rvm/gems/ruby-1.9.1-p378/gems/pcaprub-0.11.0/ext/pcaprub/gem_make.out
todb@ubuntu:~$ gem install pcaprub -v 0.10.0
Fetching: pcaprub-0.10.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed pcaprub-0.10.0
1 gem installed
Installing ri documentation for pcaprub-0.10.0...
Updating class cache with 1286 classes...
Installing RDoc documentation for pcaprub-0.10.0...
todb@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 10.04.3 LTS
Release:	10.04
Codename:	lucid
todb@ubuntu:~$ uname -a
Linux ubuntu 2.6.32-35-generic-pae #78-Ubuntu SMP Tue Oct 11 17:01:12 UTC 2011 i686 GNU/Linux
todb@ubuntu:~$