Re: [PATCH] configure.ac: fix complaint by automake of missing AC_PROG_YACC
On Thu, Aug 26, 2021 at 12:37:27PM -0700, Luis Chamberlain wrote:
> If automake sees you have a Yacc source but YACC is undefined
> it will complain.
>
> Makefile.am: error: Yacc source seen but 'YACC' is undefined
> Makefile.am: The usual way to define 'YACC' is to add 'AC_PROG_YACC'
> Makefile.am: to 'configure.ac' and run 'autoconf' again.
> autoreconf: automake failed with exit status:
>
> The recommended way to resolve this is to use AC_PROG_YACC on configure.ac,
> but that is only if we care for yacc. Since we clearly are not fans of
> it and seem to prefer bison, add the missing m4 helper which defines
> AX_PROG_BISON().
>
> I've taken this from the mesa project [0].
>
> [0] https://gitlab.collabora.com/spurv/mesa/-/blob/collabora_master/m4/ax_prog_bison.m4
>
> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
So even with this, then I run into a compile issue:
make all-recursive
make[1]: Entering directory '/data/nbd'
Making all in .
make[2]: Entering directory '/data/nbd'
YACC nbdtab_parser.c
updating nbdtab_parser.tab.c
CC nbdtab_parser.lo
gcc: error: nbdtab_parser.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
make[2]: *** [Makefile:726: nbdtab_parser.lo] Error 1
make[2]: Leaving directory '/data/nbd'
make[1]: *** [Makefile:860: all-recursive] Error 1
make[1]: Leaving directory '/data/nbd'
make: *** [Makefile:499: all] Error 2
It would be nice if you could run compile tests of nbd against
a few distributions as part of a ci stuff.
Luis
Reply to: