Home‎ > ‎

Quickly compiling fragroute on Ubuntu 10.10

posted Apr 12, 2011, 12:12 AM by Jayme Snyder   [ updated Apr 28, 2011, 3:05 PM ]
So out of the box, fragroute doesn't compile. If you try, you probably get complaints about missing libdnet and libevent.
First, libevent. Passing "--with-libevent=/usr/include" would catch that event.h is there, but because event.a is in /usr/lib(64)/, it still won't work. I just symlink'd it in to /usr/include.

The libdnet is looking for is lib dumnet, not libdecnet. If you `apt-get install libdumnet-dev` it will still complain. They have renamed dnet.h to be dumbnet.h, so in /usr/include I did another symlink and passed "--with-libdnet=/usr/include" to configure. It complained about missing bin/dnet-config... so created another symlink.

Now, it mostly will compile after being configured... except it will error with:
fragroute.c:151: undefined reference to `event_gotsig'
fragroute.c:181: undefined reference to `event_sigcb'

I just commented those lines out... yeah... seriously... I did. I broke the signal handling of the application.

This is not the best solution for all of this.
I could find and compile against the older version of libevent(1.4.12) and dnet. I could fix the config script to look in the right places... and I could even find someone to fix the signal handling of the app or learn c and fix it myself using evsignal_set() and evsignal_add()..
But I didn't...

So, in summary:
sudo apt-get install libdumbnet-dev
sudo apt-get install libevent-dev

sudo mkdir -p /usr/include/bin/

sudo ln -s /usr/lib64/libevent.a /usr/include/libevent.a

sudo ln -s /usr/include/dumbnet.h /usr/include/dnet.h

sudo ln -s /usr/bin/dnet-config /usr/include/bin/dnet-config

vi fragroute.c

:151 /* event_gotsig++; */

:181 /* event_sigcb = fragroute_close; */
./configure --with-libevent=/usr/include --with-libdnet=/usr/include

Comments