OpenVPN / openvpn-build

OpenVPN Build
325 stars 239 forks source link

Build failed 2.5.8 #280

Closed devowl closed 1 year ago

devowl commented 1 year ago

Hey there.

My build failed with error below:

.... Making install in plap make[2]: Entering directory '/home/SAP/openvpn-build-master/generic/tmp/openvpn-gui-11/plap' make install-am make[3]: Entering directory '/home/SAP/openvpn-build-master/generic/tmp/openvpn-gui-11/plap' source='test_plap.cpp' object='test_plap-test_plap.o' libtool=no \ DEPDIR=.deps depmode=none /bin/sh ../depcomp \ g++ -DHAVE_CONFIG_H -I. -I.. -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=_WIN32_WINNT_VISTA -DWINVER=_WIN32_WINNT -DDEBUG -D_UNICODE -municode -c -o test_plap-test_plap.o test -f 'test_plap.cpp' || echo './'test_plap.cpp i686-w64-mingw32-windres -DHAVE_CONFIG_H -I. -I.. -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=_WIN32_WINNT_VISTA -DWINVER=_WIN32_WINNT -i "test-plap-res.rc" -o "test-plap-res.o" depbase=echo plap_common.o | sed 's|[^/]*$|.deps/&|;s|\.o$||';\ i686-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=_WIN32_WINNT_VISTA -DWINVER=_WIN32_WINNT -Wl,--dynamicbase,--nxcompat -O3 -pedantic -Wall -Wextra -MT plap_common.o -MD -MP -MF $depbase.Tpo -c -o plap_common.o plap_common.c &&\ mv -f $depbase.Tpo $depbase.Po /bin/sh ../libtool --tag=CC --mode=compile i686-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=_WIN32_WINNT_VISTA -DWINVER=_WIN32_WINNT -DDISABLE_PASSWORD_CHANGE -D_UNICODE -municode -Wl,--dynamicbase,--nxcompat -O3 -pedantic -Wall -Wextra -MT libopenvpn_plap_la-stub.lo -MD -MP -MF .deps/libopenvpn_plap_la-stub.Tpo -c -o libopenvpn_plap_la-stub.lo test -f 'stub.c' || echo './'stub.c ../depcomp: line 772: exec: g++: not found make[3]: [Makefile:863: test_plap-test_plap.o] Error 127 make[3]: Waiting for unfinished jobs.... libtool: compile: i686-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=_WIN32_WINNT_VISTA -DWINVER=_WIN32_WINNT -DDISABLE_PASSWORD_CHANGE -D_UNICODE -municode -Wl,--dynamicbase,--nxcompat -O3 -pedantic -Wall -Wextra -MT libopenvpn_plap_la-stub.lo -MD -MP -MF .deps/libopenvpn_plap_la-stub.Tpo -c stub.c -DDLL_EXPORT -DPIC -o .libs/libopenvpn_plap_la-stub.o libtool: compile: i686-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=_WIN32_WINNT_VISTA -DWINVER=_WIN32_WINNT -DDISABLE_PASSWORD_CHANGE -D_UNICODE -municode -Wl,--dynamicbase,--nxcompat -O3 -pedantic -Wall -Wextra -MT libopenvpn_plap_la-stub.lo -MD -MP -MF .deps/libopenvpn_plap_la-stub.Tpo -c stub.c -o libopenvpn_plap_la-stub.o >/dev/null 2>&1 mv -f .deps/libopenvpn_plap_la-stub.Tpo .deps/libopenvpn_plap_la-stub.Plo make[3]: Leaving directory '/home/SAP/openvpn-build-master/generic/tmp/openvpn-gui-11/plap' make[2]: [Makefile:976: install] Error 2 make[2]: Leaving directory '/home/SAP/openvpn-build-master/generic/tmp/openvpn-gui-11/plap' make[1]: [Makefile:737: install-recursive] Error 1 make[1]: Leaving directory '/home/SAP/openvpn-build-master/generic/tmp/openvpn-gui-11' make: *** [Makefile:1050: install-strip] Error 2 FATAL: make openvpn-gui

I'm using my configured cygwin what's built successfully 2.5.3 but failed for 2.5.8. Here is my environment:

I was monitoring new issues but quiet here... Has anybody issue above?

Thanks for any help.

lstipakov commented 1 year ago

test-plap is c++ based, so you need a g++ compiler installed.

Any reasons why don't you use native (msvc) build system?

devowl commented 1 year ago

We have the steps for build of OpenVPN and i just running over them for build it out. They are using cygwin and the final output of package is applicatable files for our usage. I didn't dig into the source of build process because cygwin doing all thing we need. And i was stucked when have got that error. I'm newby for cygwin an unix like systems.

Definitely you're right about MSVS but i can't be sure the output is a same. Perhaps gcc is required package for cygwin now you should add that to README file?

Anyway, mingw64-i686-gcc-core is listed in the cygwin installed packages roster.

lstipakov commented 1 year ago

We have switched to MSVC a while ago - it is a part of our build automation (see, for example, https://github.com/OpenVPN/openvpn/actions/runs/3461533150/jobs/5779262396 and https://github.com/OpenVPN/openvpn-build/actions/runs/3461658552/jobs/5779544040) and release process.

I know that some folks may still use cygwin/mingw, but it is not actively maintained. Maybe @selvanair can help you with it?

devowl commented 1 year ago

I have installed mingw64-x8664-gcc-g++ & mingw64-i686-gcc-g++ but there was missing #include "resource.h" file on build of plap_connection.c so...

I downgraded OPENVPN_GUI_VERSION="${OPENVPN_GUI_VERSION:-10}" to version 10 (because i don't need UI file) and build has finished successfully.

Thanks for help attempts anyway