Building OpenVPN from the release branch

Weekly dev snapshots are available for testing.
We talk about them here. Testing features in the dev snapshot helps the features make it to stable.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please report your experience with testing branch. Include what you were using and how
If there is a problem, the more info the better!
Post Reply
yuri_ch
OpenVpn Newbie
Posts: 3
Joined: Mon Dec 01, 2014 11:48 am

Building OpenVPN from the release branch

Post by yuri_ch » Mon Dec 01, 2014 12:23 pm

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

yuri_ch
OpenVpn Newbie
Posts: 3
Joined: Mon Dec 01, 2014 11:48 am

Re: Building OpenVPN from the release branch

Post by yuri_ch » Tue Dec 02, 2014 5:28 pm

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

Post Reply