Discussion:
Bug#932560: vile: Don't build against flex-old
(too old to reply)
Tommi Vainikainen
2019-07-20 16:40:01 UTC
Permalink
Source: vile
Severity: normal

Hi, as a maintainer of flex-old package I'm considering requesting
removing it as obsolete and unmaintained version of flex. Your
package Build-Depends on flex-old. Please update the package build
procedures to build e.g. with current flex (from package `flex`)
instead of flex-old.
Thomas Dickey
2019-07-20 17:30:02 UTC
Permalink
Actually it's debatable whether flex "new" is maintained.

For your amusement:

https://invisible-island.net/personal/lint-tools.html#proc_cleanup_lexyacc

----- Original Message -----
| From: "Tommi Vainikainen" <***@debian.org>
| To: "submit" <***@bugs.debian.org>
| Sent: Saturday, July 20, 2019 12:28:20 PM
| Subject: Bug#932560: vile: Don't build against flex-old

| Source: vile
| Severity: normal
|
| Hi, as a maintainer of flex-old package I'm considering requesting
| removing it as obsolete and unmaintained version of flex. Your
| package Build-Depends on flex-old. Please update the package build
| procedures to build e.g. with current flex (from package `flex`)
| instead of flex-old.
--
Thomas E. Dickey <***@invisible-island.net>
http://invisible-island.net
ftp://ftp.invisible-island.net
Brendan O'Dea
2019-07-21 05:10:01 UTC
Permalink
Post by Thomas Dickey
Actually it's debatable whether flex "new" is maintained.
I did a test build against the current version (2.6.4), and it no longer has
the issue[0] which caused me to revert to flex-old some time ago.

Some brief testing of a handful of modes (mail, ada, html, c) appears to work
pretty much the same as the package built with flex-old. There may be subtle
behaviour changes which I didn't see, but the egregious symbol naming issue is
gone. I don't recall if that was changed in flex, or worked around in
configure at this point.

Note that there seem to have been quite a few changes made to flex since I
last used it, and it appears to produce code with less warnings now than
flex-old does (using these[1] gcc warning flags). I'll note that some are
conversion flags, and you've suggested that there may be issues with those,
but there are still fewer in the newer flex.

Compilation output of awk-filt.l attached for both.

I can't think of a compelling reason at this point to stick with flex-old, so
will upload a new package with the build-dependency changed and see how that
goes.

--bod

[0] http://bugs.debian.org/832973
[1] https://invisible-island.net/personal/lint-tools.html#tool_gcc
Thomas Dickey
2019-07-21 09:10:01 UTC
Permalink
Post by Brendan O'Dea
Post by Thomas Dickey
Actually it's debatable whether flex "new" is maintained.
I did a test build against the current version (2.6.4), and it no longer has
the issue[0] which caused me to revert to flex-old some time ago.
Some brief testing of a handful of modes (mail, ada, html, c) appears to work
pretty much the same as the package built with flex-old. There may be subtle
behaviour changes which I didn't see, but the egregious symbol naming issue is
gone. I don't recall if that was changed in flex, or worked around in
configure at this point.
I'm unsure - I'll take a look to see if bisecting flex shows me a change.
Post by Brendan O'Dea
Note that there seem to have been quite a few changes made to flex since I
last used it, and it appears to produce code with less warnings now than
flex-old does (using these[1] gcc warning flags). I'll note that some are
conversion flags, and you've suggested that there may be issues with those,
but there are still fewer in the newer flex.
thanks (I'll check on that, too)
Post by Brendan O'Dea
Compilation output of awk-filt.l attached for both.
I can't think of a compelling reason at this point to stick with flex-old, so
will upload a new package with the build-dependency changed and see how that
goes.
--bod
[0] http://bugs.debian.org/832973
[1] https://invisible-island.net/personal/lint-tools.html#tool_gcc
/bin/sh ../../plink.sh gcc -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wconversion -rdynamic -o vile-au3-filt.so -shared au3-filt.o
compiling awk-filt.l
echo '#include <flt_defs.h>' > awk-filt.c
flex -Pawk_ -t ../../filters/awk-filt.l >> awk-filt.c
gcc -c -fPIC -I. -I.. -I../../filters -I../.. -DHAVE_CONFIG_H -I../../filters/filters -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -I../../filters/filters -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wconversion -rdynamic -Dfilter_def=define_awk -Dprivate_yywrap=awk_wrap ./awk-filt.c
../../filters/awk-filt.l:92:28: warning: conversion from ‘int’ to ‘YY_CHAR’ {aka ‘unsigned char’} may change value [-Wconversion]
^
../../filters/awk-filt.l:102:13: warning: conversion from ‘int’ to ‘YY_CHAR’ {aka ‘unsigned char’} may change value [-Wconversion]
pop_state();
^~~~
../../filters/awk-filt.l:104:56: warning: conversion to ‘unsigned int’ from ‘short int’ may change the sign of the result [-Wsign-conversion]
^
../../filters/awk-filt.l:282:35: warning: conversion to ‘yy_size_t’ {aka ‘unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
../../filters/awk-filt.l:282:4: warning: conversion to ‘int’ from ‘yy_size_t’ {aka ‘unsigned int’} may change the sign of the result [-Wsign-conversion]
../../filters/awk-filt.l:299:20: warning: conversion to ‘int’ from ‘yy_size_t’ {aka ‘unsigned int’} may change the sign of the result [-Wsign-conversion]
../../filters/awk-filt.l:321:49: warning: conversion to ‘yy_size_t’ {aka ‘unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
../../filters/awk-filt.l:321:18: warning: conversion to ‘int’ from ‘yy_size_t’ {aka ‘unsigned int’} may change the sign of the result [-Wsign-conversion]
../../filters/awk-filt.l:377:27: warning: conversion from ‘int’ to ‘YY_CHAR’ {aka ‘unsigned char’} may change value [-Wconversion]
../../filters/awk-filt.l:387:12: warning: conversion from ‘int’ to ‘YY_CHAR’ {aka ‘unsigned char’} may change value [-Wconversion]
../../filters/awk-filt.l:389:55: warning: conversion to ‘unsigned int’ from ‘short int’ may change the sign of the result [-Wsign-conversion]
../../filters/awk-filt.l:422:11: warning: conversion from ‘int’ to ‘YY_CHAR’ {aka ‘unsigned char’} may change value [-Wconversion]
../../filters/awk-filt.l:424:54: warning: conversion to ‘unsigned int’ from ‘short int’ may change the sign of the result [-Wsign-conversion]
../../filters/awk-filt.l:479:12: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
../../filters/awk-filt.l:622:19: warning: conversion to ‘yy_size_t’ {aka ‘unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
../../filters/awk-filt.l:751:18: warning: conversion to ‘int’ from ‘yy_size_t’ {aka ‘unsigned int’} may change the sign of the result [-Wsign-conversion]
../../filters/awk-filt.l:796:6: warning: conversion to ‘yy_size_t’ {aka ‘unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
../../filters/awk-filt.l:877:13: warning: ‘yy_fatal_error’ defined but not used [-Wunused-function]
../../filters/awk-filt.l:479:12: warning: ‘input’ defined but not used [-Wunused-function]
rm -f awk-filt.c
/bin/sh ../../plink.sh gcc -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wconversion -rdynamic -o vile-au3-filt.so -shared au3-filt.o
compiling awk-filt.l
echo '#include <flt_defs.h>' > awk-filt.c
flex -Pawk_ -t ../../filters/awk-filt.l >> awk-filt.c
gcc -c -fPIC -I. -I.. -I../../filters -I../.. -DHAVE_CONFIG_H -I../../filters/filters -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -I../../filters/filters -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wconversion -rdynamic -Dfilter_def=define_awk -Dprivate_yywrap=awk_wrap ./awk-filt.c
<stdout>:2017:24: warning: ‘yy_fatal_error’ defined but not used [-Wunused-function]
rm -f awk-filt.c
--
Thomas E. Dickey <***@invisible-island.net>
https://invisible-island.net
ftp://ftp.invisible-island.net
Thomas Dickey
2019-07-21 21:40:01 UTC
Permalink
Post by Thomas Dickey
Post by Brendan O'Dea
Post by Thomas Dickey
Actually it's debatable whether flex "new" is maintained.
I did a test build against the current version (2.6.4), and it no longer has
the issue[0] which caused me to revert to flex-old some time ago.
Some brief testing of a handful of modes (mail, ada, html, c) appears to work
pretty much the same as the package built with flex-old. There may be subtle
behaviour changes which I didn't see, but the egregious symbol naming issue is
gone. I don't recall if that was changed in flex, or worked around in
configure at this point.
I'm unsure - I'll take a look to see if bisecting flex shows me a change.
fwiw, in a quick check most of the warnings were addressed.
I "only" get a little more than twice as many warnings in a build
as with reflex (I don't use flex-old, of course).

Comparing the warnings, most of those are due to an unused function
(which may be something that can be suppressed). But there's also
some warnings about an implicit fallthrough.

That would still make new-flex the largest contributor to compiler warnings
in my builds (about 50% more than the perl add-on).
Post by Thomas Dickey
Post by Brendan O'Dea
Note that there seem to have been quite a few changes made to flex since I
last used it, and it appears to produce code with less warnings now than
flex-old does (using these[1] gcc warning flags). I'll note that some are
conversion flags, and you've suggested that there may be issues with those,
but there are still fewer in the newer flex.
thanks (I'll check on that, too)
Post by Brendan O'Dea
Compilation output of awk-filt.l attached for both.
I can't think of a compelling reason at this point to stick with flex-old, so
will upload a new package with the build-dependency changed and see how that
goes.
--bod
[0] http://bugs.debian.org/832973
[1] https://invisible-island.net/personal/lint-tools.html#tool_gcc
/bin/sh ../../plink.sh gcc -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wconversion -rdynamic -o vile-au3-filt.so -shared au3-filt.o
compiling awk-filt.l
echo '#include <flt_defs.h>' > awk-filt.c
flex -Pawk_ -t ../../filters/awk-filt.l >> awk-filt.c
gcc -c -fPIC -I. -I.. -I../../filters -I../.. -DHAVE_CONFIG_H -I../../filters/filters -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -I../../filters/filters -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wconversion -rdynamic -Dfilter_def=define_awk -Dprivate_yywrap=awk_wrap ./awk-filt.c
../../filters/awk-filt.l:92:28: warning: conversion from ‘int’ to ‘YY_CHAR’ {aka ‘unsigned char’} may change value [-Wconversion]
^
../../filters/awk-filt.l:102:13: warning: conversion from ‘int’ to ‘YY_CHAR’ {aka ‘unsigned char’} may change value [-Wconversion]
pop_state();
^~~~
../../filters/awk-filt.l:104:56: warning: conversion to ‘unsigned int’ from ‘short int’ may change the sign of the result [-Wsign-conversion]
^
../../filters/awk-filt.l:282:35: warning: conversion to ‘yy_size_t’ {aka ‘unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion]
../../filters/awk-filt.l:282:4: warning: conversion to ‘int’ from ‘yy_size_t’ {aka ‘unsigned int’} may change the sign of the result [-Wsign-conversion]
../../filters/awk-filt.l:299:20: warning: conversion to ‘int’ from ‘yy_size_t’ {aka ‘unsigned int’} may change the sign of the result [-Wsign-conversion]
Actually, I don't see _these_ warnings in my build (if I had, the
differences would be a lot more).

I did my builds with my Debian/testing machine.
I'll revisit this in a week or so, to
see why the warnings are different :-)
--
Thomas E. Dickey <***@invisible-island.net>
https://invisible-island.net
ftp://ftp.invisible-island.net
Loading...