Skip to contentSkip to conversation

Visual Studio support?

Openvpn-devel Fish Wang 8 participants 12 messages Jan 1, 2017 – Jan 9, 2017

lore
Share & tools
lore

Fish Wang

author
#0 lore raw

Hi,

I'm finishing up a patch to make sure OpenVPN compiles under Visual Studio. I have several questions;

- Do you want to apply such a patch to master and/or release/2.4, or should I maintain it separately?
- What is the minimum version of Visual Studio do we want to support?
- Should such a patch be developed against maste, release/2.4 branch, or both?

Thanks!

Best,
Fish

#1 lore raw

Hi,

Quoted 5 lines · Fish Wang

I'm finishing up a patch to make sure OpenVPN compiles under Visual Studio. I have several questions;

- Do you want to apply such a patch to master and/or release/2.4, or should I maintain it separately?

Yes, we intend to keep OpenVPN compilable under MSVC, and accept patches to make that work (provided the patch is good, etc.). Not many (if any?) of the frequent patch authors actually use MSVC themselves, so we unfortunately break compilation in MSVC every now and then.

Quoted 1 line

- What is the minimum version of Visual Studio do we want to support?

We require full C99 support, so iirc that means at least VS2015. But you are most likely better informed than I am.

Quoted 2 lines

- Should such a patch be developed against maste, release/2.4 branch, or both?

master, and then probably cherry-picked back to release/2.4.

-Steffan

#2 lore raw
In reply to Fish Wang

Hi,

Quoted 5 lines · Fish Wang

I'm finishing up a patch to make sure OpenVPN compiles under Visual Studio. I have several questions;

- Do you want to apply such a patch to master and/or release/2.4, or should I maintain it separately?

Unless it's highly intrusive, it makes sense to merge it.

Since we're not compiling with VS, we sometimes break stuff, but this is not intentional :-)

Quoted 1 line

- What is the minimum version of Visual Studio do we want to support?

I have no idea. Something recent, which can do C99, as that's the coding standard we've change to for 2.4 and master-after-2.4

Quoted 2 lines

- Should such a patch be developed against maste, release/2.4 branch, or both?

Master (as always).

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
author
#3 lore raw

Thanks for your (and Steffan's) reply.

I also noticed that 2.4 and 2.5 only supports Vista+, so it might make sense to remove dynamic function loading for WPF in openvpnserv (see all those LoadLibrary and GetProcAddress code in [1]). But somehow I have an impression that openvpnserv is no longer supported and openvpnserv2 should be used instead, so such a patch is not useful. What do you think?

Best,
Fish

[1]
https://github.com/OpenVPN/openvpn/blob/master/src/openvpnserv/interactive.c

-----Original Message-----
From: Gert Doering [mailto:[email protected]...]
Sent: Sunday, January 1, 2017 10:21 AM
To: Fish Wang <[email protected]...>
Cc: [email protected]
Subject: Re: [Openvpn-devel] Visual Studio support?

Hi,

Quoted 1 line · Fish Wang

I'm finishing up a patch to make sure OpenVPN compiles under Visual

Studio.

Quoted 4 lines

I have several questions;

- Do you want to apply such a patch to master and/or release/2.4, or should I maintain it separately?

Unless it's highly intrusive, it makes sense to merge it.

Since we're not compiling with VS, we sometimes break stuff, but this is not intentional :-)

Quoted 1 line

- What is the minimum version of Visual Studio do we want to support?

I have no idea. Something recent, which can do C99, as that's the coding standard we've change to for 2.4 and master-after-2.4

Quoted 2 lines

- Should such a patch be developed against maste, release/2.4 branch, or both?

Master (as always).

gert

--
USENET is *not* the non-clickable part of WWW!

//www.muc.de/~gert/
Gert Doering - Munich, Germany
[email protected]...
fax: +49-89-35655025
[email protected]...

#4 lore raw

Hi,

Quoted 5 lines · Fish Wang

Thanks for your (and Steffan's) reply.

I also noticed that 2.4 and 2.5 only supports Vista+, so it might make sense to remove dynamic function loading for WPF in openvpnserv (see all those LoadLibrary and GetProcAddress code in [1]).

I leave that for Selva or Heiko to comment on.

Quoted 3 lines

But somehow I have an
impression that openvpnserv is no longer supported and openvpnserv2 should be used instead, so such a patch is not useful. What do you think?

openvpnserv has two faces - one is "the traditional service". That part got replaced by openvpnserv2.

The other part is "the interactive service", which is the privileged part needed to run openvpn.exe and gui as non-privileged user. That one is new and very much wanted :-)

Some disentanglement might be appropriate or even desirable for "master"
- for 2.4, I'd say "we leave this as it is" - it works and is well-tested now.

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#5 lore raw

Hi,

Quoted 9 lines · Gert Doering
Quoted 3 lines · Fish Wang

Thanks for your (and Steffan's) reply.

I also noticed that 2.4 and 2.5 only supports Vista+, so it might make

sense

Quoted 2 lines

to remove dynamic function loading for WPF in openvpnserv (see all those LoadLibrary and GetProcAddress code in [1]).

I leave that for Selva or Heiko to comment on.

As interactive service is only available in 2.4+ which does not support XP, the run time lookup of those functions is not required and could be removed.

Selva

#6 lore raw
In reply to Fish Wang

Hi,

Il 01/01/2017 20:32, Fish Wang ha scritto:

Quoted 10 lines

Thanks for your (and Steffan's) reply.

I also noticed that 2.4 and 2.5 only supports Vista+, so it might make sense to remove dynamic function loading for WPF in openvpnserv (see all those LoadLibrary and GetProcAddress code in [1]). But somehow I have an impression that openvpnserv is no longer supported and openvpnserv2 should be used instead, so such a patch is not useful. What do you think?

Best,
Fish

How do you build OpenVPN using Visual Studio? I'm asking because we have the "left-to-rot" MSVC build scripts here:

<https://github.com/OpenVPN/openvpn-build/tree/master/msvc>

Do you use the above scripts, or just import the code to Visual Studio and set some settings there to make it all work?

Signature · 5 lines
Samuli Seppänen
Community Manager
OpenVPN Technologies, Inc

irc freenode net: mattock
Quoted 56 lines

[1]
https://github.com/OpenVPN/openvpn/blob/master/src/openvpnserv/interactive.c

-----Original Message-----
From: Gert Doering [mailto:[email protected]...]
Sent: Sunday, January 1, 2017 10:21 AM
To: Fish Wang <[email protected]...>
Cc: [email protected]
Subject: Re: [Openvpn-devel] Visual Studio support?

Hi,

Quoted 1 line · Fish Wang

I'm finishing up a patch to make sure OpenVPN compiles under Visual

Studio.

Quoted 4 lines

I have several questions;

- Do you want to apply such a patch to master and/or release/2.4, or should I maintain it separately?

Unless it's highly intrusive, it makes sense to merge it.

Since we're not compiling with VS, we sometimes break stuff, but this is not intentional :-)

Quoted 1 line

- What is the minimum version of Visual Studio do we want to support?

I have no idea. Something recent, which can do C99, as that's the coding standard we've change to for 2.4 and master-after-2.4

Quoted 2 lines

- Should such a patch be developed against maste, release/2.4 branch, or both?

Master (as always).

gert

--
USENET is *not* the non-clickable part of WWW!

//www.muc.de/~gert/
Gert Doering - Munich, Germany
[email protected]...
fax: +49-89-35655025
[email protected]...

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

author
#7 lore raw

Hi Samuli,

I have my own building scripts. I think they are based on an old version of openvpn-build/msvc. I definitely made quite a few changes to make them work.

Best,
Fish

-----Original Message-----
From: Samuli Seppänen [mailto:[email protected]...]
Sent: Monday, January 2, 2017 2:54 AM
To: Fish Wang <[email protected]...>; 'Gert Doering' <[email protected]...>
Cc: [email protected]
Subject: Re: [Openvpn-devel] Visual Studio support?

Hi,

Il 01/01/2017 20:32, Fish Wang ha scritto:

Quoted 7 lines

Thanks for your (and Steffan's) reply.

I also noticed that 2.4 and 2.5 only supports Vista+, so it might make sense to remove dynamic function loading for WPF in openvpnserv (see all those LoadLibrary and GetProcAddress code in [1]). But somehow I have an impression that openvpnserv is no longer supported and openvpnserv2 should be used instead, so such a patch is not useful. What

do you think?

Quoted 3 lines

Best,
Fish

How do you build OpenVPN using Visual Studio? I'm asking because we have the "left-to-rot" MSVC build scripts here:

<https://github.com/OpenVPN/openvpn-build/tree/master/msvc>

Do you use the above scripts, or just import the code to Visual Studio and set some settings there to make it all work?

--
Samuli Seppänen
Community Manager
OpenVPN Technologies, Inc

irc freenode net: mattock

Quoted 57 lines

[1]
https://github.com/OpenVPN/openvpn/blob/master/src/openvpnserv/interac
tive.c

-----Original Message-----
From: Gert Doering [mailto:[email protected]...]
Sent: Sunday, January 1, 2017 10:21 AM
To: Fish Wang <[email protected]...>
Cc: [email protected]
Subject: Re: [Openvpn-devel] Visual Studio support?

Hi,

Quoted 1 line · Fish Wang

I'm finishing up a patch to make sure OpenVPN compiles under Visual

Studio.

Quoted 4 lines

I have several questions;

- Do you want to apply such a patch to master and/or release/2.4, or should I maintain it separately?

Unless it's highly intrusive, it makes sense to merge it.

Since we're not compiling with VS, we sometimes break stuff, but this is not intentional :-)

Quoted 1 line

- What is the minimum version of Visual Studio do we want to support?

I have no idea. Something recent, which can do C99, as that's the coding standard we've change to for 2.4 and master-after-2.4

Quoted 2 lines

- Should such a patch be developed against maste, release/2.4 branch, or both?

Master (as always).

gert

--
USENET is *not* the non-clickable part of WWW!

//www.muc.de/~gert/
Gert Doering - Munich, Germany
[email protected]...
fax: +49-89-35655025
[email protected]...

----------------------------------------------------------------------
-------- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

#8 lore raw

2017-01-02 15:24 GMT+03:00 Fish Wang <[email protected]...>:

Quoted 6 lines

Hi Samuli,

I have my own building scripts. I think they are based on an old version of openvpn-build/msvc. I definitely made quite a few changes to make them work.

can you try them at https://ci.appveyor.com ?
if we will not run those scripts on every build, it will become broken soon

Quoted 113 lines

Best,
Fish

-----Original Message-----
From: Samuli Seppänen [mailto:[email protected]...]
Sent: Monday, January 2, 2017 2:54 AM
To: Fish Wang <[email protected]...>; 'Gert Doering' <[email protected]...>
Cc: [email protected]
Subject: Re: [Openvpn-devel] Visual Studio support?

Hi,

Il 01/01/2017 20:32, Fish Wang ha scritto:

Quoted 7 lines

Thanks for your (and Steffan's) reply.

I also noticed that 2.4 and 2.5 only supports Vista+, so it might make sense to remove dynamic function loading for WPF in openvpnserv (see all those LoadLibrary and GetProcAddress code in [1]). But somehow I have an impression that openvpnserv is no longer supported and openvpnserv2 should be used instead, so such a patch is not useful. What

do you think?

Quoted 3 lines

Best,
Fish

How do you build OpenVPN using Visual Studio? I'm asking because we have the
"left-to-rot" MSVC build scripts here:

<https://github.com/OpenVPN/openvpn-build/tree/master/msvc>

Do you use the above scripts, or just import the code to Visual Studio and set some settings there to make it all work?

--
Samuli Seppänen
Community Manager
OpenVPN Technologies, Inc

irc freenode net: mattock

Quoted 49 lines

[1]
https://github.com/OpenVPN/openvpn/blob/master/src/openvpnserv/interac
tive.c

-----Original Message-----
From: Gert Doering [mailto:[email protected]...]
Sent: Sunday, January 1, 2017 10:21 AM
To: Fish Wang <[email protected]...>
Cc: [email protected]
Subject: Re: [Openvpn-devel] Visual Studio support?

Hi,

Quoted 1 line · Fish Wang

I'm finishing up a patch to make sure OpenVPN compiles under Visual

Studio.

Quoted 4 lines

I have several questions;

- Do you want to apply such a patch to master and/or release/2.4, or should I maintain it separately?

Unless it's highly intrusive, it makes sense to merge it.

Since we're not compiling with VS, we sometimes break stuff, but this is not intentional :-)

Quoted 1 line

- What is the minimum version of Visual Studio do we want to support?

I have no idea. Something recent, which can do C99, as that's the coding standard we've change to for 2.4 and master-after-2.4

Quoted 2 lines

- Should such a patch be developed against maste, release/2.4 branch, or both?

Master (as always).

gert

--
USENET is *not* the non-clickable part of WWW!

//www.muc.de/~gert/ <http://www.muc.de/%7Egert/>
Gert Doering - Munich, Germany
[email protected]...
fax: +49-89-35655025
[email protected]...

Quoted 8 lines

----------------------------------------------------------------------
-------- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

#9 lore raw
In reply to Fish Wang
Quoted 2 lines · Fish Wang

I'm finishing up a patch to make sure OpenVPN compiles under Visual Studio. I have several questions;

I'm also compiling using TDM-MinGW and MSVC-2015. But since approx 2 years, the CL compiler breaks at compiling options.c:
src/openvpn/options.c(7937): fatal error C1026: parser stack overflow, program too complex

Did you manage to work around that?

I'm using the latest CL v.19.00.24215.1. I also reported this 2 years ago in:
https://sourceforge.net/p/openvpn/mailman/message/34683175/

Signature · 1 line
--gv
#10 lore raw

Am 02.01.17 um 11:23 schrieb Gisle Vanem:

Quoted 5 lines
Quoted 2 lines · Fish Wang

I'm finishing up a patch to make sure OpenVPN compiles under Visual Studio. I have several questions;

Quoted 9 lines

I'm also compiling using TDM-MinGW and MSVC-2015. But since approx 2 years, the CL compiler breaks at compiling options.c:
src/openvpn/options.c(7937): fatal error C1026: parser stack overflow, program too complex

Did you manage to work around that?

I'm using the latest CL v.19.00.24215.1. I also reported this 2 years ago in:
https://sourceforge.net/p/openvpn/mailman/message/34683175/

I managed to work around that. By adding a done=true;variable and then splitting the if cascade by

else {
done=false;
}

if (!done)

in approximately the middle. But without that hack I am not sure if you can get it to compile.

Arne

#11 lore raw
Quoted 8 lines · Arne Schwabe
Quoted 5 lines

Did you manage to work around that?

I'm using the latest CL v.19.00.24215.1. I also reported this 2 years ago in:
https://sourceforge.net/p/openvpn/mailman/message/34683175/

I managed to work around that. By adding a done=true;variable and then splitting the if cascade by

Thanks. Sorry for the late reply.
But I've managed to use Clang-CL to build things for MSVC. It is really a solid piece of software!

Signature · 1 line
--gv