Changes between Version 20 and Version 21 of BuildingOnWindows


Ignore:
Timestamp:
11/02/10 11:04:44 (13 years ago)
Author:
Samuli Seppänen
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BuildingOnWindows

    v20 v21  
    6161= Building OpenSSL =
    6262
    63 It's necessary to build OpenSSL to build OpenVPN as described [http://ehsanakhgari.org/blog/2008-05-04/compiling-openvpn-windows here].
     63First download the latest (0.9.8) release from [http://www.openssl.org/source here] and extract it somewhere. Using the latest one ensures there are no (known) security holes in OpenSSL. For the most part you can then follow the instructions in ''INSTALL.W32'' and ''INSTALL.W64'' files. Before you start, though, launch the ''Visual Studio 2008 x64 Cross Tools Command Prompt'', which can be found from the ''Start menu''. Unlike the standard command prompt it has all the paths to VC binaries set correctly.
     64
     65From within this command prompt you'll first configure OpenSSL using the provided Perl script:
     66
     67{{{
     68cd c:\<directory-with-openssl-sources>
     69perl Configure VC-WIN32 --prefix=c:/<openssl-install-directory>
     70}}}
     71
     72Some of the crypto routines are written in assembler to increase performance, so you need to/should use an assembler (e.g. MASM) in the next step:
     73
     74{{{
     75ms\do_masm
     76}}}
     77
     78Next compile OpenSSL using the provided scripts:
     79
     80{{{
     81nmake -f ms\ntdll.mak
     82nmake -f ms\ntdll.mak test
     83nmake -f ms\ntdll.mak install
     84}}}
     85
     86In theory this should work. However, you'll most likely encounter issues with (trivial?) compiler warnings stopping the entire build. To circumvent this remove the ''/WX'' flag in the makefile as suggested in INSTALL.W32 files. This is harder than it seems for two reasons:
     87
     88 * The correct makefile is ''ms\ntdll.mak'' (not ''Makefile'' in build root)
     89 * You need to use ''Wordpad'' or other UNIX linefeed-aware editor to open the makefile
    6490
    6591= Preparing the source tree for building =