Posts Tagged ‘GCC’

HowTo: Build Strawberry Perl v5.12.3 x86 with GCC toolchain mingw64-w32-gcc4.4.6_20110503-v2.zip and kmx/32_libs 20110506.zip

As result:
-- Strawberry Perl v5.12.3 x86 with GCC toolchain mingw64-w32-gcc4.4.6_20110503-v2.zip and kmx/32_libs 20110506.zip
( strawberry-perl-5.12.3.0-32bit-build-2011-06-09.zip / .msi )

Screenshot:
==
C:\strawberry>gcc -v
Using built-in specs.
Target: i686-w64-mingw32
Configured with: ../gcc44-svn/configure --host=i686-w64-mingw32 --target=i686-w64-mingw32 --disable-multilib --enable-checking=release --prefix=/mingw32 --enabl
e-languages=c,c++,fortran --enable-libgomp --with-gmp=/mingw32 --with-mpfr=/mingw32 --disable-nls --disable-win32-registry
Thread model: win32
gcc version 4.4.6 20110416 (release) [svn/rev.172578 - mingw-w64/oz] (GCC)

C:\strawberry>perl -v

This is perl 5, version 12, subversion 3 (v5.12.3) built for MSWin32-x86-multi-thread

Copyright 1987-2010, Larry Wall

. . .
==

Download:

http://strawberryperl.com/download/5.12.3.0/strawberry-perl-5.12.3.0-64bit.zip

( VVM: Or http://strawberryperl.com/download/5.12.3.0/strawberry-perl-5.12.3.0-32bit.zip , but this not tested )

unpack it to
c:\sb\

Save to c:\sb\portableshell.bat :
==
@echo off
set drive=%~dp0
set drivep=%drive%
If $#\#$==$#%drive:~-1%#$ set drivep=%drive:~0,-1%
set PATH=%drivep%\perl\site\bin;%drivep%\perl\bin;%drivep%\c\bin;%PATH%
set TERM=dumb
echo ----------------------------------------------
echo Welcome to Strawberry Perl Portable Edition!
echo * URL - http://www.strawberryperl.com/
echo * see README.portable.TXT for more info
echo ----------------------------------------------
perl -e "printf("""Perl executable: %%s\nPerl version : %%vd\n""", $^X, $^V)" 2>nul
if ERRORLEVEL==1 echo.&echo FATAL ERROR: 'perl' does not work; check if your strawberry pack is complete!
echo.
cmd
==

#{
# Old:
#
Download:

http://strawberryperl.com/download/5.12.3.0/strawberry-perl-5.12.3.0-portable.zip

unpack only portableshell.bat from it to
c:\sb\
#
#
#}

Run:
portableshell.bat

In portableshell.bat shell:

set PERL_MM_USE_DEFAULT=1

cpanp s save system
===
C:\sb>cpanp s save system
Configuration successfully saved to CPANPLUS::Config::System
(C:\sb\perl\lib\CPANPLUS\Config\System.pm)
===

cpanp s edit system

Replace
strawberryperl to sb
==
$conf->set_conf( base => 'C:\\sb\\cpanplus' );
==

If found:
==
$conf->set_conf( signature => 1 );
==
replace to
==
$conf->set_conf( signature => 0 );
==

Save file.

cpanp i IPC::Run

cpanp i Perl::Dist::Strawberry

cpanp i Perl::Dist::WiX::BuildPerl::5123
cpanp i Perl::Dist::Strawberry::BuildPerl::5123

Screenshot:
===
Preparing Math::Pari
** GET http://strawberryperl.com/package/32bit-gcc4/Math-Pari-2.01080605-MSWin32-x86-multi-thread-5.14.0.par ==> 404 Not Found
===
=>

GoTo:
C:\sb\perl\site\lib\Perl\Dist\
rename
Strawberry.pm
to
Strawberry.pm.Orig

apply patch to Strawberry.pm:
===
--- Strawberry.pm.Orig Tue May 31 04:09:10 2011
+++ Strawberry.pm Tue Jun 14 12:33:15 2011
@@ -449,10 +449,10 @@
name => 'Win32::EventLog',
force => 1, # Tests fail on only one computer, will be reported later
);
- $self->install_modules('Win32::API') if not 64 == $self->bits();
+#VVM $self->install_modules('Win32::API') if not 64 == $self->bits();

# Install additional math modules
- $self->install_pari() if not 64 == $self->bits();
+#VVM $self->install_pari() if not 64 == $self->bits();
$self->install_modules( qw{
Math::BigInt::GMP
} );
@@ -676,7 +676,7 @@
Net::SSLeay
IO::Socket::SSL
Net::SMTP::TLS
- }) if 32 == $self->bits();
+ }) if 932 == $self->bits(); #VVM

# The rest of the Net::SSH::Perl toolchain.
$self->install_module(
@@ -690,7 +690,7 @@
# Check why this one isn't working.
$self->install_modules( qw{
Crypt::DSA
- }) if 32 == $self->bits();
+ }) if 932 == $self->bits(); #VVM
$self->install_modules( qw{
Class::ErrorHandler
Convert::ASN1
@@ -712,7 +712,7 @@
# Requires Math::Pari.
$self->install_modules( qw{
Crypt::Random
- }) if 32 == $self->bits();
+ }) if 932 == $self->bits(); #VVM
$self->install_modules( qw{
Convert::ASCII::Armour
Digest::MD2
@@ -722,14 +722,14 @@
$self->install_modules( qw{
Crypt::Primes
Crypt::RSA
- }) if 32 == $self->bits();
+ }) if 932 == $self->bits(); #VVM
$self->install_modules( qw{
Digest::BubbleBabble
});
# Does not build 64-bit yet.
$self->install_modules( qw{
Crypt::IDEA
- }) if 32 == $self->bits();
+ }) if 932 == $self->bits(); #VVM
$self->install_modules( qw{
String::CRC32
Net::SSH2
@@ -751,7 +751,7 @@
# Crypt::RSA, and Math::Pari.
$self->install_modules( qw{
Crypt::OpenPGP
- }) if 32 == $self->bits();
+ }) if 932 == $self->bits(); #VVM
$self->install_modules( qw{
Algorithm::Diff
Text::Diff
@@ -762,7 +762,7 @@
name => 'FLORA/Module-Signature-0.66.tar.gz',
mod_name => 'Module::Signature',
makefilepl_param => [ 'INSTALLDIRS=vendor', ],
- ) if 32 == $self->bits();
+ ) if 932 == $self->bits(); #VVM
# version 0.67 of Module::Signature can have serious problems on Windows
# See https://rt.cpan.org/Ticket/Display.html?id=46339
# IPC::Run is a prereq only for 0.67
===

( Install all skiped modules later ( if need) by cpan/CPANPLUS )

GoTo:
C:\sb\perl\site\lib\Perl\Dist\WiX\Mixin\
rename
Libraries.pm
to
Libraries.pm.Orig

apply patch to Libraries.pm:
===
--- Libraries.pm.Orig Sun Jun 05 15:17:58 2011
+++ Libraries.pm Fri Jun 10 16:50:14 2011
@@ -49,19 +49,28 @@
# 'mingw-runtime' => 'mingw-runtime-3.13.tar.gz',
# 'w32api' => 'w32api-3.10.tar.gz',
},
+# VVM 2011-06-10 16-18
'32bit-gcc4' => {
'dmake' => '32bit-gcc4/dmake-SVN20091127-bin_20100524.zip',
'mingw-make' => '32bit-gcc4/gmake-3.81-20090914-bin_20100524.zip',
'pexports' => '32bit-gcc4/pexports-0.44-bin_20100120.zip',
- 'gcc-toolchain' => '32bit-gcc4/mingw64-w32-20100123-kmx-v2.zip',
- 'gcc-license' => '32bit-gcc4/mingw64-w32-20100123-kmx-v2-lic.zip',
+# [ VVM 2011-06-10 16-18
+ 'gcc-toolchain' => 'kmx/32_gcctoolchain/mingw64-w32-gcc4.4.6_20110503-v2.zip',
+ 'gcc-license' => 'kmx/32_gcctoolchain/mingw64-w32-gcc4.4.6_20110503-v2-lic.zip',
+# ]
},
+# VVM 2011-06-09 09-56
'64bit-gcc4' => {
+# 'dmake' => 'kmx/64_tools/64bit_dmake-SVN20091127-bin_20100308.zip', # older? <= ( 20100308 '64bit-gcc4/dmake-SVN20091127-bin_20100524.zip',
+# 'mingw-make' => 'kmx/64_tools/64bit_gmake-3.82-bin_20110503.zip', # Has error? VVM 2011-06-09 15-43
'mingw-make' => '64bit-gcc4/gmake-3.81.90_20100127_20100524.zip',
+# 'pexports' => 'kmx/64_tools/64bit_pexports-0.44-bin_20100110.zip', # Not need? VVM 2011-06-09 09-56
'pexports' => '64bit-gcc4/pexports-0.44-bin_20100110.zip',
- 'gcc-toolchain' => '64bit-gcc4/mingw64-w64-20100123-kmx-v2.zip',
- 'gcc-license' => '64bit-gcc4/mingw64-w64-20100123-kmx-v2-lic.zip',
+# [ VVM 2011-06-09 09-56
+ 'gcc-toolchain' => 'kmx/64_gcctoolchain/mingw64-w64-gcc4.4.6_20110503-v2.zip',
+ 'gcc-license' => 'kmx/64_gcctoolchain/mingw64-w64-gcc4.4.6_20110503-v2-lic.zip',
+#]
},
);
===

GoTo:
C:\sb\perl\site\lib\Perl\Dist\Strawberry\

rename
Libraries.pm
to
Libraries.pm.Orig

apply patch to Libraries.pm:
===
--- Libraries.pm.Orig Tue May 31 04:09:10 2011
+++ Libraries.pm Mon Jun 13 16:10:27 2011
@@ -93,7 +93,7 @@
'mysql5121' => undef,
'mysql5122' => undef,
'mysql5123' => undef,
- 'mysqllib' => '32bit-gcc4/mysql-5.1.44-bin_20100304.zip',
+ 'mysqllib' => 'kmx/32_libs/5.14/32bit_mysql-5.1.44-bin_20100304.zip', # VVM 2011-06-09 09-56
'pari589' => undef,
'pari5100' => undef,
'pari5101' => undef,
@@ -101,34 +101,38 @@
'pari5120' => '32bit-gcc4/Math-Pari-2.01080604-MSWin32-x86-multi-thread-5.12.0.par',
'pari5121' => '32bit-gcc4/Math-Pari-2.01080604-MSWin32-x86-multi-thread-5.12.0.par',
'pari5122' => '32bit-gcc4/Math-Pari-2.01080604-MSWin32-x86-multi-thread-5.12.0.par',
- 'pari5123' => '32bit-gcc4/Math-Pari-2.01080604-MSWin32-x86-multi-thread-5.12.3.par',
+ 'pari5123' => '32bit-gcc4/Math-Pari-2.01080605-MSWin32-x86-multi-thread-5.14.0.par', # VVM 2011-06-09 09-56
+# 'pari5123' => '32bit-gcc4/Math-Pari-2.01080604-MSWin32-x86-multi-thread-5.12.3.par', # VVM 2011-06-09 09-56 : not shue what is Ok with GCC v4.6.6
'pari5140' => '32bit-gcc4/Math-Pari-2.01080605-MSWin32-x86-multi-thread-5.14.0.par',
- 'zlib' => '32bit-gcc4/zlib-1.2.3-bin_20091126.zip',
- 'libiconv' => '32bit-gcc4/libiconv-1.13.1-bin_20091126.zip',
- 'libxml2' => '32bit-gcc4/libxml2-2.7.3-bin_20091126.zip',
- 'libexpat' => '32bit-gcc4/expat-2.0.1-bin_20091126.zip',
- 'gmp' => '32bit-gcc4/gmp-5.0.1-419f6a4cc606-bin_20110218.zip',
- 'libxslt' => '32bit-gcc4/libxslt-1.1.26-bin_20091126.zip',
- 'libjpeg' => '32bit-gcc4/jpeg-6b-gnuwin32-bin_20091126.zip',
- 'libgif' => '32bit-gcc4/giflib-4.1.6-bin_20091126.zip',
- 'libpng' => '32bit-gcc4/libpng-1.2.40-bin_20091126.zip',
- 'libtiff' => '32bit-gcc4/tiff-3.9.1-bin_20091126.zip',
- 'libgd' => '32bit-gcc4/gd-2.0.35-bin_20091126.zip',
- 'libfreetype' => '32bit-gcc4/freetype-2.3.11-bin_20091126.zip',
- 'libopenssl' => '32bit-gcc4/openssl-0.9.8l-bin_20091126.zip',
- 'libpostgresql' => '32bit-gcc4/postgresql-8.4.1-bin_20091126.zip',
- 'libdb' => '32bit-gcc4/db-4.8.24-bin_20091126.zip',
- 'libgdbm' => '32bit-gcc4/gdbm-1.8.3-bin_20100112.zip',
- 'libxpm' => '32bit-gcc4/libXpm-3.5.8-bin_20091126.zip',
- 'libxz' => '32bit-gcc4/liblzma-xz-4.999.9beta-bin_20100308.zip',
- 'mpc' => '32bit-gcc4/mpc-0.8.1-bin_20100306.zip',
- 'mpfr' => '32bit-gcc4/mpfr-2.4.2-bin_20100306.zip',
- 'libmysql' => '32bit-gcc4/mysql-5.1.44-bin_20100304.zip',
- 'freeglut' => '32bit-gcc4/freeglut-2.6.0-bin_20100213.zip',
- 'libssh2' => '32bit-gcc4/libssh2-1.2.5-bin_20100520.zip',
+# [ VVM 2011-06-09 09-56
+ 'zlib' => 'kmx/32_libs/5.14/32bit_zlib-1.2.5-bin_20110506.zip',
+ 'libiconv' => 'kmx/32_libs/5.14/32bit_libiconv-1.13.1-sezero20110428-bin_20110506.zip',
+ 'libxml2' => 'kmx/32_libs/5.14/32bit_libxml2-2.7.8-bin_20110506.zip',
+ 'libexpat' => 'kmx/32_libs/5.14/32bit_expat-2.0.1-sezero20110428-bin_20110506.zip',
+ 'gmp' => 'kmx/32_libs/5.14/32bit_gmp-5.0.1-bin_20110506.zip',
+ 'libxslt' => 'kmx/32_libs/5.14/32bit_libxslt-1.1.26-bin_20110506.zip',
+ 'libjpeg' => 'kmx/32_libs/5.14/32bit_jpeg-8c-bin_20110506.zip',
+ 'libgif' => 'kmx/32_libs/5.14/32bit_giflib-4.1.6-bin_20110506.zip',
+ 'libpng' => 'kmx/32_libs/5.14/32bit_libpng-1.5.2-bin_20110506.zip',
+ 'libtiff' => 'kmx/32_libs/5.14/32bit_tiff-3.9.5-bin_20110506.zip',
+ 'libgd' => 'kmx/32_libs/5.14/32bit_gd-2.0.35(OLD-jpg-png)-bin_20110506.zip',
+ 'libfreetype' => 'kmx/32_libs/5.14/32bit_freetype-2.4.4-bin_20110506.zip',
+ 'libopenssl' => 'kmx/32_libs/5.14/32bit_openssl-1.0.0d-bin_20110506.zip',
+ 'libpostgresql' => 'kmx/32_libs/5.14/32bit_postgresql-9.0.4-bin_20110506.zip',
+ 'libdb' => 'kmx/32_libs/5.14/32bit_db-5.1.25-bin_20110506.zip',
+ 'libgdbm' => 'kmx/32_libs/5.14/32bit_gdbm-1.8.3-bin_20110506.zip',
+ 'libxpm' => 'kmx/32_libs/5.14/32bit_libXpm-3.5.9-bin_20110506.zip',
+ 'libxz' => 'kmx/32_libs/5.14/32bit_xz-5.0.2-bin_20110506.zip',
+ 'mpc' => 'kmx/32_libs/5.14/32bit_mpc-0.9-bin_20110506.zip',
+ 'mpfr' => 'kmx/32_libs/5.14/32bit_mpfr-3.0.1-bin_20110506.zip',
+ 'libmysql' => 'kmx/32_libs/5.14/32bit_mysql-5.1.44-bin_20100304.zip',
+ 'freeglut' => 'kmx/32_libs/5.14/32bit_freeglut-2.6.0-bin_20110506.zip',
+ 'libssh2' => 'kmx/32_libs/5.14/32bit_libssh2-1.2.8-bin_20110506.zip',
+# ]
},
'64bit-gcc4' => {
'patch' => '64bit-gcc4/patch-2.5.9-7-bin_20100110_20100303.zip',
+# 'patch' => 'kmx/64_tools/64bit_patch-2.5.9-7-bin_20100110_UAC.zip', # VVM 2011-06-09 15-43 ToDo? # [ VVM 2011-06-09 09-56 ( kmx)
'mysql589' => undef,
'mysql5100' => undef,
'mysql5101' => undef,
@@ -146,29 +150,31 @@
'pari5121' => undef,
'pari5122' => undef,
'pari5123' => undef,
- 'zlib' => '64bit-gcc4/zlib-1.2.3-bin_20100110.zip',
- 'libiconv' => '64bit-gcc4/libiconv-1.13.1-bin_20100110.zip',
- 'libxml2' => '64bit-gcc4/libxml2-2.7.3-bin_20100110.zip',
- 'libexpat' => '64bit-gcc4/expat-2.0.1-bin_20100110.zip',
- 'gmp' => '64bit-gcc4/gmp-5.0.1-419f6a4cc606-bin_20100306.zip',
- 'libxslt' => '64bit-gcc4/libxslt-1.1.26-bin_20100111.zip',
- 'libjpeg' => '64bit-gcc4/jpeg-6b-gnuwin32-bin_20100110.zip',
- 'libgif' => '64bit-gcc4/giflib-4.1.6-bin_20100110.zip',
- 'libpng' => '64bit-gcc4/libpng-1.2.40-bin_20100110.zip',
- 'libtiff' => '64bit-gcc4/tiff-3.9.1-bin_20100110.zip',
- 'libgd' => '64bit-gcc4/gd-2.0.35-bin_20100110.zip',
- 'libfreetype' => '64bit-gcc4/freetype-2.3.11-bin_20100110.zip',
- 'libopenssl' => '64bit-gcc4/openssl-1.0.0-beta4-bin_20100110.zip',
- 'libpostgresql' => '64bit-gcc4/postgresql-8.4.1-bin_20100110.zip',
- 'libdb' => '64bit-gcc4/db-4.8.24-bin_20100110.zip',
- 'libgdbm' => '64bit-gcc4/gdbm-1.8.3-bin_20100112.zip',
- 'libxpm' => '64bit-gcc4/libXpm-3.5.8-bin_20100110.zip',
- 'libxz' => '64bit-gcc4/liblzma-xz-4.999.9beta-bin_20100308.zip',
- 'mpc' => '64bit-gcc4/mpc-0.8.1-bin_20100306.zip',
- 'mpfr' => '64bit-gcc4/mpfr-2.4.2-bin_20100306.zip',
- 'libmysql' => '64bit-gcc4/mysql-5.1.44-bin_20100304.zip',
- 'freeglut' => '64bit-gcc4/freeglut-2.6.0-bin_20100213.zip',
- 'libssh2' => '64bit-gcc4/libssh2-1.2.5-bin_20100520.zip',
+# [ VVM 2011-06-09 09-56
+ 'zlib' => 'kmx/64_libs/5.14/64bit_zlib-1.2.5-bin_20110506.zip',
+ 'libiconv' => 'kmx/64_libs/5.14/64bit_libiconv-1.13.1-sezero20110428-bin_20110506.zip',
+ 'libxml2' => 'kmx/64_libs/5.14/64bit_libxml2-2.7.8-bin_20110506.zip',
+ 'libexpat' => 'kmx/64_libs/5.14/64bit_expat-2.0.1-sezero20110428-bin_20110506.zip',
+ 'gmp' => 'kmx/64_libs/5.14/64bit_gmp-5.0.1-bin_20110506.zip',
+ 'libxslt' => 'kmx/64_libs/5.14/64bit_libxslt-1.1.26-bin_20110506.zip',
+ 'libjpeg' => 'kmx/64_libs/5.14/64bit_jpeg-8c-bin_20110506.zip',
+ 'libgif' => 'kmx/64_libs/5.14/64bit_giflib-4.1.6-bin_20110506.zip',
+ 'libpng' => 'kmx/64_libs/5.14/64bit_libpng-1.5.2-bin_20110506.zip',
+ 'libtiff' => 'kmx/64_libs/5.14/64bit_tiff-3.9.5-bin_20110506.zip',
+ 'libgd' => 'kmx/64_libs/5.14/64bit_gd-2.0.35(OLD-jpg-png)-bin_20110506.zip',
+ 'libfreetype' => 'kmx/64_libs/5.14/64bit_freetype-2.4.4-bin_20110506.zip',
+ 'libopenssl' => 'kmx/64_libs/5.14/64bit_openssl-1.0.0d-bin_20110506.zip',
+ 'libpostgresql' => 'kmx/64_libs/5.14/64bit_postgresql-9.0.4-bin_20110506.zip',
+ 'libdb' => 'kmx/64_libs/5.14/64bit_db-5.1.25-bin_20110506.zip',
+ 'libgdbm' => 'kmx/64_libs/5.14/64bit_gdbm-1.8.3-bin_20110506.zip',
+ 'libxpm' => 'kmx/64_libs/5.14/64bit_libXpm-3.5.9-bin_20110506.zip',
+ 'libxz' => 'kmx/64_libs/5.14/64bit_xz-5.0.2-bin_20110506.zip',
+ 'mpc' => 'kmx/64_libs/5.14/64bit_mpc-0.9-bin_20110506.zip',
+ 'mpfr' => 'kmx/64_libs/5.14/64bit_mpfr-3.0.1-bin_20110506.zip',
+ 'libmysql' => 'kmx/64_libs/5.14/64bit_mysql-5.1.44-bin_20100304.zip',
+ 'freeglut' => 'kmx/64_libs/5.14/64bit_freeglut-2.6.0-bin_20110506.zip',
+ 'libssh2' => 'kmx/64_libs/5.14/64bit_libssh2-1.2.8-bin_20110506.zip',
+# ]
},
};

===

GoTo:
C:\sb\perl\site\lib\Perl\Dist\

rename
WiX.pm
to
WiX.pm.Orig

apply patch to WiX.pm:

===
--- WiX.pm.Orig Sun Jun 05 15:17:58 2011
+++ WiX.pm Fri Jun 10 16:18:39 2011
@@ -728,7 +728,7 @@
$_ = 32;
}

- $_ == 32 or $_ == 64;
+ $_ == 32 or $_ == 32; # VVM 2011-06-10 16-18
},
message {
'Not 32 or 64-bit';
===

Run

%SystemRoot%\system32\cmd.exe /c C:\sb\perl\site\bin\perldist_strawberry.bat --output C:\strawberry --skip 1 --skip 2 --skip 3

# { Or
#%SystemRoot%\system32\cmd.exe /c C:\sb\perl\bin\perl.exe -x -S perldist_strawberry.pl --output C:\strawberry --skip 1 --skip 2 --skip 3
# }

Go to directory:
C:\tmp\output\

rename strawberry-perl-5.12.3.0.msi strawberry-perl-5.12.3.0-32bit-build-2011-06-09.msi
rename strawberry-perl-5.12.3.0.zip strawberry-perl-5.12.3.0-32bit-build-2011-06-09.zip

Copy this files from C:\tmp\

2011-06-10 14-44:

See later about
nan , InF

—–


HowTo: Build Strawberry Perl v5.12.3 x64 with GCC toolchain mingw64-w64-gcc4.4.6_20110503-v2.zip and kmx/64_libs 20110506.zip

Or
HowTo: Upgrade Strawberry Perl v5.12.3.0 x64 ( strawberry-perl-5.12.3.0-64bit.zip) library to kmx/64_libs/5.14/*.zip and GCC toolchain to mingw64-w64-gcc4.4.6_20110503-v2.zip

As result:
-- Strawberry Perl v5.12.3 x64 with GCC toolchain mingw64-w64-gcc4.4.6_20110503-v2.zip and kmx/64_libs 20110506.zip
( strawberry-perl-5.12.3.0-64bit-build-2011-06-09.zip / .msi )

Screenshot:
==
C:\strawberry>gcc -v
Using built-in specs.
Target: x86_64-w64-mingw32
Configured with: ../gcc44-svn/configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --disable-multilib
--enable-checking=release --prefix=/mingw64 --enable-languages=c,c++,fortran --enable-libgomp --with-gmp=/mingw64
--with-mpfr=/mingw64 --disable-nls --disable-win32-registry
Thread model: win32
gcc version 4.4.6 20110416 (release) [svn/rev.172578 - mingw-w64/oz] (GCC)

C:\strawberry>perl -v

This is perl 5, version 12, subversion 3 (v5.12.3) built for MSWin32-x64-multi-thread
. . .
==

Download:

http://strawberryperl.com/download/5.12.3.0/strawberry-perl-5.12.3.0-64bit.zip

unpack it to
c:\sb\

Save to c:\sb\portableshell.bat :
==
@echo off
set drive=%~dp0
set drivep=%drive%
If $#\#$==$#%drive:~-1%#$ set drivep=%drive:~0,-1%
set PATH=%drivep%\perl\site\bin;%drivep%\perl\bin;%drivep%\c\bin;%PATH%
set TERM=dumb
echo ----------------------------------------------
echo Welcome to Strawberry Perl Portable Edition!
echo * URL - http://www.strawberryperl.com/
echo * see README.portable.TXT for more info
echo ----------------------------------------------
perl -e "printf("""Perl executable: %%s\nPerl version : %%vd\n""", $^X, $^V)" 2>nul
if ERRORLEVEL==1 echo.&echo FATAL ERROR: 'perl' does not work; check if your strawberry pack is complete!
echo.
cmd
==

#{
# Old:
#
Download:

http://strawberryperl.com/download/5.12.3.0/strawberry-perl-5.12.3.0-portable.zip

unpack only portableshell.bat from it to
c:\sb\
#
#
#}

Run:
portableshell.bat

In portableshell.bat shell:

set PERL_MM_USE_DEFAULT=1

cpanp s save system
===
C:\sb>cpanp s save system
Configuration successfully saved to CPANPLUS::Config::System
(C:\sb\perl\lib\CPANPLUS\Config\System.pm)
===

cpanp s edit system

Replace
strawberryperl to sb
==
$conf->set_conf( base => 'C:\\sb\\cpanplus' );
==

If found:
==
$conf->set_conf( signature => 1 );
==
replace to
==
$conf->set_conf( signature => 0 );
==

Save file.

cpanp i IPC::Run

cpanp i Perl::Dist::Strawberry

cpanp i Perl::Dist::WiX::BuildPerl::5123
cpanp i Perl::Dist::Strawberry::BuildPerl::5123

GoTo:
C:\sb\perl\site\lib\Perl\Dist\WiX\Mixin\
rename
Libraries.pm
to
Libraries.pm.Orig

apply patch to Libraries.pm:
===
--- Libraries.pm.Orig Sun Jun 05 15:17:58 2011
+++ Libraries.pm Thu Jun 09 15:43:42 2011
@@ -56,12 +56,18 @@
'gcc-toolchain' => '32bit-gcc4/mingw64-w32-20100123-kmx-v2.zip',
'gcc-license' => '32bit-gcc4/mingw64-w32-20100123-kmx-v2-lic.zip',
},
+# VVM 2011-06-09 09-56
'64bit-gcc4' => {
+# 'dmake' => 'kmx/64_tools/64bit_dmake-SVN20091127-bin_20100308.zip', # older? <= ( 20100308 '64bit-gcc4/dmake-SVN20091127-bin_20100524.zip',
+# 'mingw-make' => 'kmx/64_tools/64bit_gmake-3.82-bin_20110503.zip', # Has error? VVM 2011-06-09 15-43
'mingw-make' => '64bit-gcc4/gmake-3.81.90_20100127_20100524.zip',
+# 'pexports' => 'kmx/64_tools/64bit_pexports-0.44-bin_20100110.zip', # Not need? VVM 2011-06-09 09-56
'pexports' => '64bit-gcc4/pexports-0.44-bin_20100110.zip',
- 'gcc-toolchain' => '64bit-gcc4/mingw64-w64-20100123-kmx-v2.zip',
- 'gcc-license' => '64bit-gcc4/mingw64-w64-20100123-kmx-v2-lic.zip',
+# [ VVM 2011-06-09 09-56
+ 'gcc-toolchain' => 'kmx/64_gcctoolchain/mingw64-w64-gcc4.4.6_20110503-v2.zip',
+ 'gcc-license' => 'kmx/64_gcctoolchain/mingw64-w64-gcc4.4.6_20110503-v2-lic.zip',
+#]
},
);
===

GoTo:
C:\sb\perl\site\lib\Perl\Dist\Strawberry\

rename
Libraries.pm
to
Libraries.pm.Orig

apply patch to Libraries.pm:
===
--- Libraries.pm.Orig Tue May 31 04:09:10 2011
+++ Libraries.pm Thu Jun 09 15:43:42 2011
@@ -129,6 +129,7 @@
},
'64bit-gcc4' => {
'patch' => '64bit-gcc4/patch-2.5.9-7-bin_20100110_20100303.zip',
+# 'patch' => 'kmx/64_tools/64bit_patch-2.5.9-7-bin_20100110_UAC.zip', # VVM 2011-06-09 15-43 ToDo? # [ VVM 2011-06-09 09-56 ( kmx)
'mysql589' => undef,
'mysql5100' => undef,
'mysql5101' => undef,
@@ -146,29 +147,31 @@
'pari5121' => undef,
'pari5122' => undef,
'pari5123' => undef,
- 'zlib' => '64bit-gcc4/zlib-1.2.3-bin_20100110.zip',
- 'libiconv' => '64bit-gcc4/libiconv-1.13.1-bin_20100110.zip',
- 'libxml2' => '64bit-gcc4/libxml2-2.7.3-bin_20100110.zip',
- 'libexpat' => '64bit-gcc4/expat-2.0.1-bin_20100110.zip',
- 'gmp' => '64bit-gcc4/gmp-5.0.1-419f6a4cc606-bin_20100306.zip',
- 'libxslt' => '64bit-gcc4/libxslt-1.1.26-bin_20100111.zip',
- 'libjpeg' => '64bit-gcc4/jpeg-6b-gnuwin32-bin_20100110.zip',
- 'libgif' => '64bit-gcc4/giflib-4.1.6-bin_20100110.zip',
- 'libpng' => '64bit-gcc4/libpng-1.2.40-bin_20100110.zip',
- 'libtiff' => '64bit-gcc4/tiff-3.9.1-bin_20100110.zip',
- 'libgd' => '64bit-gcc4/gd-2.0.35-bin_20100110.zip',
- 'libfreetype' => '64bit-gcc4/freetype-2.3.11-bin_20100110.zip',
- 'libopenssl' => '64bit-gcc4/openssl-1.0.0-beta4-bin_20100110.zip',
- 'libpostgresql' => '64bit-gcc4/postgresql-8.4.1-bin_20100110.zip',
- 'libdb' => '64bit-gcc4/db-4.8.24-bin_20100110.zip',
- 'libgdbm' => '64bit-gcc4/gdbm-1.8.3-bin_20100112.zip',
- 'libxpm' => '64bit-gcc4/libXpm-3.5.8-bin_20100110.zip',
- 'libxz' => '64bit-gcc4/liblzma-xz-4.999.9beta-bin_20100308.zip',
- 'mpc' => '64bit-gcc4/mpc-0.8.1-bin_20100306.zip',
- 'mpfr' => '64bit-gcc4/mpfr-2.4.2-bin_20100306.zip',
- 'libmysql' => '64bit-gcc4/mysql-5.1.44-bin_20100304.zip',
- 'freeglut' => '64bit-gcc4/freeglut-2.6.0-bin_20100213.zip',
- 'libssh2' => '64bit-gcc4/libssh2-1.2.5-bin_20100520.zip',
+# [ VVM 2011-06-09 09-56
+ 'zlib' => 'kmx/64_libs/5.14/64bit_zlib-1.2.5-bin_20110506.zip',
+ 'libiconv' => 'kmx/64_libs/5.14/64bit_libiconv-1.13.1-sezero20110428-bin_20110506.zip',
+ 'libxml2' => 'kmx/64_libs/5.14/64bit_libxml2-2.7.8-bin_20110506.zip',
+ 'libexpat' => 'kmx/64_libs/5.14/64bit_expat-2.0.1-sezero20110428-bin_20110506.zip',
+ 'gmp' => 'kmx/64_libs/5.14/64bit_gmp-5.0.1-bin_20110506.zip',
+ 'libxslt' => 'kmx/64_libs/5.14/64bit_libxslt-1.1.26-bin_20110506.zip',
+ 'libjpeg' => 'kmx/64_libs/5.14/64bit_jpeg-8c-bin_20110506.zip',
+ 'libgif' => 'kmx/64_libs/5.14/64bit_giflib-4.1.6-bin_20110506.zip',
+ 'libpng' => 'kmx/64_libs/5.14/64bit_libpng-1.5.2-bin_20110506.zip',
+ 'libtiff' => 'kmx/64_libs/5.14/64bit_tiff-3.9.5-bin_20110506.zip',
+ 'libgd' => 'kmx/64_libs/5.14/64bit_gd-2.0.35(OLD-jpg-png)-bin_20110506.zip',
+ 'libfreetype' => 'kmx/64_libs/5.14/64bit_freetype-2.4.4-bin_20110506.zip',
+ 'libopenssl' => 'kmx/64_libs/5.14/64bit_openssl-1.0.0d-bin_20110506.zip',
+ 'libpostgresql' => 'kmx/64_libs/5.14/64bit_postgresql-9.0.4-bin_20110506.zip',
+ 'libdb' => 'kmx/64_libs/5.14/64bit_db-5.1.25-bin_20110506.zip',
+ 'libgdbm' => 'kmx/64_libs/5.14/64bit_gdbm-1.8.3-bin_20110506.zip',
+ 'libxpm' => 'kmx/64_libs/5.14/64bit_libXpm-3.5.9-bin_20110506.zip',
+ 'libxz' => 'kmx/64_libs/5.14/64bit_xz-5.0.2-bin_20110506.zip',
+ 'mpc' => 'kmx/64_libs/5.14/64bit_mpc-0.9-bin_20110506.zip',
+ 'mpfr' => 'kmx/64_libs/5.14/64bit_mpfr-3.0.1-bin_20110506.zip',
+ 'libmysql' => 'kmx/64_libs/5.14/64bit_mysql-5.1.44-bin_20100304.zip',
+ 'freeglut' => 'kmx/64_libs/5.14/64bit_freeglut-2.6.0-bin_20110506.zip',
+ 'libssh2' => 'kmx/64_libs/5.14/64bit_libssh2-1.2.8-bin_20110506.zip',
+# ]
},
};
===

GoTo:
C:\sb\perl\site\lib\Perl\Dist\

rename
WiX.pm
to
WiX.pm.Orig

apply patch to WiX.pm:

===
>diff -u WiX.pm.Orig WiX.pm
--- WiX.pm.Orig Sun Jun 05 15:17:58 2011
+++ WiX.pm Tue Jun 07 17:23:36 2011
@@ -725,16 +725,16 @@
isa => subtype(
'Int' => where {
if ( not defined $_ ) {
- $_ = 32;
+ $_ = 64;
}

- $_ == 32 or $_ == 64;
+ $_ == 64 or $_ == 64;
},
message {
'Not 32 or 64-bit';
},
),
- default => 32,
+ default => 64,
);
===

Run

%SystemRoot%\system32\cmd.exe /c C:\sb\perl\site\bin\perldist_strawberry.bat --output C:\strawberry --skip 1 --skip 2 --skip 3

# { Or
#%SystemRoot%\system32\cmd.exe /c C:\sb\perl\bin\perl.exe -x -S perldist_strawberry.pl --output C:\strawberry --skip 1 --skip 2 --skip 3
# }

Go to directory:
C:\tmp\output\

rename strawberry-perl-5.12.3.0-64bit.msi strawberry-perl-5.12.3.0-64bit-build-2011-06-09.msi
rename strawberry-perl-5.12.3.0-64bit.zip strawberry-perl-5.12.3.0-64bit-build-2011-06-09.zip

Copy this files from C:\tmp\

—-

As result:
Fixed nan , InF issue:

https://rt.cpan.org/Public/Bug/Display.html?id=62161

=>
=== ---

On Thu Feb 17 06:32:37 2011, KMX wrote:

> I have prepared micro-patched gcc toolchain packs
>(just changing single file stdlib.h)

> 64bit:
> /kmx/64_gcctoolchain/mingw64-w64-20100123-kmx-v3.zip

With:
Strawberry Perl v5.12.3 x64 with GCC toolchain mingw64-w64-gcc4.4.6_20110503-v2.zip and kmx/64_libs 20110506.zip
( strawberry-perl-5.12.3.0-64bit-build-2011-06-09.zip / .msi )

( Instruction for build:

HowTo: Upgrade Strawberry Perl v5.12.3.0 x64 ( strawberry-perl-5.12.3.0-64bit.zip) library to kmx/64_libs/5.14/*.zip and GCC toolchain to mingw64-w64-gcc4.4.6_20110503-v2.zip

http://vvm.blog.tut.by/2011/06/09/howto-upgrade-strawberry-perl-v5-12-3-0-x64-strawberry-perl-5-12-3-0-64bit-zip-library-to-kmx-64_libs-5-14-zip-and-gcc-toolchain-to-mingw64-w64-gcc4-4-6_20110503-v2-zip/

)

Screenshot:
==
C:\strawberry-perl-5.12.3.0-64bit-build-2011-06-09>perl -wle "print 'nan' + 0"
-1.#IND

C:\strawberry-perl-5.12.3.0-64bit-build-2011-06-09>perl -wle "print 'InF' + 0"
1.#INF

C:\strawberry-perl-5.12.3.0-64bit-build-2011-06-09>perl -wle "print 'NanN' + 0"
Argument "NanN" isn't numeric in addition (+) at -e line 1.
-1.#IND

C:\strawberry-perl-5.12.3.0-64bit-build-2011-06-09>perl -wle "print 'iNff' + 0"
Argument "iNff" isn't numeric in addition (+) at -e line 1.
1.#INF
==

=== ---


HowTo: Upgrade Strawberry Perl v5.12.3.0 x64 ( strawberry-perl-5.12.3.0-64bit.zip) library to kmx/64_libs/5.12/*.zip

Upgrade Strawberry Perl v5.12.3.0 x64 ( strawberry-perl-5.12.3.0-64bit.zip) library to kmx/64_libs/5.12/*.zip:

Download:

http://strawberryperl.com/download/5.12.3.0/strawberry-perl-5.12.3.0-64bit.zip

unpack it to
c:\sb\

Save to c:\sb\portableshell.bat :
==
@echo off
set drive=%~dp0
set drivep=%drive%
If $#\#$==$#%drive:~-1%#$ set drivep=%drive:~0,-1%
set PATH=%drivep%\perl\site\bin;%drivep%\perl\bin;%drivep%\c\bin;%PATH%
set TERM=dumb
echo ----------------------------------------------
echo Welcome to Strawberry Perl Portable Edition!
echo * URL - http://www.strawberryperl.com/
echo * see README.portable.TXT for more info
echo ----------------------------------------------
perl -e "printf("""Perl executable: %%s\nPerl version : %%vd\n""", $^X, $^V)" 2>nul
if ERRORLEVEL==1 echo.&echo FATAL ERROR: 'perl' does not work; check if your strawberry pack is complete!
echo.
cmd
==

#{
# Old:
#
Download:

http://strawberryperl.com/download/5.12.3.0/strawberry-perl-5.12.3.0-portable.zip

unpack only portableshell.bat from it to
c:\sb\
#
#
#}

Run:
portableshell.bat

In portableshell.bat shell:

set PERL_MM_USE_DEFAULT=1

cpanp s save system
===
C:\sb>cpanp s save system
Configuration successfully saved to CPANPLUS::Config::System
(C:\sb\perl\lib\CPANPLUS\Config\System.pm)
===

cpanp s edit system

Replace
strawberryperl to sb
==
$conf->set_conf( base => 'C:\\sb\\cpanplus' );
==

If found:
==
$conf->set_conf( signature => 1 );
==
replace to
==
$conf->set_conf( signature => 0 );
==

Save file.

cpanp i IPC::Run

cpanp i Perl::Dist::Strawberry

cpanp i Perl::Dist::WiX::BuildPerl::5123
cpanp i Perl::Dist::Strawberry::BuildPerl::5123

GoTo:
C:\sb\perl\site\lib\Perl\Dist\Strawberry\

rename
Libraries.pm
to
Libraries.pm.Orig

apply patch to Libraries.pm:
===
--- Libraries.pm.Orig Tue Jun 07 15:50:35 2011
+++ Libraries.pm Tue Jun 07 16:35:51 2011
@@ -127,6 +127,9 @@
'freeglut' => '32bit-gcc4/freeglut-2.6.0-bin_20100213.zip',
'libssh2' => '32bit-gcc4/libssh2-1.2.5-bin_20100520.zip',
},
+#{ VVM 2011-06-07 16-35
+#
+#
'64bit-gcc4' => {
'patch' => '64bit-gcc4/patch-2.5.9-7-bin_20100110_20100303.zip',
'mysql589' => undef,
@@ -146,29 +149,34 @@
'pari5121' => undef,
'pari5122' => undef,
'pari5123' => undef,
- 'zlib' => '64bit-gcc4/zlib-1.2.3-bin_20100110.zip',
- 'libiconv' => '64bit-gcc4/libiconv-1.13.1-bin_20100110.zip',
- 'libxml2' => '64bit-gcc4/libxml2-2.7.3-bin_20100110.zip',
- 'libexpat' => '64bit-gcc4/expat-2.0.1-bin_20100110.zip',
- 'gmp' => '64bit-gcc4/gmp-5.0.1-419f6a4cc606-bin_20100306.zip',
- 'libxslt' => '64bit-gcc4/libxslt-1.1.26-bin_20100111.zip',
- 'libjpeg' => '64bit-gcc4/jpeg-6b-gnuwin32-bin_20100110.zip',
- 'libgif' => '64bit-gcc4/giflib-4.1.6-bin_20100110.zip',
- 'libpng' => '64bit-gcc4/libpng-1.2.40-bin_20100110.zip',
- 'libtiff' => '64bit-gcc4/tiff-3.9.1-bin_20100110.zip',
- 'libgd' => '64bit-gcc4/gd-2.0.35-bin_20100110.zip',
- 'libfreetype' => '64bit-gcc4/freetype-2.3.11-bin_20100110.zip',
- 'libopenssl' => '64bit-gcc4/openssl-1.0.0-beta4-bin_20100110.zip',
- 'libpostgresql' => '64bit-gcc4/postgresql-8.4.1-bin_20100110.zip',
- 'libdb' => '64bit-gcc4/db-4.8.24-bin_20100110.zip',
- 'libgdbm' => '64bit-gcc4/gdbm-1.8.3-bin_20100112.zip',
- 'libxpm' => '64bit-gcc4/libXpm-3.5.8-bin_20100110.zip',
- 'libxz' => '64bit-gcc4/liblzma-xz-4.999.9beta-bin_20100308.zip',
- 'mpc' => '64bit-gcc4/mpc-0.8.1-bin_20100306.zip',
- 'mpfr' => '64bit-gcc4/mpfr-2.4.2-bin_20100306.zip',
- 'libmysql' => '64bit-gcc4/mysql-5.1.44-bin_20100304.zip',
- 'freeglut' => '64bit-gcc4/freeglut-2.6.0-bin_20100213.zip',
- 'libssh2' => '64bit-gcc4/libssh2-1.2.5-bin_20100520.zip',
+ 'zlib' => 'kmx/64_libs/5.12/64bit_zlib-1.2.5-bin_20110507.zip',
+ 'libiconv' => 'kmx/64_libs/5.12/64bit_libiconv-1.13.1-sezero20110428-bin_20110507.zip',
+ 'libxml2' => 'kmx/64_libs/5.12/64bit_libxml2-2.7.8-bin_20110507.zip',
+ 'libexpat' => 'kmx/64_libs/5.12/64bit_expat-2.0.1-sezero20110428-bin_20110507.zip',
+ 'gmp' => 'kmx/64_libs/5.12/64bit_gmp-5.0.1-bin_20110507.zip',
+ 'libxslt' => 'kmx/64_libs/5.12/64bit_libxslt-1.1.26-bin_20110507.zip',
+ 'libjpeg' => 'kmx/64_libs/5.12/64bit_jpeg-8c-bin_20110507.zip',
+ 'libgif' => 'kmx/64_libs/5.12/64bit_giflib-4.1.6-bin_20110507.zip',
+ 'libpng' => 'kmx/64_libs/5.12/64bit_libpng-1.5.2-bin_20110507.zip',
+ 'libtiff' => 'kmx/64_libs/5.12/64bit_tiff-3.9.5-bin_20110507.zip',
+ 'libgd' => 'kmx/64_libs/5.12/64bit_gd-2.0.35(OLD-jpg-png)-bin_20110507.zip',
+ 'libfreetype' => 'kmx/64_libs/5.12/64bit_freetype-2.4.4-bin_20110507.zip',
+ 'libopenssl' => 'kmx/64_libs/5.12/64bit_openssl-1.0.0d-bin_20110507.zip',
+ 'libpostgresql' => 'kmx/64_libs/5.12/64bit_postgresql-9.0.4-bin_20110507.zip',
+ 'libdb' => 'kmx/64_libs/5.12/64bit_db-5.1.25-bin_20110507.zip',
+ 'libgdbm' => 'kmx/64_libs/5.12/64bit_gdbm-1.8.3-bin_20110507.zip',
+ 'libxpm' => 'kmx/64_libs/5.12/64bit_libXpm-3.5.9-bin_20110507.zip',
+ 'libxz' => 'kmx/64_libs/5.12/64bit_xz-5.0.2-bin_20110507.zip',
+ 'mpc' => 'kmx/64_libs/5.12/64bit_mpc-0.9-bin_20110507.zip',
+ 'mpfr' => 'kmx/64_libs/5.12/64bit_mpfr-3.0.1-bin_20110507.zip',
+ 'libmysql' => 'kmx/64_libs/5.12/64bit_mysql-5.1.44-bin_20100304.zip',
+ 'freeglut' => 'kmx/64_libs/5.12/64bit_freeglut-2.6.0-bin_20110507.zip',
+ 'libssh2' => 'kmx/64_libs/5.12/64bit_libssh2-1.2.8-bin_20110507.zip',
+#
+#
+#}
+
},
};
===

GoTo:
C:\sb\perl\site\lib\Perl\Dist\

rename
WiX.pm
to
WiX.pm.Orig

apply patch to WiX.pm:

===
>diff -u WiX.pm.Orig WiX.pm
--- WiX.pm.Orig Sun Jun 05 15:17:58 2011
+++ WiX.pm Tue Jun 07 17:23:36 2011
@@ -725,16 +725,16 @@
isa => subtype(
'Int' => where {
if ( not defined $_ ) {
- $_ = 32;
+ $_ = 64;
}

- $_ == 32 or $_ == 64;
+ $_ == 64 or $_ == 64;
},
message {
'Not 32 or 64-bit';
},
),
- default => 32,
+ default => 64,
);
===

Run

%SystemRoot%\system32\cmd.exe /c C:\sb\perl\site\bin\perldist_strawberry.bat --output C:\strawberry --skip 1 --skip 2 --skip 3

# { Or
#%SystemRoot%\system32\cmd.exe /c C:\sb\perl\bin\perl.exe -x -S perldist_strawberry.pl --output C:\strawberry --skip 1 --skip 2 --skip 3
# }

Go to directory:
C:\tmp\output\

rename strawberry-perl-5.12.3.0-64bit.msi strawberry-perl-5.12.3.0-64bit-build-2011-06-07.msi
rename strawberry-perl-5.12.3.0-64bit.zip strawberry-perl-5.12.3.0-64bit-build-2011-06-07.zip

Copy this files from C:\tmp\

HowTo: Strawberry Perl v5.12.3 x64 upgrade to OpenSSL v1.0.0d from "OpenSSL 1.0.0-beta4"

2011-06-07 17-41:

Better method

See later:
Update strawberry-perl-5.12.3.0-64bit.zip library to kmx/64_libs/5.12/*.zip:

2011-06-02 13-02:
See later:
Which way is the true way, and what not? "-lssleay32 -llibeay32" Way? Or "-lssl -lcrypto" Way?

Full enviroment see:
Mini How-To: practical method to install ASSP v2.X on Windows x64 using Strawberry Perl v5.12.X x64

———————–


Strawberry Perl v5.12.3 x64 contain "OpenSSL 1.0.0-beta4":
==
C:\strawberry\c\bin>openssl.exe version
WARNING: can't open config file: c:/compile/build/_wrk_libs64__.out/ssl/openssl.cnf
OpenSSL 1.0.0-beta4 10 Nov 2009
==

Current version OpenSSL:
==
C:\openssl\bin>openssl.exe version
OpenSSL 1.0.0d 8 Feb 2011
==

Upgrade OpenSSL:

Download
MSYS-20110526.zip
from

http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%20%2832-bit%29/

Unpack to
C:\msys\

Run msys postinstall script:
c:\msys\postinstall\pi.bat

===
"Do you have MinGW installed? [yn ] "
===

Answer that your mingw is "c:/strawberry/c" :
==
c:/strawberry/c
==

Download
ftp://ftp.openssl.org/source/openssl-1.0.0d.tar.gz

copy it to
C:\msys\

Run:
C:\msys\msys.bat

Swith to MSYS shell

Unpack openssl-1.0.0d.tar.gz :
tar xfhz openssl-1.0.0d.tar.gz

cd /openssl-1.0.0d

Run:
./configure mingw64 shared no-asm no-hw --openssldir=/openssl
make
make test
make install

Close MSYS shell

Copy
C:\msys\openssl
to
C:\openssl

Rename
C:\strawberry\c\include\openssl
to
C:\strawberry\c\include\openssl-Orig

Copy
C:\openssl\include\openssl
to
C:\strawberry\c\include\openssl

Create dir:
md C:\strawberry\c\bin\openssl-Orig

Move files
openssl.exe
libeay32__.dll
ssleay32__.dll
to
C:\strawberry\c\bin\openssl-Orig\

Copy
C:\openssl\bin\*.exe
C:\openssl\bin\*.dll
( i.e.
libeay32.dll
openssl.exe
ssleay32.dll
)
to
C:\strawberry\c\bin\

Create dir:
md C:\strawberry\c\lib\lib--openssl-Orig

Move files
libeay32.a
libssl32.a
libssleay32.a
to
C:\strawberry\c\lib\lib--openssl-Orig\

Copy
C:\openssl\lib\*.a
( i.e.
libcrypto.a
libcrypto.dll.a
libssl.a
libssl.dll.a
)
to
C:\strawberry\c\lib\

Copy
C:\OpenSSL\lib\pkgconfig\*.pc
( i.e.
libcrypto.pc
libssl.pc
openssl.pc
)
to
C:\strawberry\c\lib\pkgconfig\

Run:
cpanp i IPC::Run

De-install old version
cpanp u Crypt::SSLeay

Download and extract module by run:

cpanp z Crypt::SSLeay

Not close command line, but run editor as another process

Open C:\strawberry\cpanplus\5.12.3\build\Crypt-SSLeay-0.58\Makefile.PL in editor
replace
==
-lssleay32 -llibeay32
==
to
==
-lssl -lcrypto
==

Save file Makefile.PL

Swith to cpanp process and run:

cpanp i

Exit from cpan shell by run:
Exit

P.S.

Net::SSLeay fix:

Download and extract module by run:

cpanp z Net::SSLeay

Not close command line, but run editor as another process

Open C:\strawberry\cpanplus\5.12.3\build\Net-SSLeay-1.36\inc\Module\Install\PRIVATE\Net\SSLeay.pm in editor
replace
==
ssleay32 libssl32
==
to
==
ssl crypto
==

Save file.

Swith to cpanp process and run:

cpanp i

Exit from cpan shell by run:
Exit

P.P.S.

After upgrade not need fix:
Crypt::OpenSSL::AES
Crypt::OpenSSL::RSA

i.e. this not need:


===

Download and extract Crypt-OpenSSL-AES-0.02.tar.gz by run:

cpanp z Crypt::OpenSSL::AES

Not close command line, but run editor as another process

Open C:\strawberry\cpanplus\5.12.3\build\Crypt-OpenSSL-AES-0.02\Makefile.PL in editor
replace
==
LIBS => ['-lcrypto'], # e.g., '-lm'
==
to
==
LIBS => ($^O eq 'MSWin32') ? ['-leay32'] : ['-lcrypto'],
==

Save file Makefile.PL

Swith to cpanp process and run:
cpanp i .

Exit from cpan shell by run:
Exit

Download and extract Crypt-OpenSSL-Random-0.04_patched.tar.gz by run:
cpanp i http://strawberryperl.com/package/kmx/perl-modules-patched/Crypt-OpenSSL-Random-0.04_patched.tar.gz

# {
# Old Var
#

Download and extract Crypt-OpenSSL-Random-0.04.tar.gz by run:

cpanp z Crypt::OpenSSL::Random

Not close command line, but run editor as another process

Open C:\strawberry\cpanplus\5.12.3\build\Crypt-OpenSSL-Random-0.04\Makefile.PL in editor
replace
==
'LIBS' => ['-lssl -lcrypto'], # e.g., '-lm'
==
to
==
'LIBS' => ($^O eq 'MSWin32') ? ['-lssl32 -leay32'] : ['-lssl -lcrypto'],
==

as described in

http://www.nntp.perl.org/group/perl.win32.vanilla/2010/04/msg219.html

===
...
you need to patch Makefile.PL (for both Crypt-OpenSSL-Random and Crypt-OpenSSL-RSA) in this way:

- 'LIBS' => ['-lssl -lcrypto'],
+ 'LIBS' => ($^O eq 'MSWin32') ? ['-lssl32 -leay32'] : ['-lssl -lcrypto'],
...
===

Save file Makefile.PL

Swith to cpanp process and run:
perl Makefile.PL
dmake
dmake test
dmake install

Exit from cpan shell by run:
Exit

#
#
# }

Download and extract Crypt-OpenSSL-RSA-0.26_patched.tar.gz by run:
cpanp i http://strawberryperl.com/package/kmx/perl-modules-patched/Crypt-OpenSSL-RSA-0.26_patched.tar.gz

# {
# Old Var
#

Download and extract Crypt-OpenSSL-RSA-0.26.tar.gz by run:

cpanp z Crypt::OpenSSL::RSA

Not close command line, but run editor as another process

Open C:\strawberry\cpanplus\5.12.3\build\Crypt-OpenSSL-RSA-0.26\Makefile.PL in editor
replace
==
'LIBS' => ['-lssl -lcrypto'], # e.g., '-lm'
==
to
==
'LIBS' => ($^O eq 'MSWin32') ? ['-lssl32 -leay32'] : ['-lssl -lcrypto'],
==

Save file Makefile.PL

Swith to cpanp process and run:
perl Makefile.PL
dmake
dmake test
dmake install

Exit from cpan shell by run:
Exit

#
#
# }
===

This

==
cpanp i Crypt::OpenSSL::AES
cpanp i Crypt::OpenSSL::RSA
==

work as need.

—————————–

2011-06-02 13-02:

http://www.mail-archive.com/win32-vanilla@perl.org/msg00301.html


===
----- Original Message -----
From: "Victor Miasnikov"
To: win32-vanilla(at)perl.org
Sent: Thursday, June 02, 2011 1:02 PM
Subject: Which way is the true way, and what not? "-lssleay32 -llibeay32" Way? Or "-lssl -lcrypto" Way? Fw: HowTo: Strawberry Perl v5.12.3 x64 upgrade to OpenSSL v1.0.0d from "OpenSSL 1.0.0-beta4"

Hi!

Which way is the true way, and what not? "-lssleay32 -llibeay32" Way? Or "-lssl -lcrypto" Way?

--

a) "-lssleay32 -llibeay32" Way:

At this moment in strawberry-perl-5.12.3.0-64bit / 5.12.2.0 and in 64bit_openssl-1.0.0d-bin_20110507.zip :
==
libeay32__.dll
ssleay32__.dll
libeay32.a
libssl32.a
libssleay32.a
==

In Makefile.PL need use "-lssleay32 -llibeay32"

need fix in:
Crypt::OpenSSL::AES
Crypt::OpenSSL::RSA
Crypt::OpenSSL::Random

etc.

http://www.perlmonks.org/?node_id=815160

==
by syphilis (Abbot)
on Jan 01, 2010 at 08:20 UTC

I certainly didn't expect Strawberry to go with *that* naming convention for their openssl libraries.
I expected they would stick with the more general '-lssl -lcrypto' nomenclature (which is what mingw builds for native win32 in the msys shell) .... but I was wrong.
I guess they have good reason(s) for doing that.
==

b) "-lssl -lcrypto" Way:
HowTo: Strawberry Perl v5.12.3 x64 upgrade to OpenSSL v1.0.0d from "OpenSSL 1.0.0-beta4"

http://vvm.blog.tut.by/2011/06/01/howto-strawberry-perl-v5-12-3-x64-upgrade-to-openssl-v1-0-0d-from-openssl-1-0-0-beta4/

==
. . .
MSYS-20110526.zip
from

http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%20%2832-bit%29/

. . .
ftp://ftp.openssl.org/source/openssl-1.0.0d.tar.gz
. . .
tar xfhz openssl-1.0.0d.tar.gz
. . .
cd /openssl-1.0.0d

Run:
./configure mingw64 shared no-asm no-hw --openssldir=/openssl
make
make test
make install
. . .
==

The result of compilation:
==
libeay32.dll
ssleay32.dll
libcrypto.a
libcrypto.dll.a
libssl.a
libssl.dll.a
==

In Makefile.PL need use "-lssl -lcrypto"

need fix in:
Crypt::SSLeay
Net::SSLeay

but not need fix in:
Crypt::OpenSSL::AES
Crypt::OpenSSL::RSA
Crypt::OpenSSL::Random

I.e. fixed

http://www.mail-archive.com/win32-vanilla@perl.org/msg00217.html

==
kmx
Sat, 10 Apr 2010 00:20:41 -0700
. . .
I have created the following bug reports:
1/ http://rt.cpan.org/Public/Bug/Display.html?id=56454
2/ http://rt.cpan.org/Public/Bug/Display.html?id=56455
feel free to post some supportive comments to those RTs
==

Which way is the true way, and what not? "-lssleay32 -llibeay32" Way? Or "-lssl -lcrypto" Way?

Best regards, Victor Miasnikov
===




















http://www.mail-archive.com/win32-vanilla@perl.org/msg00302.html


===
----- Original Message -----
From: "kmx"
To: win32-vanilla(at)perl.org
Sent: Thursday, June 02, 2011 1:59 PM
Subject: Re: Which way is the true way, and what not? "-lssleay32 -llibeay32" Way? Or "-lssl -lcrypto" Way? Fw: HowTo: Strawberry Perl v5.12.3 x64 upgrade to OpenSSL v1.0.0d from "OpenSSL 1.0.0-beta4"

Hi Victor,

> a) "-lssleay32 -llibeay32" Way:
>
> At this moment in strawberry-perl-5.12.3.0-64bit / 5.12.2.0 and in 64bit_openssl-1.0.0d-bin_20110507.zip :
> ==
> libeay32__.dll
> ssleay32__.dll
> libeay32.a
> libssl32.a
> libssleay32.a
> ==

I can give an explanation as I have prepared this part of strawberry perl.

a/ libeay32.a (+libeay32__.dll) is analogy for UNIXish -lcrypto

b/ libssl32.a == libssleay32.a (+ssleay32__.dll) is analogy for UNIXish -lssl

The trouble is that openssl has 2 different way for building MSWindows/gcc
libraries - one via Configure+make; the second via mingw32.bat.
Unfortunately each way creates *.a files with different names

*/ Configure+make creates
- libcrypto.dll.a
- libcrypto.a
- libssl.dll.a
- libssl.a

*/ mingw32.bat creates
- libeay32.a (= libcrypto.dll.a)
- libcrypto.a
- libssl32.a (= libssl.dll.a)
- libssl.a

On top of that you have also MS compiler (cl/msvc) in MS Windows world
which uses also different library names: libeay32*.lib ssleay32*.lib (from
here probably comes "-lssleay32 -llibeay32" which should be fine with MS
compiler)

Things get a little bit more complicated by the fact that the more-or-less
official openssl Win32 binaries distribution (see
http://www.openssl.org/related/binaries.html) contains also mingw/gcc *.a
libraries - however named: libeay32.a + ssleay32.a (which does not
correspond to the results produced by the mingw.bat from official openssl
tarball). Please note that ssleay32.a is not libssleay32.a thus linker will
not find it when given -lssleay32 - this is IMHO the main source of
confusion about the right lib names.

What we have done in strawberry was to use naming convention
libeay32.a/libssl32.a + a little trick to copy libssl32.a to libssleay32.a
- at that time it seemed to be a way how to satisfy most of the modules on
cpan using different -lssleay32/-lssl32/-leay32 linker options

I do not feel to have an authority to say what is the best/right/correct
way but I would keep the naming convention of the original openssl
distribution and use: -lssl32 -leay32 for MSWindows+gcc compiler (which
works with openssl included in strawberry perl however not with *.a mingw
libraries that are part of the openssl Win32 binaries distribution).

--
kmx
===




















http://www.mail-archive.com/win32-vanilla@perl.org/msg00303.html


===
----- Original Message -----
From: "Victor Miasnikov"
To: "kmx" ; win32-vanilla(at)perl.org
Sent: Thursday, June 02, 2011 4:29 PM
Subject: Re: Which way is the true way, and what not? "-lssleay32 -llibeay32" Way? Or "-lssl -lcrypto" Way? Fw: HowTo: Strawberry Perl v5.12.3 x64 upgrade to OpenSSL v1.0.0d from "OpenSSL 1.0.0-beta4"

Hi!

> The trouble is that openssl has 2 different way for building MSWindows/gcc libraries
> - one via Configure+make;
> the second via mingw32.bat.

> . . . the more-or-less official openssl Win32 binaries distribution
> (see http://www.openssl.org/related/binaries.html) contains also
>mingw/gcc *.a libraries - however named: libeay32.a + ssleay32.a . . .

Well . . .

We will go step by step:

The practical question: .dll / .lib files from 64bit_openssl-1.0.0d-bin_20110507.zip build via Configure + make?
Or with mingw32.bat? Or copy from "openssl Win32 binaries distribution"?

Question N2: where to download / get / take openssl.cnf for OpenSSL from *_20110507.zip?

Best regards, Victor Miasnikov
===





















Upgrade Strawberry Perl v5.12.3.0 x64 ( strawberry-perl-5.12.3.0-64bit.zip) library to kmx/64_libs/5.12/*.zip:

Download:

http://strawberryperl.com/download/5.12.3.0/strawberry-perl-5.12.3.0-64bit.zip

unpack it to
c:\sb\

Save to c:\sb\portableshell.bat :
==
@echo off
set drive=%~dp0
set drivep=%drive%
If $#\#$==$#%drive:~-1%#$ set drivep=%drive:~0,-1%
set PATH=%drivep%\perl\site\bin;%drivep%\perl\bin;%drivep%\c\bin;%PATH%
set TERM=dumb
echo ----------------------------------------------
echo Welcome to Strawberry Perl Portable Edition!
echo * URL - http://www.strawberryperl.com/
echo * see README.portable.TXT for more info
echo ----------------------------------------------
perl -e "printf("""Perl executable: %%s\nPerl version : %%vd\n""", $^X, $^V)" 2>nul
if ERRORLEVEL==1 echo.&echo FATAL ERROR: 'perl' does not work; check if your strawberry pack is complete!
echo.
cmd
==

#{
# Old:
#
Download:

http://strawberryperl.com/download/5.12.3.0/strawberry-perl-5.12.3.0-portable.zip

unpack only portableshell.bat from it to
c:\sb\
#
#
#}

Run:
portableshell.bat

In portableshell.bat shell:

set PERL_MM_USE_DEFAULT=1

cpanp s save system
===
C:\sb>cpanp s save system
Configuration successfully saved to CPANPLUS::Config::System
(C:\sb\perl\lib\CPANPLUS\Config\System.pm)
===

cpanp s edit system

Replace
strawberryperl to sb
==
$conf->set_conf( base => 'C:\\sb\\cpanplus' );
==

If found:
==
$conf->set_conf( signature => 1 );
==
replace to
==
$conf->set_conf( signature => 0 );
==

Save file.

cpanp i IPC::Run

cpanp i Perl::Dist::Strawberry

cpanp i Perl::Dist::WiX::BuildPerl::5123
cpanp i Perl::Dist::Strawberry::BuildPerl::5123

GoTo:
C:\sb\perl\site\lib\Perl\Dist\Strawberry\

rename
Libraries.pm
to
Libraries.pm.Orig

apply patch to Libraries.pm:
===
--- Libraries.pm.Orig Tue Jun 07 15:50:35 2011
+++ Libraries.pm Tue Jun 07 16:35:51 2011
@@ -127,6 +127,9 @@
'freeglut' => '32bit-gcc4/freeglut-2.6.0-bin_20100213.zip',
'libssh2' => '32bit-gcc4/libssh2-1.2.5-bin_20100520.zip',
},
+#{ VVM 2011-06-07 16-35
+#
+#
'64bit-gcc4' => {
'patch' => '64bit-gcc4/patch-2.5.9-7-bin_20100110_20100303.zip',
'mysql589' => undef,
@@ -146,29 +149,34 @@
'pari5121' => undef,
'pari5122' => undef,
'pari5123' => undef,
- 'zlib' => '64bit-gcc4/zlib-1.2.3-bin_20100110.zip',
- 'libiconv' => '64bit-gcc4/libiconv-1.13.1-bin_20100110.zip',
- 'libxml2' => '64bit-gcc4/libxml2-2.7.3-bin_20100110.zip',
- 'libexpat' => '64bit-gcc4/expat-2.0.1-bin_20100110.zip',
- 'gmp' => '64bit-gcc4/gmp-5.0.1-419f6a4cc606-bin_20100306.zip',
- 'libxslt' => '64bit-gcc4/libxslt-1.1.26-bin_20100111.zip',
- 'libjpeg' => '64bit-gcc4/jpeg-6b-gnuwin32-bin_20100110.zip',
- 'libgif' => '64bit-gcc4/giflib-4.1.6-bin_20100110.zip',
- 'libpng' => '64bit-gcc4/libpng-1.2.40-bin_20100110.zip',
- 'libtiff' => '64bit-gcc4/tiff-3.9.1-bin_20100110.zip',
- 'libgd' => '64bit-gcc4/gd-2.0.35-bin_20100110.zip',
- 'libfreetype' => '64bit-gcc4/freetype-2.3.11-bin_20100110.zip',
- 'libopenssl' => '64bit-gcc4/openssl-1.0.0-beta4-bin_20100110.zip',
- 'libpostgresql' => '64bit-gcc4/postgresql-8.4.1-bin_20100110.zip',
- 'libdb' => '64bit-gcc4/db-4.8.24-bin_20100110.zip',
- 'libgdbm' => '64bit-gcc4/gdbm-1.8.3-bin_20100112.zip',
- 'libxpm' => '64bit-gcc4/libXpm-3.5.8-bin_20100110.zip',
- 'libxz' => '64bit-gcc4/liblzma-xz-4.999.9beta-bin_20100308.zip',
- 'mpc' => '64bit-gcc4/mpc-0.8.1-bin_20100306.zip',
- 'mpfr' => '64bit-gcc4/mpfr-2.4.2-bin_20100306.zip',
- 'libmysql' => '64bit-gcc4/mysql-5.1.44-bin_20100304.zip',
- 'freeglut' => '64bit-gcc4/freeglut-2.6.0-bin_20100213.zip',
- 'libssh2' => '64bit-gcc4/libssh2-1.2.5-bin_20100520.zip',
+ 'zlib' => 'kmx/64_libs/5.12/64bit_zlib-1.2.5-bin_20110507.zip',
+ 'libiconv' => 'kmx/64_libs/5.12/64bit_libiconv-1.13.1-sezero20110428-bin_20110507.zip',
+ 'libxml2' => 'kmx/64_libs/5.12/64bit_libxml2-2.7.8-bin_20110507.zip',
+ 'libexpat' => 'kmx/64_libs/5.12/64bit_expat-2.0.1-sezero20110428-bin_20110507.zip',
+ 'gmp' => 'kmx/64_libs/5.12/64bit_gmp-5.0.1-bin_20110507.zip',
+ 'libxslt' => 'kmx/64_libs/5.12/64bit_libxslt-1.1.26-bin_20110507.zip',
+ 'libjpeg' => 'kmx/64_libs/5.12/64bit_jpeg-8c-bin_20110507.zip',
+ 'libgif' => 'kmx/64_libs/5.12/64bit_giflib-4.1.6-bin_20110507.zip',
+ 'libpng' => 'kmx/64_libs/5.12/64bit_libpng-1.5.2-bin_20110507.zip',
+ 'libtiff' => 'kmx/64_libs/5.12/64bit_tiff-3.9.5-bin_20110507.zip',
+ 'libgd' => 'kmx/64_libs/5.12/64bit_gd-2.0.35(OLD-jpg-png)-bin_20110507.zip',
+ 'libfreetype' => 'kmx/64_libs/5.12/64bit_freetype-2.4.4-bin_20110507.zip',
+ 'libopenssl' => 'kmx/64_libs/5.12/64bit_openssl-1.0.0d-bin_20110507.zip',
+ 'libpostgresql' => 'kmx/64_libs/5.12/64bit_postgresql-9.0.4-bin_20110507.zip',
+ 'libdb' => 'kmx/64_libs/5.12/64bit_db-5.1.25-bin_20110507.zip',
+ 'libgdbm' => 'kmx/64_libs/5.12/64bit_gdbm-1.8.3-bin_20110507.zip',
+ 'libxpm' => 'kmx/64_libs/5.12/64bit_libXpm-3.5.9-bin_20110507.zip',
+ 'libxz' => 'kmx/64_libs/5.12/64bit_xz-5.0.2-bin_20110507.zip',
+ 'mpc' => 'kmx/64_libs/5.12/64bit_mpc-0.9-bin_20110507.zip',
+ 'mpfr' => 'kmx/64_libs/5.12/64bit_mpfr-3.0.1-bin_20110507.zip',
+ 'libmysql' => 'kmx/64_libs/5.12/64bit_mysql-5.1.44-bin_20100304.zip',
+ 'freeglut' => 'kmx/64_libs/5.12/64bit_freeglut-2.6.0-bin_20110507.zip',
+ 'libssh2' => 'kmx/64_libs/5.12/64bit_libssh2-1.2.8-bin_20110507.zip',
+#
+#
+#}
+
},
};
===

GoTo:
C:\sb\perl\site\lib\Perl\Dist\

rename
WiX.pm
to
WiX.pm.Orig

apply patch to WiX.pm:

===
>diff -u WiX.pm.Orig WiX.pm
--- WiX.pm.Orig Sun Jun 05 15:17:58 2011
+++ WiX.pm Tue Jun 07 17:23:36 2011
@@ -725,16 +725,16 @@
isa => subtype(
'Int' => where {
if ( not defined $_ ) {
- $_ = 32;
+ $_ = 64;
}

- $_ == 32 or $_ == 64;
+ $_ == 64 or $_ == 64;
},
message {
'Not 32 or 64-bit';
},
),
- default => 32,
+ default => 64,
);
===

Run

%SystemRoot%\system32\cmd.exe /c C:\sb\perl\site\bin\perldist_strawberry.bat --output C:\strawberry --skip 1 --skip 2 --skip 3

# { Or
#%SystemRoot%\system32\cmd.exe /c C:\sb\perl\bin\perl.exe -x -S perldist_strawberry.pl --output C:\strawberry --skip 1 --skip 2 --skip 3
# }

Go to directory:
C:\tmp\output\

rename strawberry-perl-5.12.3.0-64bit.msi strawberry-perl-5.12.3.0-64bit-build-2011-06-07.msi
rename strawberry-perl-5.12.3.0-64bit.zip strawberry-perl-5.12.3.0-64bit-build-2011-06-07.zip

Copy this files from C:\tmp\

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 enum

Download 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.Orig

This 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 354

Expression: 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 354

This 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 3

I 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

#
#
#}

Copyright © 2013 Виктор Мясников ( Victor Miasnikov). Search Engine Optimization by Star Nine. Distributed by Wordpress Themes
Хостинг hoster.by   Сервис белорусских блогов: BLOGS.TUT.BY