Page 1 of 1

Building OpenVPN from the release branch

Posted: Mon Dec 01, 2014 12:23 pm
by yuri_ch
I'm trying to build OpenVPN using MSVC subsystem.
It seems not to be actively maintained, but it works fine for me.
I encountered with problems that were described and solved here. If possible I can fix them and create a push request

However, it compiles and works only for the development (master) branch.
Downloaded branch setting is located in msvc/build-env.bat

Code: Select all

if "%OPENVPN_VERSION%"=="" set OPENVPN_VERSION=2.3_master
...
set OPENVPN_URL=https://github.com/downloads/OpenVPN/openvpn/openvpn-%OPENVPN_VERSION%.tar.gz

As I said, it compiles only with the settings above
I was trying to set a release version:

Code: Select all

OPENVPN_VERSION=2.3.5
but it is seems not to be located there

Then I decided to set a downloading URL directly.
I tried

Code: Select all

set OPENVPN_URL=https://github.com/OpenVPN/openvpn/archive/release/2.3.zip
and even

Code: Select all

set OPENVPN_URL=http://swupdate.openvpn.org/community/releases/openvpn-2.3.5.tar.gz
It is downloaded ok, but I'm getting a numerous compilation errors now
openvpn-build\msvc\build.tmp\openvpn-release-2.3\src\openvpn\crypto_backend.h(241): error C2061: syntax error : identifier '__attribute__'
openvpn-build\msvc\build.tmp\openvpn-release-2.3\src\openvpn\crypto_backend.h(241): error C2059: syntax error : ';'
openvpn-build\msvc\build.tmp\openvpn-release-2.3\src\openvpn\crypto_backend.h(251): error C2061: syntax error : identifier '__attribute__'
openvpn-build\msvc\build.tmp\openvpn-release-2.3\src\openvpn\crypto_backend.h(251): error C2059: syntax error : ';'
openvpn-build\msvc\build.tmp\openvpn-release-2.3\src\openvpn\crypto_backend.h(318): error C2061: syntax error : identifier '__attribute__'
openvpn-build\msvc\build.tmp\openvpn-release-2.3\src\openvpn\crypto_backend.h(318): error C2059: syntax error : ';'
openvpn-build\msvc\build.tmp\openvpn-release-2.3\src\openvpn\crypto_backend.h(318): error C2373: 'nonnull' : redefinition; different type modifiers
It seems I should build with some other OpenSSL library version, but I'm not sure

Re: Building OpenVPN from the release branch

Posted: Tue Dec 02, 2014 5:28 pm
by yuri_ch
The same errors while trying to use OpenVPN git as a source

Code: Select all

set OPENVPN_BRANCH=release/2.3
set OPENVPN_SOURCE=git
set OPENVPN_GIT=https://github.com/OpenVPN/openvpn.git
I also noticed that codebase in openvpn-2.3_master.tar.gz (which is compiles correctly) differs from release/2.3 branch in OpenVPN git repo