building the SNMP & NetSNMP modules.

Dave Littrell <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
What I have here is a problem compiling the perl modules for net-snmp 5.2.2.
I'm very much hoping that I've overlooked something obvious, and any insight
about where it's going wrong would be welcome.

This is the machine:

[root@netflow net-snmp-5.2.2]# cat /etc/redhat-release
Fedora Core release 4 (Stentz)

[root@netflow net-snmp-5.2.2]# uname -a
Linux netflow 2.6.14-1.1644_FC4smp #1 SMP Sun Nov 27 03:39:31 EST 2005 i686
i686 i386 GNU/Linux

This is the version of perl:

[root@netflow perl]# perl -v
This is perl, v5.8.6 built for i386-linux-thread-multi

...and this is the compile:

[root@netflow net-snmp-5.2.2]# pwd
/opt/net-snmp-5.2.2
[root@netflow net-snmp-5.2.2]# ./configure --enable-shared
--enable-embedded-perl --with-perl-modules=NetSNMP
(...snip...)
---------------------------------------------------------
            Net-SNMP configuration summary:
---------------------------------------------------------

  SNMP Versions Supported:    1 2c 3
  Net-SNMP Version:           5.2.2
  Building for:               linux
  Network transport support:  Callback Unix TCP UDP
  SNMPv3 Security Modules:    usm
  Agent MIB code:             mibII ucd_snmp snmpv3mibs notification target
agent_mibs agentx utilities
  SNMP Perl modules:          building -- embeddable
  Embedded perl support:      enabled
  Authentication support:     MD5 SHA1
  Encryption support:         DES AES

---------------------------------------------------------

[root@netflow net-snmp-5.2.2]# make
making all in /opt/net-snmp-5.2.2/snmplib
(...snip...)
[root@netflow net-snmp-5.2.2]# make test
making all in /opt/net-snmp-5.2.2/snmplib
(...snip...)
Summary: 46 / 46 succeeded.

So far so good, apparently. Now to build the perl modules...

[root@netflow net-snmp-5.2.2]# cd perl
[root@netflow perl]# perl Makefile.PL
Writing Makefile for NetSNMP::default_store
Writing Makefile for NetSNMP::ASN
Writing Makefile for NetSNMP::OID
Unrecognized argument in LIBS ignored: '-Wl,-E'
Unrecognized argument in LIBS ignored:
'-Wl,-rpath,/usr/lib/perl5/5.8.6/i386-linux-thread-multi/CORE'
Unrecognized argument in LIBS ignored:
'/usr/lib/perl5/5.8.6/i386-linux-thread-multi/auto/DynaLoader/DynaLoader.a'
Writing Makefile for NetSNMP::agent::default_store
Writing Makefile for NetSNMP::agent
Writing Makefile for SNMP
Warning: prerequisite NetSNMP::OID 5.1 not found.
Writing Makefile for NetSNMP::TrapReceiver
Writing Makefile for Bundle::NetSNMP

[root@netflow perl]# make
make[1]: Entering directory `/opt/net-snmp-5.2.2/perl/default_store'
(...a boatload of errors about signedness, for example...)
SNMP.xs:896: warning: pointer targets in passing argument 3 of 'get_node'
differ in signedness
SNMP.xs:902: warning: pointer targets in passing argument 3 of
'get_wild_node' differ in signedness
SNMP.xs:924: warning: pointer targets in passing argument 3 of 'read_objid'
differ in signedness
(...snip...)

[root@netflow perl]# make test
(...snip...)
Can't load '../blib/arch/auto/NetSNMP/default_store/default_store.so' for
module NetSNMP::default_store: libnetsnmp.so.9: cannot open shared object
file: No such file or directory at
/usr/lib/perl5/5.8.6/i386-linux-thread-multi/DynaLoader.pm line 230.
 at test.pl line 71
Compilation failed in require at test.pl line 71.
BEGIN failed--compilation aborted at test.pl line 71.
not ok 1
make[1]: *** [test_dynamic] Error 255
make[1]: Leaving directory `/opt/net-snmp-5.2.2/perl/default_store'
make: *** [test] Error 2

[root@netflow perl]# make install
(...snmp...)
Files found in blib/arch: installing files in blib/lib into architecture
dependent library tree
Writing
/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi/auto/Bundle/NetSNMP/.packlist
Appending installation info to
/usr/lib/perl5/5.8.6/i386-linux-thread-multi/perllocal.pod

[root@netflow perl]# perl
use SNMP;
Can't load
'/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi/auto/NetSNMP/default_store/default_store.so'
for module NetSNMP::default_store: libnetsnmp.so.9: cannot open shared
object file: No such file or directory at
/usr/lib/perl5/5.8.6/i386-linux-thread-multi/DynaLoader.pm line 230.
 at /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi/SNMP.pm line 16
Compilation failed in require at
/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi/SNMP.pm line 16.
BEGIN failed--compilation aborted at
/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi/SNMP.pm line 16.
Compilation failed in require at - line 1.
BEGIN failed--compilation aborted at - line 1.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.