Skip Menu |

This queue is for tickets about the IO-Socket-IP CPAN distribution.

Report information
The Basics
Id: 98328
Status: resolved
Priority: 0/
Queue: IO-Socket-IP

People
Owner: Nobody in particular
Requestors: bourbaki007 [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.32



Subject: version 0.29 test fail 15 and 16
Date: Tue, 26 Aug 2014 18:54:52 +0200
To: bug-IO-Socket-IP [...] rt.cpan.org
From: Daniel Boerner <bourbaki007 [...] gmail.com>
I'm trying to build Perl 5.20.0 (IO-Socket-IP-0.29 and Socket-1.97) on both 64-bit systems as non-root user: Linux samsi 3.4.0-ARCH #1 SMP Sun Jul 7 20:57:13 CDT 2013 armv7l GNU/Linux and Linux nougat 2.6.32-5-amd64 #1 SMP Tue May 13 16:34:35 UTC 2014 x86_64 GNU/Linux but both builds fail because of: $ ./perl -Ilib cpan/IO-Socket-IP/t/16v6only.t Cannot listen on PF_INET6 - Name or service not known at cpan/IO-Socket-IP/t/16v6only.t line 22. $ ./perl -Ilib cpan/IO-Socket-IP/t/15io-socket.t not ok 1 - 'IO::Socket->new( Domain => AF_INET )' isa 'IO::Socket::IP' # Failed test ''IO::Socket->new( Domain => AF_INET )' isa 'IO::Socket::IP'' # at cpan/IO-Socket-IP/t/15io-socket.t line 20. # 'IO::Socket->new( Domain => AF_INET )' isn't defined ok 2 - Domain => AF_INET, LocalHost => "::1" fails not ok 3 - 'IO::Socket->new( Domain => AF_INET6 )' isa 'IO::Socket::IP' # Failed test ''IO::Socket->new( Domain => AF_INET6 )' isa 'IO::Socket::IP'' # at cpan/IO-Socket-IP/t/15io-socket.t line 45. # 'IO::Socket->new( Domain => AF_INET6 )' isn't defined # error was Name or service not known ok 4 - Domain => AF_INET6, LocalHost => "127.0.0.1" fails 1..4 # Looks like you failed 2 tests of 4. Notes: 1. I was able to build Perl 5.18.2 on above systems without any test failure. 2. I was able to build Perl 5.20.0 on Ubuntu Linux 10.04 (32-bits) without any test failure. Thanks.
Subject: [rt.cpan.org #98328]
Date: Wed, 27 Aug 2014 07:58:20 +0200
To: bug-IO-Socket-IP [...] rt.cpan.org
From: Daniel Boerner <bourbaki007 [...] gmail.com>
Solved: I was trying to build Perl 5.20.0 on off-line systems without a configured network interface (just loopback). Two solutions: 1. Setup a network interface before building Perl. For example: ifconfig eth0 192.168.1.13 netmask 255.255.255.0 up or 2. Apply following two patches after extracting the Perl source: (adding GetAddrInfoFlags => 0, # disable AI_ADDRCONFIG) --- 15io-socket.t 2014-05-26 15:34:19.000000000 +0200 +++ new/15io-socket.t 2014-08-27 07:38:14.000000000 +0200 @@ -15,6 +15,7 @@ use IO::Socket::IP -register; Type => SOCK_STREAM, LocalHost => "127.0.0.1", LocalPort => 0, + GetAddrInfoFlags => 0, # disable AI_ADDRCONFIG ); isa_ok( $sock, "IO::Socket::IP", 'IO::Socket->new( Domain => AF_INET )' ); @@ -40,6 +41,7 @@ SKIP: { Type => SOCK_STREAM, LocalHost => "::1", LocalPort => 0, + GetAddrInfoFlags => 0, # disable AI_ADDRCONFIG ); isa_ok( $sock, "IO::Socket::IP", 'IO::Socket->new( Domain => AF_INET6 )' ) or --- 16v6only.t 2014-05-26 15:34:19.000000000 +0200 +++ new/16v6only.t 2014-08-27 07:38:45.000000000 +0200 @@ -25,6 +25,7 @@ my $ECONNREFUSED_STR = "$!"; LocalPort => 0, Type => SOCK_STREAM, V6Only => 1, + GetAddrInfoFlags => 0, # disable AI_ADDRCONFIG ) or die "Cannot listen on PF_INET6 - $@"; is( $listensock->getsockopt( IPPROTO_IPV6, IPV6_V6ONLY ), 1, 'IPV6_V6ONLY is 1 on $listensock' ); @@ -34,6 +35,7 @@ my $ECONNREFUSED_STR = "$!"; PeerHost => "127.0.0.1", PeerPort => $listensock->sockport, Type => SOCK_STREAM, + GetAddrInfoFlags => 0, # disable AI_ADDRCONFIG ); my $err = "$@"; @@ -52,6 +54,7 @@ SKIP: { LocalPort => 0, Type => SOCK_STREAM, V6Only => 0, + GetAddrInfoFlags => 0, # disable AI_ADDRCONFIG ) or die "Cannot listen on PF_INET6 - $@"; is( $listensock->getsockopt( IPPROTO_IPV6, IPV6_V6ONLY ), 0, 'IPV6_V6ONLY is 0 on $listensock' ); @@ -61,6 +64,7 @@ SKIP: { PeerHost => "127.0.0.1", PeerPort => $listensock->sockport, Type => SOCK_STREAM, + GetAddrInfoFlags => 0, # disable AI_ADDRCONFIG ); my $err = "$@";
Thanks, patch applied; will be in next release. -- Paul Evans
Released -- Paul Evans