win32 build: check for ENETUNREACH
PATCH 1/1 win32 build: check for ENETUNREACH
Currently, we do not check for mingw-gcc version. For example, Debian 7 is shipped with 4.6.3, which does not know about ENETUNREACH
---
this is for 2.4 and HEAD branches
configure.ac | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
configure.ac +14 -0
@@ -708,6 +708,20 @@ m4_define( [setsockopt getsockopt getsockname poll]dnl ) if test "${WIN32}" = "yes"; then + +# +# check for ENETUNREACH +# at least Debian 7 is shipped with gcc-mingw-w64-4.6.3, which is too old +# +AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +[[#include <errno.h> +#if !defined (ENETUNREACH) +# error ENETUNREACH not defined +#endif +]])], + , + [AC_MSG_ERROR([gcc-mingw is too old, please update])]) + # normal autoconf function checking does not find inet_ntop/inet_pton # because they need to include the actual header file and link ws2_32.dll LIBS="${LIBS} -lws2_32"
Signature · 1 line
2.9.4
No interest ?
9 июл. 2017 г. 19:46 пользователь "Ilya Shipitsin" <[email protected]......> написал:
Quoted 38 lines
Currently, we do not check for mingw-gcc version. For example, Debian 7 is shipped with 4.6.3, which does not know about ENETUNREACH
---this is for 2.4 and HEAD branches
configure.ac | 14 ++++++++++++++ 1 file changed, 14 insertions(+)configure.ac +14
-1@@ -708,6 +708,20 @@ m4_define( [setsockopt getsockopt getsockname poll]dnl ) if test "${WIN32}" = "yes"; then + +# +# check for ENETUNREACH +# at least Debian 7 is shipped with gcc-mingw-w64-4.6.3, which is too old +# +AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +[[#include <errno.h> +#if !defined (ENETUNREACH) +# error ENETUNREACH not defined +#endif +]])], + , + [AC_MSG_ERROR([gcc-mingw is too old, please update])]) + # normal autoconf function checking does not find inet_ntop/inet_pton # because they need to include the actual header file and link ws2_32.dll LIBS="${LIBS} -lws2_32" --2.9.4
Am 12.07.17 um 10:46 schrieb Илья Шипицин:
Quoted 2 lines
No interest ?
We are slow, you should know that by now. The code looks code so from that it looks good. If we get an ACK from someone who testedthis I think then it is safe to merge.
Arne
2017-07-12 13:59 GMT+05:00 Arne Schwabe <[email protected]...>:
Quoted 8 lines
Am 12.07.17 um 10:46 schrieb Илья Шипицин:
Quoted 2 lines
No interest ?
We are slow, you should know that by now. The code looks code so from that it looks good. If we get an ACK from someone who testedthis I think then it is safe to merge.
I tested it.
it neither breaks compilation where it should work
https://travis-ci.org/chipitsine/openvpn/builds/251726778
nor it passes where it should not (I tested on Debian 7 on https://dply.co )
Quoted 4 lines
Arne
A message that is not in the archive (sent off-list or not yet received): [email protected]...
A message that is not in the archive (sent off-list or not yet received): [email protected]...
Quoted 40 lines · Илья Шипицин
2017-07-12 18:54 GMT+05:00 Selva Nair <[email protected]...>:
Quoted 33 lines
Quoted 14 lines · Илья Шипицин
No interest ?
9 июл. 2017 г. 19:46 пользователь "Ilya Shipitsin" <[email protected]...> написал:
Quoted 9 lines
Currently, we do not check for mingw-gcc version. For example, Debian 7 is shipped with 4.6.3, which does not know about ENETUNREACH
---this is for 2.4 and HEAD branches
configure.ac | 14 ++++++++++++++ 1 file changed, 14 insertions(+)Quoted 15 lines
Quoted 12 lines
configure.ac +4
-0@@ -708,6 +708,20 @@ m4_define( [setsockopt getsockopt getsockname poll]dnl ) if test "${WIN32}" = "yes"; then + +# +# check for ENETUNREACH +# at least Debian 7 is shipped with gcc-mingw-w64-4.6.3, which is tooQuoted 1 line
old
Quoted 3 lines
Instead of checking for a particular define why not require a minimal version of gcc ? I do not know what version that would be, though..
Quoted 5 lines
if you would try to build using ubuntu-14.04, build would fail (I'll submit configure patch for that soon as well).
however, if modified compiler would used https://community.openvpn.net/
openvpn/wiki/PatchingDebs ... the build will succeed
There is no reliable way to support arbitrarily patched build environments. If I patch mingw in ubuntu 14-04 to have ENETUNREACH defined, the above check would pass but build may still fail somewhere else.
I still think we should just determine what official version of mingw-gcc is required and add a test for it.
Selva
2017-07-12 20:06 GMT+05:00 Selva Nair <[email protected]...>:
Quoted 50 lines
Quoted 40 lines · Илья Шипицин
2017-07-12 18:54 GMT+05:00 Selva Nair <[email protected]...>:
Quoted 33 lines
Quoted 14 lines · Илья Шипицин
No interest ?
9 июл. 2017 г. 19:46 пользователь "Ilya Shipitsin" < [email protected]...> написал:
Quoted 9 lines
Currently, we do not check for mingw-gcc version. For example, Debian 7 is shipped with 4.6.3, which does not know about ENETUNREACH
---this is for 2.4 and HEAD branches
configure.ac | 14 ++++++++++++++ 1 file changed, 14 insertions(+)Quoted 15 lines
Quoted 12 lines
configure.ac +4
-0@@ -708,6 +708,20 @@ m4_define( [setsockopt getsockopt getsockname poll]dnl ) if test "${WIN32}" = "yes"; then + +# +# check for ENETUNREACH +# at least Debian 7 is shipped with gcc-mingw-w64-4.6.3, which is tooQuoted 1 line
old
Quoted 3 lines
Instead of checking for a particular define why not require a minimal version of gcc ? I do not know what version that would be, though..
Quoted 5 lines
if you would try to build using ubuntu-14.04, build would fail (I'll submit configure patch for that soon as well).
however, if modified compiler would used https://community.openvpn.net/
openvpn/wiki/PatchingDebs ... the build will succeed
Quoted 4 lines
There is no reliable way to support arbitrarily patched build environments. If I patch mingw in ubuntu 14-04 to have ENETUNREACH defined, the above check would pass but build may still fail somewhere else.
ENETUNREACH check is for Debian 7.
Ubuntu 14.04 is shipped with broken fwpmu.h:
https://github.com/chipitsine/openvpn/commit/03013fd6f5b57a122302ce1a534a7061acde9d5b
:)
Quoted 6 lines
I still think we should just determine what official version of mingw-gcc is required and add a test for it.
Selva
any news ?
2017-07-12 20:50 GMT+05:00 Илья Шипицин <[email protected]...>:
Quoted 75 lines
2017-07-12 20:06 GMT+05:00 Selva Nair <[email protected]...>:
Quoted 50 lines
Quoted 40 lines · Илья Шипицин
2017-07-12 18:54 GMT+05:00 Selva Nair <[email protected]...>:
Quoted 33 lines
Quoted 14 lines · Илья Шипицин
No interest ?
9 июл. 2017 г. 19:46 пользователь "Ilya Shipitsin" < [email protected]...> написал:
Quoted 9 lines
Currently, we do not check for mingw-gcc version. For example, Debian 7 is shipped with 4.6.3, which does not know about ENETUNREACH
---this is for 2.4 and HEAD branches
configure.ac | 14 ++++++++++++++ 1 file changed, 14 insertions(+)Quoted 15 lines
Quoted 12 lines
configure.ac +4
-0@@ -708,6 +708,20 @@ m4_define( [setsockopt getsockopt getsockname poll]dnl ) if test "${WIN32}" = "yes"; then + +# +# check for ENETUNREACH +# at least Debian 7 is shipped with gcc-mingw-w64-4.6.3, which isQuoted 1 line
too old
Quoted 3 lines
Instead of checking for a particular define why not require a minimal version of gcc ? I do not know what version that would be, though..
Quoted 5 lines
if you would try to build using ubuntu-14.04, build would fail (I'll submit configure patch for that soon as well).
however, if modified compiler would used https://community.openvpn.net/
openvpn/wiki/PatchingDebs ... the build will succeedQuoted 4 lines
There is no reliable way to support arbitrarily patched build environments. If I patch mingw in ubuntu 14-04 to have ENETUNREACH defined, the above check would pass but build may still fail somewhere else.
ENETUNREACH check is for Debian 7.
Ubuntu 14.04 is shipped with broken
fwpmu.h:
https://github.com/chipitsine/openvpn/commit/03013fd6f5b57a122302ce1a534a7061acde9d5b:)Quoted 6 lines
I still think we should just determine what official version of mingw-gcc is required and add a test for it.
Selva
Hi,
Quoted 79 lines · Илья Шипицин
any news ?
2017-07-12 20:50 GMT+05:00 Илья Шипицин <[email protected]...>:
Quoted 74 lines
2017-07-12 20:06 GMT+05:00 Selva Nair <[email protected]...>:
Quoted 50 lines
Quoted 40 lines · Илья Шипицин
2017-07-12 18:54 GMT+05:00 Selva Nair <[email protected]...>:
Quoted 33 lines
Quoted 14 lines · Илья Шипицин
No interest ?
9 июл. 2017 г. 19:46 пользователь "Ilya Shipitsin" < [email protected]...> написал:
Quoted 9 lines
Currently, we do not check for mingw-gcc version. For example, Debian 7 is shipped with 4.6.3, which does not know about ENETUNREACH
---this is for 2.4 and HEAD branches
configure.ac | 14 ++++++++++++++ 1 file changed, 14 insertions(+)Quoted 15 lines
Quoted 12 lines
configure.ac +4
-0@@ -708,6 +708,20 @@ m4_define( [setsockopt getsockopt getsockname poll]dnl ) if test "${WIN32}" = "yes"; then + +# +# check for ENETUNREACH +# at least Debian 7 is shipped with gcc-mingw-w64-4.6.3, which isQuoted 1 line
too old
Quoted 3 lines
Instead of checking for a particular define why not require a minimal version of gcc ? I do not know what version that would be, though..
Quoted 5 lines
if you would try to build using ubuntu-14.04, build would fail (I'll submit configure patch for that soon as well).
however, if modified compiler would used https://community.openvpn.net/
openvpn/wiki/PatchingDebs ... the build will succeedQuoted 4 lines
There is no reliable way to support arbitrarily patched build environments. If I patch mingw in ubuntu 14-04 to have ENETUNREACH defined, the above check would pass but build may still fail somewhere else.
ENETUNREACH check is for Debian 7.
Ubuntu 14.04 is shipped with broken
fwpmu.h:
https://github.com/chipitsine/openvpn/commit/03013fd6f5b57a122302ce1a534a7061acde9d5b:)Quoted 6 lines
I still think we should just determine what official version of mingw- gcc is required and add a test for it.
Selva
I still think we should just determine what official version of mingw-gcc is required and add a test for it. :) If its just one define missing add it to sources as we already do for some fwpm defines in block_dns.c
Selva
20 июл. 2017 г. 19:50 пользователь "Selva Nair" <[email protected]...> написал:
Hi,
Quoted 79 lines · Илья Шипицин
any news ?
2017-07-12 20:50 GMT+05:00 Илья Шипицин <[email protected]...>:
Quoted 74 lines
2017-07-12 20:06 GMT+05:00 Selva Nair <[email protected]...>:
Quoted 50 lines
Quoted 40 lines · Илья Шипицин
2017-07-12 18:54 GMT+05:00 Selva Nair <[email protected]...>:
Quoted 33 lines
Quoted 14 lines · Илья Шипицин
No interest ?
9 июл. 2017 г. 19:46 пользователь "Ilya Shipitsin" < [email protected]...> написал:
Quoted 9 lines
Currently, we do not check for mingw-gcc version. For example, Debian 7 is shipped with 4.6.3, which does not know about ENETUNREACH
---this is for 2.4 and HEAD branches
configure.ac | 14 ++++++++++++++ 1 file changed, 14 insertions(+)Quoted 15 lines
Quoted 12 lines
configure.ac +4
-0@@ -708,6 +708,20 @@ m4_define( [setsockopt getsockopt getsockname poll]dnl ) if test "${WIN32}" = "yes"; then + +# +# check for ENETUNREACH +# at least Debian 7 is shipped with gcc-mingw-w64-4.6.3, which isQuoted 1 line
too old
Quoted 3 lines
Instead of checking for a particular define why not require a minimal version of gcc ? I do not know what version that would be, though..
Quoted 5 lines
if you would try to build using ubuntu-14.04, build would fail (I'll submit configure patch for that soon as well).
however, if modified compiler would used https://community.openvpn.net/
openvpn/wiki/PatchingDebs ... the build will succeedQuoted 4 lines
There is no reliable way to support arbitrarily patched build environments. If I patch mingw in ubuntu 14-04 to have ENETUNREACH defined, the above check would pass but build may still fail somewhere else.
ENETUNREACH check is for Debian 7.
Ubuntu 14.04 is shipped with broken
fwpmu.h:
https://github.com/chipitsine/openvpn/commit/03013fd6f5b57a122302ce1a534a7061acde9d5b:)Quoted 6 lines
I still think we should just determine what official version of mingw- gcc is required and add a test for it.
Selva
I still think we should just determine what official version of mingw-gcc is required and add a test for it. :) If its just one define missing add it to sources as we already do for some fwpm defines in block_dns.c
I generally agree with you. However, your approach needs some future investigation.
1) I do not know the minimal required version
2) it might turn out that version itself means almost nothing. For example, openssl shipped with alnost any linux distro is constantly updated, while its version remains the same (just patch level is increased). Same with mingw, ubuntu 14.04 is shipped with broken mingw, while Samuli supports patched repo, which is ok
So, while I agree your approach sounds resonable, I still suggest to start with my patch
Selva