FAQ:Perl 05

From Net-SNMP Wiki
Revision as of 21:32, 25 October 2006 by Dts12 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The perl 'make test' fails on the OID tests. Is it safe to continue?

No. Almost certainly not. If the "perl/OID" tests fail the first four tests, and then crashes out complaining about a "netsnmp_oidPtr", then this is a sign of a more fundamental problem.

The 4.2.x line perl support was a single module, so was independent of the way that the C library was configured. In contrast to this, the 5.0.x perl support consist of a number of inter-cooperating modules, which rely on sharing a consistent C library environment. In practise, this means that the perl modules MUST be configured and compiled using a shared version of the C library. Unfortunately, the default for most early versions of the Net-SNMP suite was to compile using static libraries unless explicitly configured to use shared libraries. The default should be to use shared libraries from 5.0.7 onwards.

The error "oid1 is not of type netsnmp_oidPtr" is a fairly sure indication that the C library was compiled statically. You'll need to re-configure the main Net-SNMP package using the "--enable-shared" configure flag. Then re-install the C library before re-configuring and re-compiling the perl module support.

Note that this problem does not arise when using the 4.2.x version of perl support.

   FAQ:Perl
   
  1. What is the purpose of the Perl SNMP module?
  2. Where can I get the Perl SNMP package?
  3. How do I install the Perl SNMP modules?
  4. But compiling this fails! Why?
  5. Compiling the Perl module works OK, but 'make test' fails. Why?
  6. Why can't mib2c (or tkmib) locate SNMP.pm?
  7. Why can't mib2c (or tkmib) load SNMP.so?
  8. Why can't tkmib locate Tk.pm?
  9. Why does your RPM complain about missing Perl modules?
  10. I've got a problem with the Net-SNMP module. Can you help?