strange dlopen() problem with ucd-snmp RPM

John P. Looney john at antefacto.com
Thu Apr 4 14:10:37 CEST 2002


On Thu, Apr 04, 2002 at 01:46:54PM +0200, Tomasz K?oczko mentioned:
> On Thu, 4 Apr 2002, John P. Looney wrote:
> > Apr  3 12:19:02 bartender ucd-snmp[492]: /etc/snmp/snmpd.conf: line 24: Warning: Unknown token: dlmod. 
> 
> IIRC ucd-snmp ver 4.2.3 still does not support dynamicaly loadable
> modules (IIRC finish this is listed in TODO file).
> I dont remember anything from ucd-snmp dok about how to enable using
> dynamically loadable modules. Do you know where it is described ?

 No, they work fine. I've been using dynamically loaded modules since
4.1.0. Usually, as long as dlopen is found, they work.

> config.h is generated from config.h.in which is generated by autoheader.
> You must regenerate config.h.in by run autoheader or if DLOPEN isnt't
> defined in configure.in you must add this to acconfih.h and after this 
> run autoheader.

 The rpm build process does do all that. It runs;

+ cd ucd-snmp-4.2.3
+ libtoolize --copy --force
You should add the contents of `/usr/share/aclocal/libtool.m4' to
`aclocal.m4'.
+ aclocal
+ autoheader
+ autoconf
+ ./configure LDFLAGS=-s ....

> > [root at bartender ucd-snmp-4.2.3]# grep DL config.h |grep -v MIBS
> > #define HAVE_DLFCN_H 1
> > /* #undef HAVE_DLOPEN */
> As you see in HAVE_DLOPEN symbol comes with libtool.m4 .. so probaly
> proper solution it will be patch this for change s/DLOPEN/HAVE_DLOPEN/.

 Are you sure ? This same SRPM on RedHat does detect dlopen() correctly,
and has

#define HAVE_DLOPEN 1

 in it's config.h afterwards - though I had to do some changing to the spec, to
get it to configure, like;

[root at doozer SPECS]# diff ucd-snmp.spec ucd-snmp.spec.changed 
2d1
< %include  /usr/lib/rpm/macros.perl
50d48
< BuildRequires:    libwrap-devel
53d50
< BuildRequires:    popt-devel
59,60d55
< BuildRequires:    rpm-perlprov >= 3.0.3-16
< BuildRequires:    perl-devel >= 5.6.1
393,394d387
<   --with-cflags="%{rpmcflags} -I%{_includedir}/rpm" \
<   --with-ldflags="%{rpmldflags}" \

> >  Does anyone know why this could happen ? This change is not required on
> > RedHat at all. The configure script notes that dlopen does work, and needs
> > -ldl - but it does not show this in config.log.
> Can you pack all files by "rpm -bs ucd-snmp.spec" and put generated 
> src.rpm somewhere on ftp/http ? (send me on priv URL if it is possible).

 This is just the ucd-snmp-4.2.3-4.src.rpm downloaded from ftp.pld.org.pl

> BTW. Do you know anything about other usefull modules for ucd-snmp ?

 Not really. We use snmp in a product we make (linux based load balancer),
so we have some extensions to let people configure ipvs & our monitoring
and notification software. That is all I use it for.

> BTW2. Today I'm prepare mbrowse (simple MIB browser). It is now avalaible 
> on ftp. Also continue in SNMP subject also on ftp is avalaible gxsnmp
> (partialy works) and SMI tools. Do you know anything about other SNMP 
> tools ? (except scotty)

 I was going to write a mib browser in PHP, but never got around to it. It
would be nice if you had a SNMP browser in PHP running on the server too,
so you didn't need an SNMP client.

 There are very few good free tools for snmp, as people are willing to pay
for SNMP tools.

John

-- 
_______________________________________
John Looney             Chief Scientist
a n t e f a c t o     t: +353 1 8586004
www.antefacto.com     f: +353 1 8586014



More information about the pld-users-en mailing list