Re: [Openvpn-devel] [PATCH 3/3] travis: compile with -Werror on Linux
Hi, On 11/11/2019 08:23, Gert Doering wrote: >> But the patch does affect cross-compilation for Windows on linux. > > That seems to have been an oversight in how to feed Travis what we want - > I saw an update yesterday evening. > >> Unless restricted to a very small cross-section (say gcc x.y + linux) this >> is going to cause a lot of grief. Note that every check run by configure >> that succeeds with warnings will become mysterious error at build time. >> There may be other unexpected failures too. -Werror is never fit for >> production in my view. There is a reason why warnings are warnings. > > "gcc $current + linux" was the plan, and only do it in Travis, not do > it in configure for general consumption. > Right - this was my mistake while creating this patch. A fix has been sent to the ml yesterday night. That should work as expected. However, note that Travis won't be 100% happy because some compilers don't have the -Wno-stringop-truncation we recently added and configure.ac is failing to detect that Cheers, -- Antonio Quartulli ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Re: [Openvpn-devel] [PATCH 3/3] travis: compile with -Werror on Linux
Hi, On Sun, Nov 10, 2019 at 05:03:26PM -0500, Selva Nair wrote: > > the > > > temptation to add -Werror in general and to Windows cross-build in > > > particular. > > > > Yeah, we're not intending to. > > But the patch does affect cross-compilation for Windows on linux. That seems to have been an oversight in how to feed Travis what we want - I saw an update yesterday evening. > Unless restricted to a very small cross-section (say gcc x.y + linux) this > is going to cause a lot of grief. Note that every check run by configure > that succeeds with warnings will become mysterious error at build time. > There may be other unexpected failures too. -Werror is never fit for > production in my view. There is a reason why warnings are warnings. "gcc $current + linux" was the plan, and only do it in Travis, not do it in configure for general consumption. 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 g...@greenie.muc.de signature.asc Description: PGP signature ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Re: [Openvpn-devel] [PATCH 3/3] travis: compile with -Werror on Linux
Forgot to hit send on this, and probably this is only partially relevant now, but here goes. Hi On Sun, Nov 10, 2019 at 12:03 PM Gert Doering wrote: > Hi, > > On Sun, Nov 10, 2019 at 11:48:16AM -0500, Selva Nair wrote: > > But it seems it may also affect mingw builds on travis. I would resist > the > > temptation to add -Werror in general and to Windows cross-build in > > particular. > > Yeah, we're not intending to. > But the patch does affect cross-compilation for Windows on linux. Unless restricted to a very small cross-section (say gcc x.y + linux) this is going to cause a lot of grief. Note that every check run by configure that succeeds with warnings will become mysterious error at build time. There may be other unexpected failures too. -Werror is never fit for production in my view. There is a reason why warnings are warnings. Just my 2c. Selva ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Re: [Openvpn-devel] [PATCH 3/3] travis: compile with -Werror on Linux
Hi, On Sun, Nov 10, 2019 at 11:48:16AM -0500, Selva Nair wrote: > But it seems it may also affect mingw builds on travis. I would resist the > temptation to add -Werror in general and to Windows cross-build in > particular. Yeah, we're not intending to. The plan is to have "default builds (no configure options) on Linux with sufficiently current C compilers" warning-free. Which can be achieved with the current code base. > Not all warnings can be fixed easily. Often the only option is to hide the > warning (e.g, by adding a cast) which imo is not always a good strategy. > -Werror just forces one's hand to use tricks that hide warnings. Right. Older systems will warn, oddball systems will warn, non-default build options will warn (and I take one "unused global variable" warning vs. "adding two lines #ifdef/#endif"). 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 g...@greenie.muc.de signature.asc Description: PGP signature ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Re: [Openvpn-devel] [PATCH 3/3] travis: compile with -Werror on Linux
Hi, On Sun, Nov 10, 2019 at 8:36 AM Antonio Quartulli wrote: > Signed-off-by: Antonio Quartulli > --- > .travis/build-check.sh | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/.travis/build-check.sh b/.travis/build-check.sh > index 039a7dcf..250bb454 100755 > --- a/.travis/build-check.sh > +++ b/.travis/build-check.sh > @@ -8,6 +8,7 @@ fi > > if [ "${TRAVIS_OS_NAME}" = "linux" ]; then > export LD_LIBRARY_PATH="${PREFIX}/lib:${LD_LIBRARY_PATH:-}" > + export CFLAGS="${CFLAGS} -Werror" > fi > If this is only for linux (and travis), and works with the current code base, probably its fine. But it seems it may also affect mingw builds on travis. I would resist the temptation to add -Werror in general and to Windows cross-build in particular. Not all warnings can be fixed easily. Often the only option is to hide the warning (e.g, by adding a cast) which imo is not always a good strategy. -Werror just forces one's hand to use tricks that hide warnings. Selva ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Re: [Openvpn-devel] [PATCH 3/3] travis: compile with -Werror on Linux
Am 10.11.19 um 14:35 schrieb Antonio Quartulli: > Signed-off-by: Antonio Quartulli > --- > .travis/build-check.sh | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/.travis/build-check.sh b/.travis/build-check.sh > index 039a7dcf..250bb454 100755 > --- a/.travis/build-check.sh > +++ b/.travis/build-check.sh > @@ -8,6 +8,7 @@ fi > > if [ "${TRAVIS_OS_NAME}" = "linux" ]; then > export LD_LIBRARY_PATH="${PREFIX}/lib:${LD_LIBRARY_PATH:-}" > + export CFLAGS="${CFLAGS} -Werror" > fi > > if [ "${TRAVIS_OS_NAME}" = "osx" ]; then > I assume that you compile tested this, so Acked-By: Arne Schwabe signature.asc Description: OpenPGP digital signature ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel
[Openvpn-devel] [PATCH 3/3] travis: compile with -Werror on Linux
Signed-off-by: Antonio Quartulli --- .travis/build-check.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis/build-check.sh b/.travis/build-check.sh index 039a7dcf..250bb454 100755 --- a/.travis/build-check.sh +++ b/.travis/build-check.sh @@ -8,6 +8,7 @@ fi if [ "${TRAVIS_OS_NAME}" = "linux" ]; then export LD_LIBRARY_PATH="${PREFIX}/lib:${LD_LIBRARY_PATH:-}" + export CFLAGS="${CFLAGS} -Werror" fi if [ "${TRAVIS_OS_NAME}" = "osx" ]; then -- 2.24.0 ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel