openvpn-build
                                
                                 openvpn-build copied to clipboard
                                
                                    openvpn-build copied to clipboard
                            
                            
                            
                        Build Openvpn on a 64 bit windows host for a 32 bit windows target
Hello,
I have been using the generic build scripts to build openvpn natively on my 64 bit windows machine but I also need a 32 bit version for windows. Is this possible with the generic build scripts? I have attempted: IMAGEROOT=pwd/image-win32 CHOST=mingw-w64-i686 but I receive the following error:
/bin/sh: line 1: mingw-w64-i686-gcc: command not found make[1]: *** [Makefile:728: apps/app_rand.o] Error 127 make[1]: Leaving directory '/c/openvpn-build/generic/tmp/openssl-1.1.1k' make: *** [Makefile:186: all] Error 2
Could someone please help me with this issue? I have used the generic build scripts because the windows-msi scripts were proving quite difficult.
Yes, it is possible. You should use the "windows-nsis" instead of "generic" directly. Our official builds are now MSI-based, but "windows-nsis" should still work fine - we still need it for the 2.4.x releases of which one is coming up soonish.
Well. I take that back. If you're building for Windows on Windows, I would recommend building with MSVC instead. We have a "msibuilder" VM in here that can be used for that purpose:
- https://github.com/OpenVPN/openvpn-vagrant
However, due to refactoring (spectre mitigation, openssl3 switch) that VM is not fully functional out of the box. There are fixes to that, but those have not been integrated yet (in here).
I'm going to fix those things, but that'll probably take a week or two to get provisioning nailed down (lots of waiting, fixing, waiting, fixing).
@TSWalker8 as @mattock said, just use MSVC and "Win32" configuration - this is covered by build automation:
https://github.com/OpenVPN/openvpn/runs/5288846120?check_suite_focus=true
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.
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.