openvpn-build icon indicating copy to clipboard operation
openvpn-build copied to clipboard

mingw builds

Open selvanair opened this issue 3 years ago • 5 comments

Do we continue to support mingw builds? -- if so we'll need to include a patch for pkcs11-helper-1.28. I had completely forgotten that I've been building its master branch with a local patch for mingw (a define in Windows headers being used as a variable) -- it should have been submitted upstream before 1.28 release, but too late for that now.

selvanair avatar Jan 27 '22 21:01 selvanair

Hi,

On Thu, Jan 27, 2022 at 01:37:49PM -0800, Selva Nair wrote:

Do we continue to support mingw builds? -- if so we'll need to include a patch for pkcs11-helper-1.28. I had completely forgotten that I've been building its master branch with a local patch for mingw (a define in Windows headers being used as a variable) -- it should have been submitted upstream before 1.28 release, but too late for that now.

That's the "interface" thing Lev has also run into?

Anyway, I think we should support MinGW builds as long as it's not an undue burden. Antonio and I use mingw for quick "does it still build for _WIN32?" tests, and sometimes even run the resulting binaries :-)

gert

-- "If was one thing all people took for granted, was conviction that if you feed honest figures into a computer, honest figures come out. Never doubted it myself till I met a computer with a sense of humor." Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany @.***

cron2 avatar Jan 28 '22 07:01 cron2

MinGW builds are still doing fine - GitHub Actions agree with me - https://github.com/OpenVPN/openvpn/runs/4970039150?check_suite_focus=true

Let's think if we need to maintain so called "generic" build system in this repo - it was used for making Windows releases, but nowadays we use msvc for that. I am not aware about any other use cases.

Note that GitHub Actions script has a few tens of lines of shell code for to support MinGW - maybe that could be moved into build-mingw.sh and put under openvpn repo?

lstipakov avatar Jan 28 '22 07:01 lstipakov

That's the "interface" thing Lev has also run into?

"#define interface struct" in basetyps.h conflicting with a variable named interface in pkcs11-helper

MinGW builds are still doing fine - GitHub Actions agree with me - https://github.com/OpenVPN/openvpn/runs/4970039150?check_suite_focus=true

I was referring to building with pkcs11-helper 1.28.

Let's think if we need to maintain so called "generic" build system in this repo - it was used for making Windows releases, but nowadays we use msvc for that. I am not aware about any other use cases.

I too think we need not support the "generic" build system as each component can be built separately using ./configure and make. The generic build is not suited for edit-compile-test cycle anyway. A script that installs dependencies and adds the required env vars for cross-compile should be enough.

Doing that for pkcs11-helper would be still a pain as it needs extra patches for the uri support and now for the "interface" bug in 1.28. May be we can convince Alon to make a bug-fix release.

selvanair avatar Jan 28 '22 15:01 selvanair

Let's think if we need to maintain so called "generic" build system in this repo - it was used for making Windows releases, but nowadays we use msvc for that. I am not aware about any other use cases.

The "windows-nsi" depends on the "generic" build. There's also some documentation on our wiki (I think) on how to cross-compile things like Linux ARM executables on Linux x64. So I think we should not just rip out "generic", because that'd essentially mean merging "windows-nsi" with "generic" (=lots of work) plus we'd lose some capabilities which (some) users are using.

mattock avatar Jan 29 '22 07:01 mattock

OpenSSL 3.0.1 build using the build-script in generic is also broken because of this line:

[ -n "${BUILD_FOR_WINDOWS}" ] && perl util/mkdef.pl crypto ssl NT update

The usage of mkdef.pl has changed but I'm not sure why we have this line in the first place. Left over from some very old versions of OpenSSL? Can we remove it?

I've been testing Windows builds using cross compiled OpenSSL 3.0.1 without any special mkdef.pl invocations.

selvanair avatar Jan 29 '22 22:01 selvanair

We have decided to remove the nsis/mingw buildsystem since it is not maintained anymore. Only the msi/msvc buildsystem will remain, unless someone steps up to maintain the other parts. This issue will be closed when the removal actually happens.

flichtenheld avatar Dec 14 '22 13:12 flichtenheld

Moving the MinGW builds of OpenVPN to use CMake+VCPKG. Support is already in master and will be backported to release/2.6. There is definitely no plan to address this in the context of "generic". So closing this issue.

flichtenheld avatar Jul 07 '23 09:07 flichtenheld