Blame README.Win32

Packit b893dc
Building on Win 32 platforms
Packit b893dc
============================
Packit b893dc
31.7.1999, Sampo Kellomaki <sampo@iki..fi>
Packit b893dc
7.6.2002, reviewed and added comments, --Sampo
Packit b893dc
16.8.2002, added comments by Marcel Bucher --Sampo
Packit b893dc
10.7.2007. Complete rewrite to agree with latest version 1.31. References to
Packit b893dc
ancient versions and untested procedures removed --mikem
Packit b893dc
22.4.2010 Updated info for 64 bit versions --mikem
Packit b893dc
Packit b893dc
Notes: 
Packit b893dc
Packit b893dc
1. With some combinations of Windows, perl, compiler and compiler options, you
Packit b893dc
may see a runtime error "no OPENSSL_Applink", when calling
Packit b893dc
Net::SSLeay::P_PKCS12_load_file. This appears to be due to incompatible
Packit b893dc
compile options between the openssl libraries and Net::SSLeay. In particular
Packit b893dc
it has been observed with Shining Light OpenSSL See
Packit b893dc
https://www.openssl.org/support/faq.html for more details. Alas, the
Packit b893dc
apparently simple and receommended solution of adding applink.c to the SSLeay
Packit b893dc
library does not work, since applink.c need to be in the .exe file, not the
Packit b893dc
.dll for this to work. Best workaround is to build and install OpenSSL for
Packit b893dc
windows yourself.
Packit b893dc
Packit b893dc
2. If your OpenSSL is installed in an unusual place, you can tell
Packit b893dc
Net-SSLeay where to find it with the OPENSSL_PREFIX environment
Packit b893dc
variable:
Packit b893dc
set OPENSSL_PREFIX=c:\OpenSSL-1.0.1c
Packit b893dc
perl Makefile.PL
Packit b893dc
make
Packit b893dc
.....
Packit b893dc
Packit b893dc
1. Windows Server 2003
Packit b893dc
   ActivePerl 5.8.8.820
Packit b893dc
   VC++ 6.0
Packit b893dc
   Microsoft Platform SDK SVR2003R2
Packit b893dc
   Shining Light Win32 OpenSSL 0.9.7L
Packit b893dc
      http://www.shininglightpro.com/products/Win32OpenSSL.html
Packit b893dc
   Dynamic linking to SSL DLLs
Packit b893dc
Packit b893dc
Install all packages in the order listed above
Packit b893dc
Unpack and install the Net-SSLeay package
Packit b893dc
 cd Net-SSLeay-xxxx
Packit b893dc
 perl Makefile.PL
Packit b893dc
 nmake
Packit b893dc
 nmake test
Packit b893dc
 nmake install
Packit b893dc
Packit b893dc
Caution. There is an issue with Shining Light Win32 OpenSSL 0.9.7m and 0.9.8e
Packit b893dc
on Server 2003: These versions were built with VC 7.1 and the packages are
Packit b893dc
missing the 7.1 runtime DLL. This means that the openssl binaries from those
Packit b893dc
versions will not run on a standard Server 2003 platform, and this prevents
Packit b893dc
Net-SSLeay being built. Shining Light say this problem will be fixed in later
Packit b893dc
versions, where they will revert to the earlier build procedures.
Packit b893dc
Packit b893dc
2. Windows Server 2003
Packit b893dc
   ActivePerl 5.8.8.820
Packit b893dc
   VC++ 6.0
Packit b893dc
   Microsoft Platform SDK SVR2003R2
Packit b893dc
   OpenSSL 0.9.8e source openssl-0.9.8e.tar.gz
Packit b893dc
   Dynamic linking to SSL DLLs
Packit b893dc
Packit b893dc
Install all packages in the order listed above
Packit b893dc
Unpack and build OpenSSL:
Packit b893dc
  cd openssl-0.9.8e
Packit b893dc
  perl Configure VC-WIN32 --prefix=c:/OpenSSL
Packit b893dc
  ms\do_ms
Packit b893dc
  nmake -f ms\ntdll.mak
Packit b893dc
  nmake -f ms\ntdll.mak install
Packit b893dc
(if you have trouble getting to this stage, consult INSTALL.W32)
Packit b893dc
  copy c:\OpenSSL\bin\*.dll c:\windows\system32
Packit b893dc
Packit b893dc
Unpack and install the Net-SSLeay package
Packit b893dc
 cd Net-SSLeay-xxxx
Packit b893dc
 perl Makefile.PL
Packit b893dc
 nmake
Packit b893dc
 copy c:\OpenSSL\bin\*.dll blib\arch\auto\Net\SSLeay\
Packit b893dc
 nmake test
Packit b893dc
 nmake install
Packit b893dc
Packit b893dc
3. Windows XP SP2 CAUTION: this is not working yet
Packit b893dc
   ActivePerl 5.8.8.820
Packit b893dc
   Visual Studio Express 2005
Packit b893dc
   Microsoft Platform SDK SVR2003R2
Packit b893dc
   OpenSSL 0.9.8e source openssl-0.9.8e.tar.gz
Packit b893dc
   Dynamic linking to SSL DLLs
Packit b893dc
Packit b893dc
- Install all packages in the order listed above (make sure you follow the
Packit b893dc
   instructions on the download page about adding the appropriate paths to the
Packit b893dc
   Projects and Solutions section of the Options dialog box, and updating
Packit b893dc
   corewin_express.vsprops file)
Packit b893dc
- Start a build shell with Start->All Programs->Microsoft Windows SDK->CMD Shell
Packit b893dc
- cd openssl-0.9.8e
Packit b893dc
- perl Configure VC-WIN32 --prefix=c:/OpenSSL
Packit b893dc
- ms\do_masm
Packit b893dc
- nmake -f ms\ntdll.mak
Packit b893dc
- nmake -f ms\ntdll.mak install
Packit b893dc
   (if you have trouble getting to this stage, consult INSTALL.W32)
Packit b893dc
- cd Net-SSLeay-xxxx
Packit b893dc
- perl Makefile.PL
Packit b893dc
- nmake
Packit b893dc
- copy c:\OpenSSL\bin\*.dll blib\arch\auto\Net\SSLeay\
Packit b893dc
- nmake test
Packit b893dc
  CAUTION: nmake test fails at this stage. Any suggestions?? This may be
Packit b893dc
   relevant: http://www.itwriting.com/blog/?postid=261&replyto=2542
Packit b893dc
- nmake install
Packit b893dc
Packit b893dc
4. Windows XP SP2
Packit b893dc
   Strawberry Perl 5.8.8-alpha-2
Packit b893dc
   OpenSSL 0.9.8e source openssl-0.9.8e.tar.gz
Packit b893dc
Packit b893dc
- Install Strawberry Perl by running the installer
Packit b893dc
  (strawberry-perl-5.8.8-alpha-2.exe in this example)
Packit b893dc
- Unpack openssl-0.9.8e.tar.gz
Packit b893dc
- cd openssl-0.9.8e
Packit b893dc
- ms\mingw32
Packit b893dc
- cd out
Packit b893dc
- ..\ms\test
Packit b893dc
   (if you have trouble getting to this stage, consult INSTALL.W32)
Packit b893dc
- md c:\openssl 
Packit b893dc
- md c:\openssl\bin
Packit b893dc
- md c:\openssl\lib
Packit b893dc
- md c:\openssl\include
Packit b893dc
- md c:\openssl\include\openssl
Packit b893dc
- copy /b inc32\openssl\*       c:\openssl\include\openssl
Packit b893dc
- copy /b out\libssl32.a c:\openssl\lib
Packit b893dc
- copy /b out\libeay32.a c:\openssl\lib
Packit b893dc
- copy /b libssl32.dll c:\openssl\bin
Packit b893dc
- copy /b libeay32.dll c:\openssl\bin
Packit b893dc
- copy /b out\openssl.exe  c:\openssl\bin
Packit b893dc
- cd Net-SSLeay-xxxx
Packit b893dc
- c:\strawberry-perl\perl\bin\perl Makefile.PL
Packit b893dc
- dmake
Packit b893dc
- copy c:\openssl\bin\*.dll blib/arch/auto/Net/SSLeay
Packit b893dc
- dmake install
Packit b893dc
Packit b893dc
4. Windows XP SP2
Packit b893dc
   Perl CamelPack perl-camelpack-5.8.7.exe
Packit b893dc
   Shining Light Win32 OpenSSL 0.9.7L
Packit b893dc
      http://www.shininglightpro.com/products/Win32OpenSSL.html
Packit b893dc
Packit b893dc
Install all packages in the order listed above
Packit b893dc
Unpack and install the Net-SSLeay package
Packit b893dc
 cd Net-SSLeay-xxxx
Packit b893dc
 perl Makefile.PL (accept external tests and extra CPAN installs)
Packit b893dc
 nmake
Packit b893dc
 nmake install
Packit b893dc
Packit b893dc
(Note that 'nmake test' does not seem to work with CamelPack 5.8.7)
Packit b893dc
Packit b893dc
5. Windows Server 2003
Packit b893dc
   ActivePerl 5.8.8.820
Packit b893dc
   VC++ 6.0
Packit b893dc
   Microsoft Platform SDK SVR2003R2
Packit b893dc
   OpenSSL 0.9.8e source openssl-0.9.8e.tar.gz + tls extensions patch 
Packit b893dc
    from Radiator/goodies/openssl-0.9.8e-session-ticket-osc.patch   
Packit b893dc
   Dynamic linking to SSL DLLs
Packit b893dc
Packit b893dc
Install all packages in the order listed above
Packit b893dc
Unpack, patch and  and build OpenSSL, patch with 
Packit b893dc
  cd openssl-0.9.8e+extensions
Packit b893dc
  patch -p1 < Radiator/goodies/openssl-0.9.8e-session-ticket-osc.patch                 
Packit b893dc
  perl Configure VC-WIN32 --prefix=c:/OpenSSL enable-tlsext
Packit b893dc
  ms\do_ms
Packit b893dc
  nmake -f ms\ntdll.mak
Packit b893dc
  nmake -f ms\ntdll.mak install
Packit b893dc
(if you have trouble getting to this stage, consult INSTALL.W32)
Packit b893dc
  copy c:\OpenSSL\bin\*.dll c:\windows\system32
Packit b893dc
Packit b893dc
Unpack and install the Net-SSLeay package
Packit b893dc
 cd Net-SSLeay-xxxx
Packit b893dc
 perl Makefile.PL
Packit b893dc
 nmake
Packit b893dc
 copy c:\OpenSSL\bin\*.dll blib\arch\auto\Net\SSLeay\
Packit b893dc
 nmake test
Packit b893dc
 nmake install
Packit b893dc
Packit b893dc
6. Windows Server 2003
Packit b893dc
   ActivePerl 5.10.1
Packit b893dc
   Microsoft Platform SDK 2003 SP1
Packit b893dc
   OpenSSL 0.9.8i source including TLS extensions
Packit b893dc
   Dynamic linking to SSL DLLs
Packit b893dc
Packit b893dc
Build OpenSSL
Packit b893dc
   S:
Packit b893dc
   cd \openssl-0.9.8i+extensions
Packit b893dc
   nmake -f ms\ntdll.mak clean
Packit b893dc
   perl Configure VC-WIN64A --prefix=c:/OpenSSL enable-tlsext
Packit b893dc
   ms\do_win64a
Packit b893dc
   nmake -f ms\ntdll.mak
Packit b893dc
   cd out32dll
Packit b893dc
   ..\ms\test
Packit b893dc
   nmake -f ms\ntdll.mak install
Packit b893dc
Now build Net-SSLeay
Packit b893dc
   nmake clean
Packit b893dc
   R:
Packit b893dc
   cd \net-ssleay\trunk
Packit b893dc
   perl Makefile.PL
Packit b893dc
   nmake
Packit b893dc
   copy c:\OpenSSL\bin\*.dll blib\arch\auto\Net\SSLeay
Packit b893dc
   nmake test
Packit b893dc
   nmake install
Packit b893dc
Packit b893dc
7. Windows XP Professional SP3
Packit b893dc
  ActivePerl 5.16.1
Packit b893dc
  OpenSSL 1.0.1j binary from http://slproweb.com/download/Win32OpenSSL-1_0_1j.exe
Packit b893dc
  Visual C++ 2008 Redistributables from http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF
Packit b893dc
  Microsoft Visual Studio 2010 Express
Packit b893dc
   with Visual Studio Command Prompt shell:
Packit b893dc
   R:
Packit b893dc
   cd \net-ssleay\trunk
Packit b893dc
   perl Makefile.PL
Packit b893dc
   nmake
Packit b893dc
   nmake test (some warnings will be reported)
Packit b893dc
Packit b893dc
8. Windows XP Professional SP3 on VMWare
Packit b893dc
  ActivePerl 5.16.1
Packit b893dc
  OpenSSL 1.0.1 source code
Packit b893dc
  Microsoft Visual Studio 2010 Express
Packit b893dc
   with Visual Studio Command Prompt shell:
Packit b893dc
Build OpenSSL
Packit b893dc
   S:
Packit b893dc
   cd \openssl-1.0.1e
Packit b893dc
   perl Configure VC-WIN32 no-asm --prefix=c:/OpenSSL 
Packit b893dc
   ms\do_ms
Packit b893dc
   nmake -f ms\ntdll.mak
Packit b893dc
   nmake -f ms\ntdll.mak install
Packit b893dc
Now build Net-SSLeay
Packit b893dc
   R:
Packit b893dc
   cd \net-ssleay\trunk
Packit b893dc
   nmake clean
Packit b893dc
   perl Makefile.PL
Packit b893dc
   nmake
Packit b893dc
   nmake test (some warnings will be reported)