Bug 182213 - Bad: undefined symbol: netsnmp_add_global_traphandler
Bad: undefined symbol: netsnmp_add_global_traphandler
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: net-snmp (Show other bugs)
4
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Radek Vokal
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-20 21:15 EST by Andrey
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-09 08:30:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andrey 2006-02-20 21:15:54 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.1 (like Gecko)

Description of problem:
In the documentation (perldoc NetSNMP::TrapReceiver) there is an example:   
#!/usr/bin/perl   
use NetSNMP::TrapReceiver;   
   
sub my_receiver {   
    print "********** PERL RECEIVED A NOTIFICATION:\n";   
   
   # print the PDU info (a hash reference)   
   print "PDU INFO:\n";   
   foreach my $k(keys(%{$_[0]})) {   
       printf "  %-30s %s\n", $k, $_[0]{$k};   
   }   
   
   # print the variable bindings:   
   print "VARBINDS:\n";   
   foreach my $x (@{$_[1]}) {   
       printf "  %-30s type=%-2d value=%s\n", $x->[0], $x->[2], $x->[1];   
   }   
}   
  
NetSNMP::TrapReceiver::register("all", \&my_receiver) ||   
    warn "failed to register our perl trap handler\n";   
  
print STDERR "Loaded the example perl snmptrapd handler\n";   
   
At its start I receive a mistake.   
 
perl: symbol lookup  
error: /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi/auto/NetSNMP/TrapReceiver/TrapReceiver.so:  
undefined symbol: netsnmp_add_global_traphandler  
  

Version-Release number of selected component (if applicable):
net-snmp-perl-5.2.1.2-fc4.1

How reproducible:
Always

Steps to Reproduce:
1. perl code  
#!/usr/bin/perl     
use NetSNMP::TrapReceiver;     
     
sub my_receiver {     
    print "********** PERL RECEIVED A NOTIFICATION:\n";     
     
   # print the PDU info (a hash reference)     
   print "PDU INFO:\n";     
   foreach my $k(keys(%{$_[0]})) {     
       printf "  %-30s %s\n", $k, $_[0]{$k};     
   }     
     
   # print the variable bindings:     
   print "VARBINDS:\n";     
   foreach my $x (@{$_[1]}) {     
       printf "  %-30s type=%-2d value=%s\n", $x->[0], $x->[2], $x->[1];     
   }     
}     
    
NetSNMP::TrapReceiver::register("all", \&my_receiver) ||     
    warn "failed to register our perl trap handler\n";     
    
print STDERR "Loaded the example perl snmptrapd handler\n";   
  
    

Additional info:
Comment 1 Radek Vokal 2006-08-09 08:30:50 EDT
After re-reading the initial request: what are you actually aiming at? The
example perl script is not meant to run standalone! And AFAICS it works just
fine when used as embedded perl within snmptrapd.

Note You need to log in before you can comment on or make changes to this bug.