apocryph.org Notes to my future self

1Dec/080

Building rcapdissector on Ubuntu 8.04

I’m trying to build my rcapdissector project under Linux for the first time. Starting with a fresh Ubuntu 8.04 install, I did:

  • sudo aptitude install bison to install yacc/bison
  • sudo aptitude install flex to install flex
  • sudo aptitude install libgtk2.0-dev to install the GTK+ 2.x headers and libraries
  • sudo aptitude install libpcap-dev to install the libpcap headers and libraries
  • sudo aptitude install libgnutls-dev to install the GNU TLS library (this also installs the GNU crypto library as a dependency)
  • sudo aptitude install ruby ruby1.8 ruby1.8-dev to install Ruby and the relevant headers
  • sudo aptitude install ruby-gnome2 for the Glib-aware mkmf
  • sudo aptitude install g++ to install the latest GNU C++ compiler
  • ./configure --prefix=/home/anelson/wireshark in the Wireshark 1.0.4 source tree to configure the Wireshark build
  • make in Wireshark tree to build Wireshark
  • Edit /etc/ld.so.conf so libwireshark.so and libwiretap.so are in the system search path. I did something like:
     > cat /etc/ld.so.conf.d/wireshark.conf
     /home/anelson/wireshark-1.0.4/epan/.libs
     /home/anelson/wireshark-1.0.4/wiretap/.libs
  • Run ldconfig to pick up the changes
  • ruby -w extconf.rb in the rcapdissector/ext directory to generate the Makefile for the extension. Note you’ll almost certainly have to provide library paths to libwireshark and libwiretap as well as the epan/epan.h header files. More on this later
  • make to build and make install to install
  • Run all_tests.rb in the test folder

As of now I’ve got this working with the latest SVN, except I’m getting a segfault when I run the tests, which I chalk up to something changed in Wireshark between 0.99.5 and 1.0.4. Also note that I slightly broke Windows compatibility to get this going, so the latest SVN won’t build under Windows without a bit of reverse contortion, but you can see from the SVN diffs what I did.

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.