[MacPorts] #29963: smokeping @2.4.2 +Prototype mismatch: sub SNMP_Session::AF_INET6

MacPorts noreply at macports.org
Tue Jun 28 19:29:40 PDT 2011


#29963: smokeping @2.4.2 +Prototype mismatch: sub SNMP_Session::AF_INET6
--------------------------------------+-------------------------------------
 Reporter:  filter@…                  |       Owner:  macports-tickets@…                   
     Type:  defect                    |      Status:  new                                  
 Priority:  Normal                    |   Milestone:                                       
Component:  ports                     |     Version:  1.9.2                                
 Keywords:                            |        Port:                                       
--------------------------------------+-------------------------------------
 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:[[BR]]
 OS X 10.5[[BR]]
 [[BR]]
 PERL v.5.12.3[[BR]]
 CPAN v1.9600[[BR]]

 Relevant installed perl packages:[[BR]]
 IO::Socket v.1.31[[BR]]
 IO::Socket::INET6 v.2.67[[BR]]
 Socket6 v.0.23[[BR]]


 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.

-- 
Ticket URL: <https://trac.macports.org/ticket/29963>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list