Created attachment 696138 [details, diff] re2c-2.1.1-configure-bashisms.patch re2c's configure.ac contains Bashisms (use of == operator with test built-in). Thus, configure emits an error when /bin/sh is not Bash. This doesn't cause the build to fail outright, but it may be causing misdetection of features. AM_CONDITIONAL([WITH_BENCHMARKS], [test "x$enable_benchmarks" == "xyes"]) [test "x$enable_benchmarks_regenerate" == "xyes"]) ./configure: 5339: test: x: unexpected operator ./configure: 5386: test: x: unexpected operator The attached patch removes the Bashisms and allows dev-util/re2c-2.1.1 to configure without error when /bin/sh is Dash, after the following changes are made to the ebuild: inherit autotools src_prepare() { default eautoreconf }
Looks good. Can you send it upstream as well?
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f046a2ab06555b7cdfd47f03cf12337b18effa5e commit f046a2ab06555b7cdfd47f03cf12337b18effa5e Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2021-03-30 07:36:38 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2021-03-30 07:37:01 +0000 dev-util/re2c: tweak ./configure for dash Matt noticed errors when running ./configure on dash: ./configure: 5339: test: x: unexpected operator ./configure: 5386: test: x: unexpected operator The change is to use POSIX '=' comparison instead of bash-specific ==. Patch-by: Matt Whitlock Bug: https://bugs.gentoo.org/779187 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> dev-util/re2c/files/re2c-2.1.1-sh.patch | 48 +++++++++++++++++++++++++++++++++ dev-util/re2c/re2c-2.1.1-r1.ebuild | 29 ++++++++++++++++++++ 2 files changed, 77 insertions(+)
Proposed upstream as https://github.com/skvadrik/re2c/pull/348
This fix breaks compilation, as configure.ac timestamp is updated, autotools invokes itself to re-generate configure (and there is no dependency on autotools). Please reopen or add "inherit autotools"/eautoreconf. Seen error: >>> Compiling source in /var/tmp/portage/dev-util/re2c-2.1.1-r1/work/re2c-2.1.1 ... make -j2 CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /var/tmp/portage/dev-util/re2c-2.1.1-r1/work/re2c-2.1.1/build-aux/missing aclocal-1.16 /var/tmp/portage/dev-util/re2c-2.1.1-r1/work/re2c-2.1.1/build-aux/missing: line 81: aclocal-1.16: command not found WARNING: 'aclocal-1.16' is missing on your system. You should only need it if you modified 'acinclude.m4' or 'configure.ac' or m4 files included by 'configure.ac'. The 'aclocal' program is part of the GNU Automake package: <https://www.gnu.org/software/automake> It also requires GNU Autoconf, GNU m4 and Perl in order to run: <https://www.gnu.org/software/autoconf> <https://www.gnu.org/software/m4/> <https://www.perl.org/> make: *** [Makefile:1758: aclocal.m4] Error 127
(In reply to Étienne Buira from comment #4) > This fix breaks compilation, as configure.ac timestamp is updated, autotools > invokes itself to re-generate configure (and there is no dependency on > autotools). > > Please reopen or add "inherit autotools"/eautoreconf. > > Seen error: > In future, please file a new bug. I can fix this quickly now but this is easy to miss. > >>> Compiling source in /var/tmp/portage/dev-util/re2c-2.1.1-r1/work/re2c-2.1.1 ... > make -j2 > CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh > /var/tmp/portage/dev-util/re2c-2.1.1-r1/work/re2c-2.1.1/build-aux/missing > aclocal-1.16 > /var/tmp/portage/dev-util/re2c-2.1.1-r1/work/re2c-2.1.1/build-aux/missing: > line 81: aclocal-1.16: command not found > WARNING: 'aclocal-1.16' is missing on your system. > You should only need it if you modified 'acinclude.m4' or > 'configure.ac' or m4 files included by 'configure.ac'. > The 'aclocal' program is part of the GNU Automake package: > <https://www.gnu.org/software/automake> > It also requires GNU Autoconf, GNU m4 and Perl in order to run: > <https://www.gnu.org/software/autoconf> > <https://www.gnu.org/software/m4/> > <https://www.perl.org/> > make: *** [Makefile:1758: aclocal.m4] Error 127
(In reply to Sam James from comment #5) > (In reply to Étienne Buira from comment #4) > > This fix breaks compilation, as configure.ac timestamp is updated, autotools > > invokes itself to re-generate configure (and there is no dependency on > > autotools). > > > > Please reopen or add "inherit autotools"/eautoreconf. > > > > Seen error: > > > > In future, please file a new bug. I can fix this quickly now but this is > easy to miss. > (and when you do, include a full build.log and emerge --info).
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be44b523eb78e10f9a594f4f900af44eaeb36b61 commit be44b523eb78e10f9a594f4f900af44eaeb36b61 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-05-10 15:24:40 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-05-10 15:25:43 +0000 dev-util/re2c: regenerate autotools for nonbash patch While the used patch does modify configure directly, this is fragile and sometimes causes maintainer mode to be triggered regardless. Let's regenerate autotools to be safe given a user managed to hit this. Closes: https://bugs.gentoo.org/779187 Signed-off-by: Sam James <sam@gentoo.org> dev-util/re2c/re2c-2.1.1-r1.ebuild | 12 ++++++++++++ 1 file changed, 12 insertions(+)
(In reply to Larry the Git Cow from comment #7) > The bug has been closed via the following commit(s): > > https://gitweb.gentoo.org/repo/gentoo.git/commit/ > ?id=be44b523eb78e10f9a594f4f900af44eaeb36b61 > > commit be44b523eb78e10f9a594f4f900af44eaeb36b61 > Author: Sam James <sam@gentoo.org> > AuthorDate: 2021-05-10 15:24:40 +0000 > Commit: Sam James <sam@gentoo.org> > CommitDate: 2021-05-10 15:25:43 +0000 > > dev-util/re2c: regenerate autotools for nonbash patch > > While the used patch does modify configure directly, > this is fragile and sometimes causes maintainer mode > to be triggered regardless. Let's regenerate autotools > to be safe given a user managed to hit this. > > Closes: https://bugs.gentoo.org/779187 > Signed-off-by: Sam James <sam@gentoo.org> > > dev-util/re2c/re2c-2.1.1-r1.ebuild | 12 ++++++++++++ > 1 file changed, 12 insertions(+) The patch does include configure changes and is applied after .ac change. There should be no need for eautoreconf. If it does it might be a sign of broken clock on the machine.