ahobson / ruby-pcap

Ruby interface to LBL Packet Capture library.
http://www.goto.info.waseda.ac.jp/~fukusima/ruby/pcap-e.html
GNU General Public License v2.0
76 stars 32 forks source link

Error compiling #1

Closed ghost closed 14 years ago

ghost commented 14 years ago

I'm trying to install this gem on Ubuntu and not having any luck. I'm using ruby 1.9.2. When I do a gem install I get the following error/output:

ERROR: Error installing pkg/pcap-0.7.1.gem: ERROR: Failed to build gem native extension.

/opt/ruby192/bin/ruby extconf.rb checking for socket() in -lsocket... no checking for gethostbyname() in -lxnet... no checking for hstrerror()... yes checking for pcap.h... yes checking for pcap_open_live() in -lpcap... yes checking for pcap_compile_nopcap()... yes creating Makefile

make gcc -I. -I/opt/ruby192/include/ruby-1.9.1/x86_64-linux -I/opt/ruby192/include/ruby-1.9.1/ruby/backward -I/opt/ruby192/include/ruby-1.9.1 -I. -DHAVE_HSTRERROR -DHAVE_PCAP_H -DHAVE_PCAP_COMPILE_NOPCAP -fPIC -I/usr/local/include -o ip_packet.o -c ip_packet.c ip_packet.c: In function 'ipp_set_src': ip_packet.c:117: error: 'struct RString' has no member named 'ptr' ip_packet.c: In function 'ipp_set_dst': ip_packet.c:118: error: 'struct RString' has no member named 'ptr' ip_packet.c: In function 'new_ipaddr': ip_packet.c:186: warning: cast to pointer from integer of different size ip_packet.c: In function 'ipaddr_s_new': ip_packet.c:203: error: 'struct RString' has no member named 'ptr' ip_packet.c:213: warning: format not a string literal and no format arguments ip_packet.c: In function 'ipaddr_s_load': ip_packet.c:320: error: 'struct RString' has no member named 'len' ip_packet.c:324: error: 'struct RString' has no member named 'ptr' make: *\ [ip_packet.o] Error 1

Any idea what I'm doing wrong? Searching for this error doesn't yield anything useful.

ahobson commented 14 years ago

Ah, I haven't tried to get this working under 1.9 yet. I'll see if I can find some time over the next few days.

jShaf commented 14 years ago

+1 for 1.9 :)