[oi-dev] net-snmp perl support

Alexander Pyhalov alp at rsu.ru
Fri Oct 18 06:16:32 UTC 2013


Hello.
Can someone confirm that current 32-bit net-snmp in OpenIndiana /dev 
actually has embedded perl support?

As far as I see it's not true:
# /usr/sbin/i86/snmpd -f

/etc/net-snmp/snmp/snmpd.conf: line 124: Warning: Unknown token: 
disablePerl.
/etc/net-snmp/snmp/snmpd.conf: line 125: Warning: Unknown token: perl.

# elfdump /usr/lib/libnetsnmpagent.so |grep boot_DynaLoader # --shows 
nothing
#
I ask because I have difficulties with enabling embedded perl in 
net-snmp. In fact, not with net-snmp, but building illumos-gate with new 
net-snmp:

/opt/gcc/4.4.4/bin/gcc -fident -finline -fno-inline-functions 
-fno-builtin -fno-asm -fdiagnostics-show-option -nodefaultlibs -D__sun 
-o libfmd_snmp.so.1 -shared -hlibfmd_snmp.so
.1 -Wl,-ztext -Wl,-zdefs -Wl,-Bdirect -Wl,-M../common/mapfile-vers 
-Wl,-M/export/home/alp/srcs/oi-userland/components/illumos/illumos-gate/illumos-gate/usr/src/common/mapfiles/com
mon/map.pagealign 
-Wl,-M/export/home/alp/srcs/oi-userland/components/illumos/illumos-gate/illumos-gate/usr/src/common/mapfiles/common/map.noexdata -R/usr/lib/fm pics/debug_subr.o
pics/init.o pics/module.o pics/problem.o pics/resource.o pics/scheme.o 
-L/export/home/alp/srcs/oi-userland/components/illumos/illumos-gate/illumos-gate/proto/root_i386/lib -L/expo
rt/home/alp/srcs/oi-userland/components/illumos/illumos-gate/illumos-gate/proto/root_i386/usr/lib -L/export/home/alp/srcs/oi-userland/components/illumos/illumos-gate/illumos-gate/
proto/root_i386/usr/lib/fm -lfmd_adm -luutil -lnvpair -ltopo -lnetsnmp 
-lnetsnmphelpers -lnetsnmpagent -lc

Undefined                       first referenced
  symbol                             in file
main                                
/usr/perl5/5.16/lib/i86pc-solaris-64int/CORE/libperl.so
ld: fatal: symbol referencing errors. No output written to 
libfmd_snmp.so.1
collect2: ld returned 1 exit status

However, perl support seems to be "more alive":

# elfdump /usr/lib/libnetsnmpagent.so |grep boot_DynaLoader
      [497]  0x00000000 0x00000000  FUNC GLOB  D    0 UNDEF          
boot_DynaLoader
     [1551]  0x00000000 0x00000000  FUNC GLOB  D    0 UNDEF          
boot_DynaLoader
        486  [497]       boot_DynaLoader
      [515]  0x0004a80c  0x00000000  R_386_GLOB_DAT            
boot_DynaLoader
      [497]  DB           [1] libperl.so               boot_DynaLoader
   R_386_GLOB_DAT              0x4a80c             .SUNW_reloc    
boot_DynaLoader


# ldd /usr/lib/libnetsnmpagent.so
         libperl.so =>    
/usr/perl5/5.16/lib/i86pc-solaris-64int/CORE/libperl.so
         libsocket.so.1 =>        /usr/lib/libsocket.so.1
         libc.so.1 =>     /usr/lib/libc.so.1
         libnetsnmp.so.15 =>      /usr/lib/libnetsnmp.so.15
         libnetsnmphelpers.so.15 =>       
/usr/lib/libnetsnmphelpers.so.15
         libssp.so.0 =>   /usr/lib/libssp.so.0
         libnsl.so.1 =>   /lib/libnsl.so.1
         libdl.so.1 =>    /lib/libdl.so.1
         libm.so.2 =>     /lib/libm.so.2
         libkstat.so.1 =>         /usr/lib/libkstat.so.1
         libpkcs11.so.1 =>        /usr/lib/libpkcs11.so.1
         libmp.so.2 =>    /lib/libmp.so.2
         libmd.so.1 =>    /lib/libmd.so.1
         libcryptoutil.so.1 =>    /lib/libcryptoutil.so.1

# /usr/sbin/i86/snmpd -f
embedded perl support failed to initalize
NET-SNMP version 5.4.1.2
Received TERM or STOP signal...  shutting down...

Can't open perl script "/etc/net-snmp/snmp/snmp_perl.pl": No such file 
or directory

Also I see that in OmniOS embedded perl support for net-snmp is 
explicitly disabled...
-- 
System Administrator of Southern Federal University Computer Center




More information about the oi-dev mailing list