Ticket #29963 (new defect)
smokeping @2.4.2 +Prototype mismatch: sub SNMP_Session::AF_INET6
| Reported by: | filter@… | Owned by: | markd@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 1.9.2 |
| Keywords: | Cc: | filter@… | |
| Port: | smokeping |
Description
I installed smokeping on OS X 10.6.7. Experienced the following error when loading smokeping:
Constant subroutine SNMP_Session::AF_INET6 redefined at /opt/local/lib/perl5/5.12.3/Exporter.pm line 64. at /opt/local/lib/smokeping/SNMP_Session.pm line 129 Prototype mismatch: sub SNMP_Session::AF_INET6 () vs none at /opt/local/lib/perl5/5.12.3/Exporter.pm line 64. at /opt/local/lib/smokeping/SNMP_Session.pm line 582 Prototype mismatch: sub SNMPv1_Session::AF_INET6 () vs none at /opt/local/lib/perl5/5.12.3/Exporter.pm line 64. at /opt/local/lib/smokeping/SNMP_Session.pm line 582 Constant subroutine SNMPv1_Session::PF_INET6 redefined at /opt/local/lib/perl5/5.12.3/Exporter.pm line 64.
I forced manual update of Socket6 and NET::SNMP with:
cpan> install U/UM/UMEMOTO/Socket6-0.23.tar.gz cpan> install Crypt::Rijndael (a NET::SNMP dependency) cpan> install D/DT/DTOWN/Net-SNMP-v6.0.1.tar.gz
Reloaded smokeping, and everything works perfectly.
Next, I attempted to install smokeping on an older host running 10.5.x. Experienced the same error when starting smokeping. However, this time, updating Socket6 and NET::SNMP did nothing to resolve the errors.
System details:
OS X 10.5
PERL v.5.12.3
CPAN v1.9600
Relevant installed perl packages:
IO::Socket v.1.31
IO::Socket::INET6 v.2.67
Socket6 v.0.23
Exporter.pm line 64 reads:
sub import {
.....
63 # shortcut for the common case of no type character
64 *{"$callpkg\::$_"} = \&{"$pkg\::$_"} foreach @_;
65 }
/opt/local/lib/smokeping/SNMP_Session.pm line 129 reads:
123 BEGIN {
124 $ipv6_addr_len = undef;
125 $SNMP_Session::ipv6available = 0;
126
127 if (eval {require Socket6;} &&
128 eval {require IO::Socket::INET6; IO::Socket::INET6->VERSION("1.26");}) {
129 import Socket6;
130 $ipv6_addr_len = length(pack_sockaddr_in6(161, inet_pton(AF_INET6(), "::1")));
131 $SNMP_Session::ipv6available = 1;
132 }
133 }
/opt/local/lib/smokeping/SNMP_Session.pm line line 582 reads:
579 BEGIN {
580 if($SNMP_Session::ipv6available) {
581 import IO::Socket::INET6;
582 import Socket6;
583 }
584 }
Seems like this has something to do with Socket6 naming, but I'll defer to the experts here. If this requires upstream inclusion, please assist, as I am not certain whose shoulder to tap on.


Please remember to fill in the Port field and cc the maintainer.