Hi Lennart, At 2024-03-19T17:30:20+0000, Lennart Jablonka wrote: > Quoth G. Branden Robinson: > > Popping the stack from history, I cannot reproduce this problem building > > on OpenBSD 7.4. Bison is installed and found by groff's configure > > script. It's not my machine; I don't have superuser privileges. > > Yes, it works using bison. Even without root access, you can use > OpenBSD’s yacc: Delete src/preproc/eqn/eqn.cpp and re-run configure > with ac_cv_prog_YACC=/usr/bin/yacc set.
Thanks. More time with the Autoconf manual might benefit me... > > Further, eqn.ypp says this, grabbing the "config.h" header file that > > gnulib demands so ubiquitously: > > > > %{ > > #ifdef HAVE_CONFIG_H > > #include <config.h> > > #endif > > > > #include <stdio.h> > > #include <string.h> > > #include <stdlib.h> > > > > #include "lib.h" > > #include "box.h" > > extern int non_empty_flag; > > int yylex(); > > void yyerror(const char *); > > %} > > Yes, but do look at yacc’s output, eqn.cpp. Using OpenBSD’s yacc, eqn.cpp > starts with this: > > #include <stdlib.h> > #include <string.h> > #define YYBYACC 1 > #define YYMAJOR 1 > #define YYMINOR 9 > #define YYLEX yylex() > #define YYEMPTY -1 > #define yyclearin (yychar=(YYEMPTY)) > #define yyerrok (yyerrflag=0) > #define YYRECOVERING() (yyerrflag!=0) > #define YYPREFIX "yy" > #line 19 "src/preproc/eqn/eqn.ypp" > #ifdef HAVE_CONFIG_H > #include <config.h> > #endif > > #include <stdio.h> > #include <string.h> > #include <stdlib.h> > > #include "lib.h" > #include "box.h" > extern int non_empty_flag; > int yylex(); > void yyerror(const char *); Okay, yes, I can confirm this output and the failure. It appears to me that byacc is just not playing nicely with Autoconf here. And maybe not with other tools, since it's _assuming_ that the output will require stdlib.h and string.h. (Its own boilerplate code indeed might, but its aggression here has clear negative consequences.) I don't see a path forward here except documenting that OpenBSD's byacc is not usable for repo builds. (Since we ship eqn.[ch]pp in distribution archives, the impact on most users sourcing their groff from GNU should be small.) What do you think? Regards, Branden
signature.asc
Description: PGP signature