Page 1 of 1

Building Openvpn 2.1.3 and dependencies on windows

Posted: Sun Dec 04, 2011 5:10 pm
by athoang
Hi All,
I am using openvpn 2.1.3 and trying to build openvpn from sources including dependencies and match the released version.
Howerver I am not sure of the versions of dependencies and tool chain used. I am not sure either if the way I am building make sense. I am using mingw32 to build dependencies. I am would like to compare my way to do it vs the way the community is doing it.

Here are the versions of tool chain and dependencies I am using to build:
-gcc 3.4.5
-mingw binutils-2.19.1
-openssl 0.9.8o
-pkcs11-helper 1.07
-openvpn-gui 1.0.3

This is my build procedure:
--to generate the openssll DLLs
from a command prompt:
OpenVPNSuite>cd openssl-0.9.8o
OpenVPNSuite>ms\mingw32.bat no-asm no-idea
--to generate pkcs11 dll
must generate share libs of openssl
from Mingw shell:
$ cd openssl-0.9.8o
$ config shared
$ make
$ cd ..\pkcs11-helper-1.07
$ openssl_home=../openssl-0.9.8o
$ configure --prefix=/ --disable-crypto-engine-gnutls --disable-crypto-engine-nss PKG_CONFIG=true OPENSSL_CFLAGS="-I${openssl_home}/include" OPENSSL_LIBS="-L${openssl_home} -lcrypto"
$ make
--to generate lzo libs
$ cd lzo-2.02
$ configure --enable-shared=yes -enable-static=yes
$ make
-- to build openvpn GUI
must install openssl to c:\openssl
$ make
rename openvpn-gui-1.0.3-en.exe to openvpn-gui-1.0.3.exe
-- to build openvpn using pre-built tap drivers
copy pkcs dlls to \usr\local\bin
copy pkcs include include\pkcs11-helper-1.0 to usr\local\include\pkcs11-helper-1.0
$ cd openvpn-2.1.3
$ domake-win

Can anyone confirm this is the way to build openvpn 2.1.3? I am puzzled on the need to build openssl twice. On top of that the exe and dll (like openvpn.exe, openssl.exe, ...) obtained does not match the size of the ones from openvpn 2.1.3 install package.