Compiling argus with geoip dynamic shared object
Charles G. Smutz
csmutz at gmu.edu
Fri Sep 25 08:14:41 EDT 2009
Carter,
Thanks for making such a great tool. The recent updates to the argus website are also nice.
I wanted to report a minor issue I had compiling argus with geoip support and what I did to deal with it. I realize I’m really getting nit picky but I figured providing feedback to this distro might help next guy.
The problem I encountered involves compiling argus clients against the maxmind geoip dynamically loaded shared object. The current configure script doesn’t support this directly, but it can still be successfully built with a little hacking.
I run argus on RHEL/centos 5 on x86_64. I have maxmind GeoIP installed as dynamic shared object (.so) but not as a static shared object (.a) as is common for packages for this platform such as those found on EPEL (http://download.fedora.redhat.com/pub/epel/5/x86_64/repoview/geoip.html). Regardless, I prefer to compile argus with things like geoip linked dynamically rather than statically linked.
The current configure script (3.0.2) for argus-clients doesn’t handle this case well. First of all, from what I can tell, it only looks for the static object (GeoIP.a). Beyond that, I seem to remember having some issues overriding the directory in which it was searching even thought ld has no problem finding my GeoIP.so. If I remember correctly, it was a “lib” vs. “lib64” issue combined with a .h and .so in different directory issue.
I overcame this problem my hacking my specfile such that it circumvents the configure scripts’ geoip checks and just forces geoip to be enabled directly. This is ugly for many reasons but works for my deployment. More robust options for dynamic/static shared objects and library paths would be nice. The following is an excerpt from my specfile for argus-clients:
export CFLAGS="$CFLAGS -DARGUS_GEOIP=1"
export LIBS="-lGeoIP"
%configure
Hope this information is useful to you or to others.
Thanks again for the great tool,
Charles Smutz
More information about the argus
mailing list