For error-free operation of the module Net-Dns in Perl64 on Windows x64 You need to fix the module Win32-IPHelper using patch Win32_IPHelper_64bit.diff
See:
Mini How-To: practical method to install ASSP v2.X on Windows x64 using Strawberry Perl v5.12.X x64
See about Win32_IPHelper_64bit.diff :
https://rt.cpan.org/Public/Bug/Display.html?id=59790
2011-06-16 11-34:
----- Original Message -----
From: "Victor Miasnikov"
To: "Curtis Jewell"
Sent: Thursday, June 16, 2011 10:39 AM
Subject: Win32-IPHelper-0.06.patch Win32-IPHelper-0.06.yml Fw: Win32::IPHelper needs a patch to correct work in Perl x64 ( Strawberry Perl v5.14.X / v5.12.X , Active Perl) Fw: for Ok Net-Dns in Perl64 need to fix the module Win32-IPHelper
Win32-IPHelper-0.06.patch
Win32-IPHelper-0.06.yml
. . .
---
Generate Win32-IPHelper-0.06.patch
makepatch "C:\strawberry\cpanplus -VVM\5.12.3--build00\Win32-IPHelper-0.06" C:\strawberry\cpanplus\5.12.3\build\Win32-IPHelper-0.06\ >Win32-IPHelper-0.06.patch.$$$
==
Win32::IPHelper needs a patch to correct work in Perl x64 ( Strawberry Perl v5.14.X / v5.12.X , Active Perl)
Or
For error-free operation of the module Net-Dns in Perl64 on Windows x64 You need to fix the module Win32-IPHelper using patch
( see RT #59790 "Bug #59790 for Win32-IPHelper: A few functions are not valid in a Perl64 environment."
https://rt.cpan.org/Public/Bug/Display.html?id=59790
)
Win32_IPHelper_64bit.diff 2011-02-09 22:15:59 by lwsitu (at) yahoo.com
Win32_IPHelper_64bit_fixed_CR-LF.diff 2011-06-09 10:45:40 by Victor Miasnikov
Win32-IPHelper-0.06.patch 2011-06-16 10:21:00 by Victor Miasnikov
See:
http://vvm.blog.tut.by/2011/05/25/for-ok-net-dns-in-perl64-on-windows-x64-need-to-fix-win32-iphelper-using-patch-win32_iphelper_64bit-diff/
==
== Win32-IPHelper-0.06.yml ==
comment: |
Win32::IPHelper needs a patch to correct work in Perl x64 ( Strawberry Perl v5.14.X / v5.12.X , Active Perl)
( see RT #59790 "Bug #59790 for Win32-IPHelper: A few functions are not valid in a Perl64 environment."
https://rt.cpan.org/Public/Bug/Display.html?id=59790
)
match:
distribution: |
^(?x:
.^ # never matches, only purpose is to let things align nicely
|LMASARA\Win32-IPHelper-0.06.tar.gz # Needs a patch to install.
)|
patches:
- "Win32-IPHelper-0.06.patch"
==
== Win32-IPHelper-0.06.patch ==
# Win32::IPHelper needs a patch to correct work in Perl x64 ( Strawberry Perl v5.14.X / v5.12.X , Active Perl)
# Or
# For error-free operation of the module Net-Dns in Perl64 on Windows x64 You need to fix the module Win32-IPHelper using patch
#
# ( see RT #59790 "Bug #59790 for Win32-IPHelper: A few functions are not valid in a Perl64 environment."
# https://rt.cpan.org/Public/Bug/Display.html?id=59790
# )
#
# Win32_IPHelper_64bit.diff 2011-02-09 22:15:59 by lwsitu (at) yahoo.com
#
# Win32_IPHelper_64bit_fixed_CR-LF.diff 2011-06-09 10:45:40 by Victor Miasnikov
# Win32-IPHelper-0.06.patch 2011-06-16 10:21:00 by Victor Miasnikov
#
# See:
# http://vvm.blog.tut.by/2011/05/25/for-ok-net-dns-in-perl64-on-windows-x64-need-to-fix-win32-iphelper-using-patch-win32_iphelper_64bit-diff/
#
# To apply this patch:
# STEP 1: Chdir to the source directory.
# STEP 2: Run the 'applypatch' program with this patch file as input.
#
# If you do not have 'applypatch', it is part of the 'makepatch' package
# that you can fetch from the Comprehensive Perl Archive Network:
# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
# In the above URL, 'x' should be 2 or higher.
#
# To apply this patch without the use of 'applypatch':
# STEP 1: Chdir to the source directory.
# STEP 2: Run the 'patch' program with this file as input.
#
#### End of Preamble ####
#### Patch data follows ####
diff -c "C:\strawberry\cpanplus -VVM\5.12.3--build00\Win32-IPHelper-0.06\IPHelper.pm" "C:\strawberry\cpanplus\5.12.3\build\Win32-IPHelper-0.06\IPHelper.pm"
Index: ./IPHelper.pm
*** ./IPHelper.pm Thu Jul 24 00:30:54 2008
--- ./IPHelper.pm Thu Jun 16 10:05:54 2011
***************
*** 9,14 ****
--- 9,15 ----
use Win32;
use Win32::API;
use enum;
+ use Config ();
require Exporter;
***************
*** 39,45 ****
our @EXPORT = qw();
! our $VERSION = '0.06';
my $GetProcessHeap = new Win32::API ('Kernel32', 'GetProcessHeap', [], 'N') or croak 'can\'t find GetProcessHeap() function';
my $AddIPAddress = new Win32::API ('Iphlpapi', 'AddIPAddress', ['N', 'N', 'N', 'P', 'P'], 'N') or croak 'can\'t find AddIPAddress() function';
--- 40,46 ----
our @EXPORT = qw();
! our $VERSION = '0.060000001';
my $GetProcessHeap = new Win32::API ('Kernel32', 'GetProcessHeap', [], 'N') or croak 'can\'t find GetProcessHeap() function';
my $AddIPAddress = new Win32::API ('Iphlpapi', 'AddIPAddress', ['N', 'N', 'N', 'P', 'P'], 'N') or croak 'can\'t find AddIPAddress() function';
***************
*** 60,65 ****
--- 61,67 ----
my $GetExtendedTcpTable = new Win32::API ('Iphlpapi', 'GetExtendedTcpTable', ['P', 'P', 'N', 'N', 'N', 'N'], 'N');
my $GetExtendedUdpTable = new Win32::API ('Iphlpapi', 'GetExtendedUdpTable', ['P', 'P', 'N', 'N', 'N', 'N'], 'N');
+ my $PTR_SIZE = $Config::Config{ptrsize};
# Preloaded methods go here.
***************
*** 1451,1462 ****
sub _IP_ADAPTER_INFO
{
my ($buffer, $pos) = @_;
! my $size = 640;
my %hash;
my @array;
my $next;
! ($pos, $next) =_shiftunpack($buffer, $pos, 4, "P".$size);
($pos, $hash{'ComboIndex'}) = _shiftunpack($buffer, $pos, 4, "L");
($pos, $hash{'AdapterName'}) = _shiftunpack($buffer, $pos, (MAX_ADAPTER_NAME_LENGTH + 4), "Z" . (MAX_ADAPTER_NAME_LENGTH + 4));
--- 1453,1464 ----
sub _IP_ADAPTER_INFO
{
my ($buffer, $pos) = @_;
! my $size = $PTR_SIZE + 636;
my %hash;
my @array;
my $next;
! ($pos, $next) =_shiftunpack($buffer, $pos, $PTR_SIZE, "P".$size);
($pos, $hash{'ComboIndex'}) = _shiftunpack($buffer, $pos, 4, "L");
($pos, $hash{'AdapterName'}) = _shiftunpack($buffer, $pos, (MAX_ADAPTER_NAME_LENGTH + 4), "Z" . (MAX_ADAPTER_NAME_LENGTH + 4));
***************
*** 1499,1504 ****
--- 1501,1529 ----
}
#######################################################################
+ # _ADDR_STRING_STRUCT_SIZE
+ #
+ # Constant for the size of a IP_ADDR_STRING/PIP_ADDR_STRING struct.
+ # This varies depending on whether it is running in 32bit or 64bit perl
+ #
+ #######################################################################
+ # Usage:
+ # $size = _ADDR_STRING_STRUCT_SIZE;
+ #
+ # Output:
+ # $size - size of the structs
+ #
+ # Input:
+ # None
+ #######################################################################
+ sub _ADDR_STRING_STRUCT_SIZE() {
+ return $PTR_SIZE # struct *
+ + 16 # char[16]
+ + 16 # char[16]
+ + 4; # DWORD
+ }
+
+ #######################################################################
# _IP_ADDR_STRING()
#
# Decodes an _IP_ADDR_STRING data structure and returns data
***************
*** 1533,1544 ****
sub _IP_ADDR_STRING
{
my ($buffer, $pos) = @_;
! my $size = 40;
my %hash;
my @array;
my $next;
! ($pos, $next) = _shiftunpack($buffer, $pos, 4, "P".$size);
($pos, $hash{'IpAddress'}) = _shiftunpack($buffer, $pos, 16, "Z16");
($pos, $hash{'IpMask'}) = _shiftunpack($buffer, $pos, 16, "Z16");
--- 1558,1569 ----
sub _IP_ADDR_STRING
{
my ($buffer, $pos) = @_;
! my $size = _ADDR_STRING_STRUCT_SIZE;
my %hash;
my @array;
my $next;
! ($pos, $next) = _shiftunpack($buffer, $pos, $PTR_SIZE, "P".$size);
($pos, $hash{'IpAddress'}) = _shiftunpack($buffer, $pos, 16, "Z16");
($pos, $hash{'IpMask'}) = _shiftunpack($buffer, $pos, 16, "Z16");
***************
*** 1695,1701 ****
($pos, $hash{'DomainName'}) = _shiftunpack($buffer, $pos, MAX_DOMAIN_NAME_LEN + 4, "Z".(MAX_DOMAIN_NAME_LEN + 4));
my $CurrentDnsServer;
! ($pos, $CurrentDnsServer) = _shiftunpack($buffer, $pos, 4, "P40");
if ($CurrentDnsServer)
{
@{ $hash{'CurrentDnsServer'} } = _IP_ADDR_STRING(\$CurrentDnsServer, 0);
--- 1720,1727 ----
($pos, $hash{'DomainName'}) = _shiftunpack($buffer, $pos, MAX_DOMAIN_NAME_LEN + 4, "Z".(MAX_DOMAIN_NAME_LEN + 4));
my $CurrentDnsServer;
! my $size = _ADDR_STRING_STRUCT_SIZE;
! ($pos, $CurrentDnsServer) = _shiftunpack($buffer, $pos, $PTR_SIZE, "P".$size);
if ($CurrentDnsServer)
{
@{ $hash{'CurrentDnsServer'} } = _IP_ADDR_STRING(\$CurrentDnsServer, 0);
#### End of Patch data ####
#### ApplyPatch data follows ####
# Data version : 1.0
# Date generated : Thu Jun 16 10:22:40 2011
# Generated by : makepatch 2.04
# Recurse directories : Yes
# Excluded files : (\A|/).*\~\Z
# (\A|/).*\.a\Z
# (\A|/).*\.bak\Z
# (\A|/).*\.BAK\Z
# (\A|/).*\.elc\Z
# (\A|/).*\.exe\Z
# (\A|/).*\.gz\Z
# (\A|/).*\.ln\Z
# (\A|/).*\.o\Z
# (\A|/).*\.obj\Z
# (\A|/).*\.olb\Z
# (\A|/).*\.old\Z
# (\A|/).*\.orig\Z
# (\A|/).*\.rej\Z
# (\A|/).*\.so\Z
# (\A|/).*\.Z\Z
# (\A|/)\.del\-.*\Z
# (\A|/)\.make\.state\Z
# (\A|/)\.nse_depinfo\Z
# (\A|/)core\Z
# (\A|/)tags\Z
# (\A|/)TAGS\Z
# p "IPHelper.pm" 78042 1308207954 0100666
#### End of ApplyPatch data ####
#### End of Patch kit [created: Thu Jun 16 10:22:40 2011] ####
#### Patch checksum: 179 6112 139 ####
#### Checksum: 211 7560 50614 ####
==
——————
2011-05-25 17-21:
See about Win32_IPHelper_64bit.diff :
https://rt.cpan.org/Public/Bug/Display.html?id=59790
Win32_IPHelper_64bit.diff
--- IPHelper.pm.1 2008-07-23 19:35:36.000000000 -0400
+++ IPHelper.pm 2011-02-09 22:05:58.000000000 -0500
@@ -9,6 +9,7 @@
use Win32;
use Win32::API;
use enum;
+use Config ();
require Exporter;
@@ -60,6 +61,7 @@
my $GetExtendedTcpTable = new Win32::API ('Iphlpapi', 'GetExtendedTcpTable', ['P', 'P', 'N', 'N', 'N', 'N'], 'N');
my $GetExtendedUdpTable = new Win32::API ('Iphlpapi', 'GetExtendedUdpTable', ['P', 'P', 'N', 'N', 'N', 'N'], 'N');
+my $PTR_SIZE = $Config::Config{ptrsize};
# Preloaded methods go here.
@@ -1451,12 +1453,12 @@
sub _IP_ADAPTER_INFO
{
my ($buffer, $pos) = @_;
- my $size = 640;
+ my $size = $PTR_SIZE + 636;
my %hash;
my @array;
my $next;
- ($pos, $next) =_shiftunpack($buffer, $pos, 4, "P".$size);
+ ($pos, $next) =_shiftunpack($buffer, $pos, $PTR_SIZE, "P".$size);
($pos, $hash{'ComboIndex'}) = _shiftunpack($buffer, $pos, 4, "L");
($pos, $hash{'AdapterName'}) = _shiftunpack($buffer, $pos, (MAX_ADAPTER_NAME_LENGTH + 4), "Z" . (MAX_ADAPTER_NAME_LENGTH + 4));
@@ -1499,6 +1501,29 @@
}
#######################################################################
+# _ADDR_STRING_STRUCT_SIZE
+#
+# Constant for the size of a IP_ADDR_STRING/PIP_ADDR_STRING struct.
+# This varies depending on whether it is running in 32bit or 64bit perl
+#
+#######################################################################
+# Usage:
+# $size = _ADDR_STRING_STRUCT_SIZE;
+#
+# Output:
+# $size - size of the structs
+#
+# Input:
+# None
+#######################################################################
+sub _ADDR_STRING_STRUCT_SIZE() {
+ return $PTR_SIZE # struct *
+ + 16 # char[16]
+ + 16 # char[16]
+ + 4; # DWORD
+}
+
+#######################################################################
# _IP_ADDR_STRING()
#
# Decodes an _IP_ADDR_STRING data structure and returns data
@@ -1533,12 +1558,12 @@
sub _IP_ADDR_STRING
{
my ($buffer, $pos) = @_;
- my $size = 40;
+ my $size = _ADDR_STRING_STRUCT_SIZE;
my %hash;
my @array;
my $next;
- ($pos, $next) = _shiftunpack($buffer, $pos, 4, "P".$size);
+ ($pos, $next) = _shiftunpack($buffer, $pos, $PTR_SIZE, "P".$size);
($pos, $hash{'IpAddress'}) = _shiftunpack($buffer, $pos, 16, "Z16");
($pos, $hash{'IpMask'}) = _shiftunpack($buffer, $pos, 16, "Z16");
@@ -1695,7 +1720,8 @@
($pos, $hash{'DomainName'}) = _shiftunpack($buffer, $pos, MAX_DOMAIN_NAME_LEN + 4, "Z".(MAX_DOMAIN_NAME_LEN + 4));
my $CurrentDnsServer;
- ($pos, $CurrentDnsServer) = _shiftunpack($buffer, $pos, 4, "P40");
+ my $size = _ADDR_STRING_STRUCT_SIZE;
+ ($pos, $CurrentDnsServer) = _shiftunpack($buffer, $pos, $PTR_SIZE, "P".$size);
if ($CurrentDnsServer)
{
@{ $hash{'CurrentDnsServer'} } = _IP_ADDR_STRING(\$CurrentDnsServer, 0);
———
2011-05-25 17-20:
See:
Mini How-To: practical method to install ASSP v2.X on Windows x64 using Strawberry Perl v5.12.X x64
#{
#
#For error-free operation of the module Net-Dns in Perl64 on Windows x64 You need to fix the module Win32-IPHelper using patch Win32_IPHelper_64bit.diff
Issue:
===
Apr-15-11 16:42:17 [Worker_10000] Warning: Name Server p�: does not respond or timed out
Apr-15-11 16:42:17 [Worker_10000] ERROR: !!!! no answering DNS-SERVER found !!!!
===Run:
cpanp i enumDownload and extract Win32-IPHelper-0.06 by run:
cpanp z Win32::IPHelper
See about Win32_IPHelper_64bit.diff :
https://rt.cpan.org/Public/Bug/Display.html?id=59790
Download Win32_IPHelper_64bit.diff from
https://rt.cpan.org/Ticket/Attachment/895196/464097/Win32_IPHelper_64bit.diff
Open Win32_IPHelper_64bit.diff in editor from FAR commander and save
#{ HowTo fix:
# Halt with "patch.c, Line 354" if "file has CRs and CR-LFs." => convert the line endings to CR-LF
#Screenshot:
===
C:\strawberry\cpanplus\5.12.3\build\Win32-IPHelper-0.06>C:\strawberry\c\bin\patch.exe "IPHelper.pm.Orig" -i Win32_IPHelper_64bit.diff -o "IPHelper.pm"
patching file IPHelper.pm.OrigThis application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Assertation failed!Program: C:\strawberry\c\bin\patch.exe
File: .\src\patch\2.5.9\patch-2.5.9-src\patch.c, Line 354Expression: hunk
===See:
http://old.nabble.com/Bulit-in-patch-is-needed-when---patch-cmd-option-of-'svn-patch'-is-omitted-td19590959.html
===
. . .
Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
svn: 'patch.exe' returned error exitcode 3I open the patch file with a text editor and find that the file has CRs and CR-LFs.
Then I convert the line endings to CR-LF and re-try 'svn patch'. I can successfully
. . .
===#
#
#}Copy file Win32_IPHelper_64bit.diff to
C:\strawberry\cpanplus\5.12.3\build\Win32-IPHelper-0.06\Rename "IPHelper.pm" to "IPHelper.pm.Orig" :
rename "IPHelper.pm" "IPHelper.pm.Orig"Apply .diff :
patch "IPHelper.pm.Orig" -i Win32_IPHelper_64bit.diff -o "IPHelper.pm"Swith to cpanp process ( if need) and run:
cpanp i .Exit from cpan shell by run:
Exit#
#
#}